1 | Change command exit information | Input | Char(*) |
2 | Replacement command | Output | Char(*) |
3 | Length of replacement command string | Output | Binary(4) |
The Replace Command Exit Program (QCARPLCM) API may be used as the exit program for the QIBM_QCA_CHG_COMMAND for any command. If the original command was library-qualified with *SYSTEM or *NLVLIBL, the library qualifier will be replaced with *LIBL. None of the parameter values specified on the original command will be changed. See the Command Analyzer Change exit program for a description of the QIBM_QCA_CHG_COMMAND exit point.
None
Information about the command that the command analyzer was called to process. See Format CHGC0100 in the Command Analyzer Change exit program.
A string containing the command string that is to be substituted for the one that the command analyzer was called to process. If the original command was library-qualified with *SYSTEM or *NLVLIBL, the library qualifer will be replaced with *LIBL. None of the parameter values specified on the original command will be changed. The maximum length of the changed command string is 32000 bytes.
The length of the replacement command string (0 - 32000) in bytes.
Registration Considerations
Use the Add Exit Program command (ADDEXITPGM) or API (QUSADDEP, QusAddExitProgram) to register this program as an exit program for a command. You must specify 20 bytes of exit program data. The first 10 characters specify the command name; the second 10 characters specify the library name. For example, to register QCARPLCM as the exit program to be called at the QIBM_QCA_CHG_COMMAND exit point for the Display Job (DSPJOB) command in library QSYS, specify:
ADDEXITPGM EXITPNT(QIBM_QCA_CHG_COMMAND) FORMAT(CHGC0100) PGMNBR(*LOW) PGMDTA(*JOB 20 'DSPJOB QSYS ')
If you register QCARPLCM as an exit program for a command in library QSYS, it also will be called for commands in the secondary language libraries. For example, if the exit program is registered for the DSPJOB command in library QSYS, it also will be called for the DSPJOB command in library QSYS2962.
If you rename the command or the library or move the command to another library, you also must have the exit program registered using the new command and library names.
If you register QCARPLCM as the exit program for a command, you cannot register another exit program for the command for the QIBM_QCA_CHG_COMMAND exit point.
Runtime Considerations
If two applications on the same system need to replace the same command with one of the same name but in different libraries, they can register QCARPLCM as the exit program for the QIBM_QCA_CHG_COMMAND exit point for the command. The applications must ensure that the correct application library is at the beginning of the system part of the library list.
If the original command was library-qualified with a specific library name, the exit program will not be allowed to change the command string, so the command analyzer will search only the specified library for the command.
Top | Program and CL Command APIs | APIs by category |