Using missing parameters on the LANSA SUBMIT command
| Date: | Archived |
|---|---|
| Product/Release: | LANSA/AD Release 6.5 or later |
| Abstract: | The LANSA SUBMIT command does not have all the possible parameters that the AS/400 CL command SBMJOB has. However, all the possible extra parameters can be defined via a special User Exit Program. |
| Submitted By: | LANSA Technical Support |
A data area called DC@A07 exists in the LANSA program library (usually DC@PGMLIB). Positions 621 to 630 are reserved for the name of the User Exit program to be used in conjunction with the LANSA SUBMIT command. If the User Exit program is defined in the data area, SUBMIT will call the User Exit program first. In this program the user can add or change parameters for the CL command SBMJOB which the SUBMIT command will then use.
Example of a CL User Exit Program for the SUBMIT command:
/* ****************************************/
/* Program: LANSASBM */
/* Description: User Exit Program for SUBMIT command */
/* **********************************************************/
PGM PARM(&VAR2000)
/* Declare parameters */
DCL VAR(&VAR2000) TYPE(*CHAR) LEN(2000) /* +
'Parameter containing the SBMJOB command +
about to be used' */
CHGVAR VAR(&VAR2000) VALUE(&VAR2000
*BCAT 'HOLD(*YES)')
ENDPGM
Example LANSA function used to test the User Exit Program:
* ********* Beginning of RDML commands **********
FUNCTION OPTIONS(*DIRECT)
DEFINE FIELD(#TEXT) TYPE(*CHAR) LENGTH(40)
CHANGE FIELD(#TEXT) TO('Press Enter to
submit this job!')
IF COND('*JOBMODE =I')
REQUEST FIELDS((#TEXT *NOID))
SUBMIT PROCESS(RENE) FUNCTION(TSTSBM)
ELSE
MESSAGE MSGTXT('Test the User Exit Program
option for SUBMIT')
ENDIF
* ********* End of RDML commands**********
A few hints:
- The User Exit Program will be executed by all LANSA functions which use SUBMIT.
- It is loaded into memory when LANSA is started. Any changes made to this program will only become effective when LANSA is (re)started.