PRTCMDUSG (Print Command Usage)
PRTCMDUSG Command syntax diagram
Purpose
The Print Command Usage (PRTCMDUSG) command creates a cross-referenced list of a specified group of CL commands that are used in a specified group of CL programs. The report shows, program by program, which of the specified commands are used in each program. The report can be used to identify which programs need to be recompiled because of changes that have been made to the command definition objects of commands specified on the PRTCMDUSG command. Note that this command can take a long time to run and can make a lot of printed output.
Required Parameters
- CMD
- Specifies the qualified names of up to 50 CL commands for which specified programs are searched and printed in a command usage report. The system searches the specified programs for every occurrence of each library-name/command-name character string you specify.
The name of the command can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
library-name: Specify the name of the library to be searched.
command-name: Specify the names of the commands for which specified programs are searched.
Optional Parameters
- PGM
- Specifies the qualified name of the program or the generic name of several programs that are searched for the specified commands. Only the programs and libraries for which the user has some (any) authority are included in the report. This parameter also can specify that all (*ALL) programs in the specified library or libraries (*USRLIBL/*ALLUSR, for example) are searched.
The name of the program can be qualified by one of the following library values:
*USRLIBL: Only the libraries in the user portion of the job's library list are searched.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
*ALL: All CL programs in the specified library (or all libraries identified in the library qualifier) for which the user has some authority are searched.
program-name: Specify the name of the program being searched for the specified command.
generic*-program-name: Specify the name of the program or the generic name of several programs in the specified library qualifier that are searched for the specified commands. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. For more information on the use of generic names, refer to generic names.
Example for PRTCMDUSG
PRTCMDUSG CMD(CPYF) PGM(PAYROLL/*ALL)This commands searches all CL programs in the library PAYROLL for the Copy File (CPYF) commands and prints the names of both the commands and the program.
Error messages for PRTCMDUSG
*ESCAPE Messages
- CPF0593
- PRTCMDUSG command ended by controlled end.
- CPF0595
- PRTCMDUSG command ended.
- CPF0596
- PRTCMDUSG command ended. Cannot open print file.