ADDEXITPGM Command syntax diagram
Purpose
The Add Exit Program (ADDEXITPGM) adds an exit program entry for a specific exit point. Each exit point can have a single entry or multiple entries. The exit program number indicates the sequence in which the exit programs are run.
Required Parameters
*LOW: The lowest available number for that specific exit point is assigned.
*HIGH: The highest available number for that specific exit point is assigned.
program-number: Specify the exit program sequence number. Valid values range from 1 through 2147483647. Processing sequence is from the lowest number to the highest number. Exit program numbers do not need to be consecutive.
The name of the exit program can be qualified by one of the following library values:
*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.
program-name: Specify the name of the exit program.
Optional Parameters
*BLANK: Text is not specified.
*MSGID: The description is taken from the message specified by the MSGID and MSGF parameters. The description is retrieved when exit program information is displayed using the WRKREGINF (Work with Registration Information) command or retrieved using the QusRetrieveExitInformation API.
'description': Specify no more than 50 characters of text, enclosed in apostrophes.
message-identifier: Specify the seven-character message identifier of the message that describes the exit program.
The name of the message file 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 where the message file is located.
message-file: Specify the name of the message file.
*NO: The attributes and data for an exit program entry are not replaced.
*YES: The attributes and data for an exit program entry are replaced.
*NO: The exit point is not created. If the specified exit point does not exist, the exit program is not added and an error message is returned.
*YES: The specified exit point is created.
*UNKNOWN: The threadsafe status of the exit program entry is not known.
*NO: The exit program entry is not threadsafe.
*YES: The exit program entry is threadsafe.
*SYSVAL: Use the QMLTTHDACN system value to determine the action to take.
*RUN: Run the exit program in a multiple threaded job.
*MSG: Run the exit program in a multiple threaded job, but send an informational message. CPI3C80 can be used as the informational message.
*NORUN: Do not run the exit program in a multiple threaded job. Depending on the exit point, do one of the following:
If you do use the THDSAFE value to determine the value for MLTTHDACN, please read the following recommendations:
*NONE: No data is passed to the exit program.
Element 1: CCSID for Program Data
*JOB: The CCSID (coded character set identifier) of the current job is used.
CCSID-for-data: Specify the CCSID associated with the data passed to the exit program.
Element 2: Length of Program Data
*CALC: The length is determined by the number of bytes specified for the third element of this parameter.
length-of-data: Specify the number of bytes of data passed to the exit program.
Element 3: Program Data
program-data: Specify the character or hexadecimal program data to be passed to the exit program. If you specify more program data than the length specified, the program data passed to the exit program is truncated. If you specify less program data than the length specified, the program data passed to the exit program is padded on the right with blanks. You can specify up to 2048 bytes of program data.
Example for ADDEXITPGM
ADDEXITPGM EXITPNT(USER_EXIT_ONE) FORMAT(EXIT1) PGMNBR(1) PGM(LIB2/MYPGM) TEXT(*MSGID) MSGID(TXT2345) MSGF(LIB1/MYMSGF)
This command adds exit program MYPGM in library LIB2 to exit point USER_EXIT_ONE. This is first exit program run for the exit point. The text description for the exit program is retrieved from message TXT2345 in message file MYMSGF in library LIB1. No program data is passed to the exit program.
Error messages for ADDEXITPGM
None
| [ Information Center Home Page | Feedback | Back to main CL topic ] | [ Legal | AS/400 Glossary ] |