Skip to main content
Skip table of contents

Example of an exit program of type 1 (RPGLE)

The example program shows how an exit program can be used in CVTSPL in order to create meaningful names for data stream files generated with this command. In CVTSPL it is given with the following syntax:

CODE
EXITPGM(*LIBL/EXITREN *TYPE1)

 

It is assumed that option EXITPGMPRM(*POS) or EXITPGMPRM(*KEY) is used to extract details from a report, which is then given to the exit program in the ninth place of the EXITPGMPRM parameter. Details might be client names, reference number, invoice number, etc.

CODE
EXITPGMPRM(*POS)
EXITPGMPOS((*ALL 10 60 10 *ROWCOL))

 

The data stream file is renamed. The name given by CVTSPL turns into the name nnnnnnn.pdf, whereas nnnnnnn is the number extracted from the report that was transmitted as parameter. The source file of the following program can be found in the i-effect®working library in the QRPGLESRC file.

Example-of-a-Type-1-Exit-Program-RPGLE.pdf

JavaScript errors detected

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

If this problem persists, please contact our support.