Skip to main content
Skip table of contents

Exit Programm Parameter

Type 1 parameter list

The Type 1 parameter list format was the only format available with exit programs in earlier versions. You are still able to use this format, but it is supported primarily for
reasons of backwards-compatibility. It has the limitation that it can receive only a single exit program parameter extracted from the spooled files, whereas newer version can pass multiple exit program parameters to called exit programs.


A Type 1 parameter list consists of the following:

NumberDescriptionInput/OutputType
1Spooled file name InputInputCHAR(10)
2Name of the job that created the spooled fileInputCHAR(10)
3User id that created the spooled fileInputCHAR(10)
4Number of the job that created the spooled fileInputCHAR(6)
5Spooled file numberInputBINARY(4)
6Spooled file user dataInputCHAR(10)
7Name of the stream file just createdInputCHAR(128)
8Directory name in which stream file was createdInputCHAR(256)
9User-definable exit program parameterInputCHAR(1024)

Note that parameter 9 is a 1024-byte fixed length character variable which will be padded with trailing blanks if the parameter extracted from the spooled file is less than 1024 bytes long.

If more than one parameter is extracted from the spooled file, only the first parameter will be passed to an exit program defined as having *TYPE1 parameters. It is therefore recommended that you use *TYPE2 or *TYPE3 parameters if you wish to extract more than one parameter string from the spooled file.

If you need to pass a large number of user-defined parameters (in excess of 242), you will need to use the new *TYPE4 parameter list.

Type 2 parameter list

The Type 2 parameter list format was introduced in order to allowmultiple exit program parameters to be passed to called exit programs.

A Type 2 parameter list consists of the following items:


NumberDescriptionInput/OutputType
1Spooled file name InputInputCHAR(10)
2Name of the job that created the spooled fileInputCHAR(10)
3User id that created the spooled fileInputCHAR(10)
4Number of the job that created the spooled fileInputCHAR(6)
5Spooled file numberInputBINARY(4)
6Spooled file user dataInputCHAR(10)
7Name of the stream file just createdInputCHAR(128)
8Directory name in which stream file was createdInputCHAR(256)
9First page processedEingabeBINARY(4)
10Last page processedEingabeBINARY(4)
11Number of following user-definable paramEingabeBINARY(4)
12User definable parameter 1EingabeCHAR(*)
13User definable parameter 2EingabeCHAR(*)
....



User definable parameter 200EingabeCHAR(*)

The number of user definable parameters that is passed on the call is indicated by the value of parameter 11. This is followed by between 0 and 200 variable-length strings, the length of which ranges from 0 to 1024 bytes. These are equivalent to ILE RPG character variables with the VARYING attribute specified, i.e. they consist of a two-byte binary length followed by up to 1024 bytes of text.

Type 3 parameter list

The Type 3 parameter list format was introduced with Version 6 in order to provide additional information to exit programs which is often necessary for them to be able to do their job  efficiently. Specifically, in addition to the items passed for a *TYPE2 parameter list, it includes the exit point at which the call is taking place and the format to which the stream file is being converted.

Please note that *TYPE3 programs have an additional feature which does not apply to *TYPE1 or *TYPE2 exit programs. As well as being called at their normal exit point, they are called  once again at the end of processing with the exit point parameter set to *END. This is intended to provide a means of notifying the exit program that processing is complete and give it an
opportunity to perform housekeeping tasks such as closing files.

A Type 3 parameter list consists of the following items:

NumberDescriptionInput/OutputType
1Spooled file name InputInputCHAR(10)
2Name of the job that created the spooled fileInputCHAR(10)
3User id that created the spooled fileInputCHAR(10)
4Number of the job that created the spooled fileInputCHAR(6)
5Spooled file numberInputBINARY(4)
6Spooled file user dataInputCHAR(10)
7Name of the stream file just createdInputCHAR(128)
8Directory name in which stream file was createdInputCHAR(256)
9First page processedEingabeBINARY(4)
10Last page processedEingabeBINARY(4)

11

Exit point being processed EingabeCHAR(10)
12Format to which the data is being convertedEingabeCHAR(10)
13Number of following user-definable paramEingabeBINARY(4)
14User definable parameter 1EingabeCHAR(*)
15User definable parameter 2EingabeCHAR(*)
....



User definable parameter 200EingabeCHAR(*)

The number of user definable parameters that is passed on the call is indicated by the value of parameter 11. This is followed by between 0 and 200 variable-length strings, the length of which ranges from 0 to 1024 bytes. These are equivalent to ILE RPG character variables with the VARYING attribute specified, i.e. they consist of a two-byte binary length followed by up to 1024 bytes of text.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.