

Programmer Utilities › Introduction › Overview › Edit Aids › Source Manipulation Commands
Source Manipulation Commands
As well as the object and source manipulation facilities provided by the Toolkit list and generic commands (for example, YMOVOBJ, YMOVM, YRMVM), Toolkit includes aids to carry out six commonly required functions:
- Rename an object and its source (YRNMOBJSRC).
- Create a set of source files in a given library (YCRTSRCPF).
- Scan source (YSCNSRC). A source file member, or members, indicated by a generic name or a Toolkit member list, can be scanned for the occurrence or absence of a search string, or combination of search strings. The output can either be in the form of a report, or be a result list specifying the members containing the string, or both. The list output is especially useful if you wish to subsequently process all items containing the string.
- Compare source (YCMPSRC). A source file member, or members, indicated by a generic name or a Toolkit member list, can be compared against another member or members. A listing of the differences may be produced. If many members are compared a member list may be created of the members which differ or which match.
- Scan and replace source (YSCNRPLSRC). A source file member, or members, indicated by a generic name or a Toolkit member list, can be scanned for the occurrence or absence of a search string, and any found occurrences replaced by another specified string.
- Tidy RPG/400 source (YTDYRPGSRC). The start and end statements of RPG/400 structured programming constructs can be documented automatically.
The following represents the Scan Source prompt.
The above example would scan through all source files whose names begin with the letter Q in library QGPL for occurrences of the string CALL FRED anywhere in columns one to eighty. It would produce a report of every line containing the specified string, as well as a member list of the names of the source members containing the string.
Copyright © 2014 CA.
All rights reserved.
 
|
|