Command reference / sys
ADDEXITPGM
Add Exit Program
Registers a program with the IBM i registration facility for a particular exit point and format. The application that owns the exit point determines when the registered program runs.
Allowed environments: *ALL.
Positional parameters: 4.
Parameters
EXITPNT
Exit point
Sets the exit point name to which the exit program is added. If no exit point by this name exists, and CRTEXITPNT(*YES) is specified, an exit point is created.
FORMAT
Exit point format
Sets the exit point format name of the exit program that is added.
PGMNBR
Program number
Sets the sequence in which the exit programs are run when multiple exit point programs for a specific exit point are defined.
Suggested / special values:
*LOW, *HIGH
*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- Enter the exit program sequence number. Valid values range from 1 through 2,147,483,647. Processing sequence is from the lowest number to the highest number. Exit program numbers do not need to be consecutive.
PGM
Program
Enter the name of exit program to be called. The program does not have to exist on the system when this command is run.
*CURLIB- Look in the current library, falling back to QGPL.
library-name- Enter the name of the library where the exit program is located.
program-name- Enter the name of the exit program.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Program
Program
Library
Library
Suggested / special values:
*CURLIB
THDSAFE
Threadsafe
Enter the threadsafe attribute for the exit program entry. If you do not know the threadsafety status of the exit program entry, use the default value of *UNKNOWN.
Allowed values:
*UNKNOWN, *NO, *YES
*UNKNOWN- The threadsafety status of this exit program entry is not known.
*NO- The exit program entry is not threadsafe.
*YES- The exit program entry is threadsafe.
MLTTHDACN
Multithreaded job action
Enter the multithreaded job action for this exit program entry. If you do not know the action to take in a multithreaded job, use the default value of *SYSVAL.
Allowed values:
*SYSVAL, *RUN, *MSG, *NORUN
*SYSVAL- The multithreaded job action specified in the QMLTTHDACN system value is used.
*RUN- Run the exit program entry.
*MSG- Run the exit program entry and send an informational message.
*NORUN- Do not run the exit program entry.
TEXT
Text 'description'
Sets the text that briefly describes the exit program.
Suggested / special values:
*BLANK, *MSGID
*BLANK- Leave the description blank.
*MSGID- The description is taken from the message specified by the MSGID and MSGF parameters.
'description'- Enter no more than 50 characters of text, enclosed in apostrophes.
MSGID
Message identifier
Sets the message identifier that contains the text that describes the exit program. The message is retrieved from the message file specified by the MSGF parameter. This parameter can only be specified if TEXT(*MSGID) is specified.
message-identifier- Enter the seven-character message identifier of the message that describes the exit program.
MSGF
Message file
Sets the message file and library that contains the message specified by the MSGID parameter. This parameter can only be specified if TEXT(*MSGID) is specified. The name of the message file is qualified by one of the following library values:
*LIBL- Look in the thread's library list.
library-name- Enter the name of the library where the message file is located.
message-file- Enter the name of the message file.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Message file
Message file
Library
Library
Suggested / special values:
*LIBL
REPLACE
Replace existing entry
Enter whether the attributes and data for an exit program entry are replaced. New values for the program data and the text or message identifier can be specified. The program name and library cannot be changed.
Allowed values:
*NO, *YES
*NO- Do not replace the attributes and data for an exit program.
*YES- Replace the attributes and data for and exit program entry.
CRTEXITPNT
Create exit point
Enter whether the exit point is automatically created if it does not already exist.
Allowed values:
*NO, *YES
*NO- Do not create the exit point. If the specified exit point does not exist the exit program is not added and an error message is returned.
*YES- Create the specified exit point.
PGMDTA
Exit program data
Sets the data that is passed to the exit program. This data should correspond to the input data defined by the exit point provider.
Suggested / special values:
*NONE
*NONE- No data is passed to the exit program.
*JOB- The CCSID (coded character set identifier) of the current job is used.
CCSID-for-data- Enter the CCSID associated with the data passed to the exit program.
*CALC- The length is determined by the number of bytes specified for the third element of this parameter.
length-of-data- Enter the number of bytes of data passed to the exit program.
program-data- Enter 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.
Elements in order
Coded character set ID
Coded character set ID
Suggested / special values:
*JOB
Length of data
Length of data
Suggested / special values:
*CALC
Program data
Program data
Examples
ADDEXITPGM EXITPNT(USER_EXIT_ONE) FORMAT(EXIT1) PGMNBR(1) PGM(LIB2/MYPGM) TEXT(*MSGID) MSGID(TXT2345) MSGF(LIB1/MYMSGF)
Adds exit program MYPGM in library LIB2 to exit point USER_EXIT_ONE. This is first exit program run for the exit point.
Generated from os/cl/catalog/ADDEXITPGM.json and os/cl/help/ADDEXITPGM.json.