Please enable JavaScript to view this site.
To define your Exit Program Parameters you need to select the Exit Program Parameter icon or press 8. Using your mouse you then need to select the data, from the Input pane, that you wish to use for your parameter. If you want to include static text you just need to select a blank area of the Input pane. On the Exit Program Parameter tab of the Properties box select the parameter number from 1 to 6 or click on the Data button and enter the text in the box to the right. You may need to pass several parameters to your exit program but only receive back one. This is why the default on the Exit Program Parameter tab of the Properties box for ‘Ignore return value’ is ticked. You will need to un-check this box for each parameter that you are returning from your program. You can also choose to use a different Font and Font Colour for the returned parameter.
Note: - When returning a parameter you must return the data starting in position 1 of the returned parameter (move left in RPG), as when you specify the length of your returned parameter it will start counting positions from the left and then truncate anything after the required length.
Exit Program Parameter Properties
See General Properties for details on the General tab.
Index
Select the relevant parameter from the list. The entries PARM1 - PARM6 represent the six parameters that may be input / returned in the Exit Program with PARM1 being the first parameter passed etc.
Font
Enables altering of the parameter's font in the output document by bringing up the Font dialog box. You may also select a colour for your text if you are producing .pdf output. Click on the Colour drop down to bring up the Colour Selection.
Data
If you wish to simply pass static data in as a parameter select this Data radio button and enter the required data in the box provided.
Position (Absolute)
If you wish to pass in data from the spooled file then select the Or Position radio button and the following entries will be enabled.
Column
The horizontal position of the element in the input document.
Line
The vertical position of the element in the input document.
Force Absolute
When checked, forces the element to be positioned absolutely in the input document. This is only available if the element exists within a Loop element. See Absolute and Relative positioning for further details.
Size
Width
The width of the element in the input document in grid size units.
Ignore return value
If you do not need the returned parameter to be displayed in your output then leave this entry checked. If you wish the data to be output then uncheck this entry and alter the length of the returned information on the General tab.
Align characters to grid
When checked, forces each character to be positioned on the grid. This is most useful when a variable pitched font is used but you require columns to line up say for numeric entries.
Underline
Checking this entry will underline the parameter data on the output.
More about Parameters
If you need to pass the results of your parameters from one exit program into another exit program then, if the parameter numbers are the same this will happen automatically, if not the best way forward is to store PARM1 – 6 in Variables e.g.
STRPRM1 = ?PARM1 (where STRPRM1 is a variable name)
STRPRM2 = ?PARM2
etc.
then assign the variables to their new parameters e.g.
PARM1 = ?STRPRM2
PARM2 = ?STRPRM1
If you wish the returned parameter to be output more than once then you can use the Static Text tool and specify ?PARM1 etc. in the Text entry. For more information please refer to the topic Multiple Variable & Parameter substitution.
Note: You must define your parameters before calling your exit program. I.e. your parameters must be defined higher up the Explorer Window than the call to the exit program.