Analyze Command Performance (ANZCMDPFR)
Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Analyze Command Performance (ANZCMDPFR) command measures the performance of a single CL command or a set of CL commands. For a single command, performance information is collected from when the command starts until the command ends. For a set of commands, performance information is collected from the start of the first command in the set until the last command in the set ends.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
CMD | Command | Command string | Optional |
CMDFILE | Command file | Qualified object name | Optional |
Qualifier 1: Command file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
CMDMBR | Command member | Name, *FIRST | Optional |
OUTPUT | Output | *MSG, *OUTFILE | Optional |
OUTFILE | File to receive output | Qualified object name | Optional |
Qualifier 1: File to receive output | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
OUTMBR | Output member options | Element list | Optional |
Element 1: Member to receive output | Name, *FIRST | ||
Element 2: Replace or add records | *REPLACE, *ADD |
Top |
Command (CMD)
Specifies a CL command whose performance is to be analyzed.
Note: A value must be specified for either this parameter or the Command file (CMDFILE) parameter. You cannot specify a value for both the CMD and CMDFILE parameters.
- command-string
- Specify a syntactically-correct CL command string.
Top |
Command file (CMDFILE)
Specifies the database source file that contains the source member that contains the CL commands whose performance is to be analyzed.
Note: A value must be specified for either this parameter or the Command (CMD) parameter. You cannot specify a value for both the CMD and CMDFILE parameters.
Qualifier 1: Command file
- name
- Specify the name of the file to be used.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the thread is used to locate the file. If no current library entry exists in the library list, the QGPL library is used.
- name
- Specify the name of the library where the file is located.
Top |
Command member (CMDMBR)
Specifies the database source file member that contains the CL commands whose performance is to be analyzed.
- *FIRST
- The first member of the database source file specified for the Command file (CMDFILE) parameter contains the CL commands to be run.
- name
- Specify the name of the file member.
Top |
Output (OUTPUT)
Specifies where the output from the command is sent.
- *MSG
- The output is displayed in a message (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
- *OUTFILE
- The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.
Top |
File to receive output (OUTFILE)
Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library.
Note: If a new file is created, the text describing that file is "Output file for ANZCMDPFR" and the public authority is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority. The database format (QAPYANZR) of the output file is the same as that used in the IBM-supplied database file QAPYANZC.
Qualifier 1: File to receive output
- name
- Specify the name of the file to which the output of the command is directed.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the job is searched to find the file. If no library is specified as the current library for the job, the QGPL library is used.
- name
- Specify the name of the library to be searched to find the file.
Top |
Output member options (OUTMBR)
Specifies the name of the database file member that receives the output of the command.
Element 1: Member to receive output
- *FIRST
- The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.
- name
- Specify the name of the file member that receives the output. If it does not exist, the system creates it.
Element 2: Replace or add records
- *REPLACE
- The system clears the existing member and adds the new records.
- *ADD
- The system adds the new records to the end of the existing records.
Top |
Examples
Example 1: Analyzing Performance of a Single Command
ANZCMDPFR CMD(CRTLIB LIB(TST))
This command analyzes the performance of the CRTLIB LIB(TST) command. The results are sent as messages.
Example 2: Analyzing a Command and Writing Results to a File
ANZCMDPFR CMD(DSPLIB LIB(QGPL)) OUTPUT(*OUTFILE) OUTFILE(MYLIB/MYFILE)
This command analyzes the performance of the DSPLIB LIB(QGPL) command. The results are written to the first member of database file MYFILE in library MYLIB.
Example 3: Analyzing Performance of a Set of CL Commands
ANZCMDPFR CMDFILE(MYLIB/MYCMDFILE) CMDMBR(CMDS)
This command analyzes the performance of the set of CL commands located in the source member named CMDS in file MYCMDFILE in library MYLIB. The results are sent as messages.
Top |
Error messages
*ESCAPE Messages
- CPF4104
- User not authorized to operation on file &2 in &3, member, device, or program device &4.
- CPF4128
- Not able to allocate objects needed for file &2 in library &3 member or program device &4.
- CPF9810
- Library &1 not found.
- CPF9812
- File &1 in library &2 not found.
Top |