Where allowed to run: Interactive environments (*INTERACT *IPGM *IREXX *EXEC) Threadsafe: No |
Parameters Examples Error messages |
The Start Programmer Menu (STRPGMMNU) command shows the programmer menu. This command can be used instead of the CALL QPGMMENU function, and allows you to pass parameters to specify and control the data which appears in the associated fields on the programmer menu.
NOTES:
More information about using the Programmer Menu is in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
SRCFILE | Source file | Name, *DFT | Optional, Positional 1 |
SRCLIB | Source library | Name, *LIBL, *CURLIB | Optional, Positional 2 |
OBJLIB | Object library | Name, *DFT, *CURLIB | Optional, Positional 3 |
JOBD | Job description | Name, *USRPRF | Optional, Positional 4 |
ALWUSRCHG | Allow changes | *YES, *NO | Optional |
EXITPGM | Option 3 exit program | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Option 3 exit program | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
DLTOPT | Delete option | *DLT, *PROMPT, *NODLT | Optional |
Top |
Specifies an existing source file that contains source file members to be updated or to which new source file members are to be added.
Top |
Specifies the library that is searched for the source file.
Top |
Specifies the library that is to contain the object.
Top |
Specifies the job description used with the job being submitted.
Top |
Specifies whether the menu display fields you specified on the previous parameters in this command can be changed by the user.
Top |
Specifies the user-written program that is called as an exit program in place of submitting a batch job when menu option 3 is selected. When the exit program is called, it receives parameters that are sent by the programmer menu. More information about the EXITPGM parameter is in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Single values
Qualifier 1: Option 3 exit program
Qualifier 2: Library
Top |
Specifies the action to be taken when:
Regardless of the value specified, the system passes a parameter (from among the parameters passed from the Programmer Menu) to the exit program that specifies whether the object exists.
NOTES:
BAS C CBL CBL36 CLP DSPF DSPF36 FTN ICFF MNU36 MSGF36 PAS PLI PRTF RPG RPG36 RPT36
|-----------+----------+---------+------------| | DLTOBJ | F11 | Object | Value | | Specified | Required | Deleted | Passed | | | | | to Exit | | | | | Program | |-----------+----------+---------+------------| | If object | | | existed | | | when | | | option 3 | | | was | | | selected | | |--------------------------------+------------| | *DLT | Yes | Yes | 1 | |-----------+----------+---------+------------| | *PROMPT | Yes | No | 0 | |-----------+----------+---------+------------| | *NODLT | No | No | 0 | |-----------+----------+---------+------------| | If object | | | did not | | | exist when | | | option 3 | | | was | | | selected | | |--------------------------------+------------| | *DLT | No | --- | 2 | |-----------+----------+---------+------------| | *PROMPT | No | --- | 2 | |-----------+----------+---------+------------| | *NODLT | No | --- | 2 | |-----------+----------+---------+------------| |
Top |
Example 1: Displaying Programmer Menu
STRPGMMNU
This command displays the Programmer Menu with defaults for all parameters. This has the same result as entering CALL QPGMMENU.
Example 2: Preventing Values from Being Changed
STRPGMMNU SRCFILE(YOURFILE) SRCLIB(YOURLIB) OBJLIB(YOURLIB) JOB(YOURJOBD) ALWUSRCHG(*NO)
This command prevents the values on the menu from being changed from those specified on the command.
Example 3: Calling an Exit Program
STRPGMMNU EXITPGM(OPT3PGM) DLTOPT(*PROMPT)
This command calls user exit program OPT3PGM instead of submitting a batch job when option 3 is specified. If the object already exists, DLTOPT(*PROMPT) requires the user to press the F11 key; however, the object is not deleted.
Example 4: Receiving Parameters
The following portion of a CL program is an example of how these parameters would be received by a user exit program. If the specified type is one of those listed, the object is not deleted. The create command with REPLACE(*YES) specified is passed to the exit program. The value passed to the exit program is 0.
PGM PARM(&OPTION &PARM &TYPE &PARM2 &SRCFILE + &SRCLIB &OBJLIB &JOBD &RQSLEN &RQSDTA512 + &F4 &F11 &EXIST) /* The following values are passed in exactly as */ /* they appear on the Programmer Menu. */ DCL VAR(&OPTION) TYPE(*CHAR) LEN(2) DCL VAR(&PARM) TYPE(*CHAR) LEN(10) DCL VAR(&TYPE) TYPE(*CHAR) LEN(10) DCL VAR(&PARM2) TYPE(*CHAR) LEN(21) DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) DCL VAR(&OBJLIB) TYPE(*CHAR) LEN(10) DCL VAR(&JOBD) TYPE(*CHAR) LEN(10) /* The following values are derived by QPGMMENU */ /* from the information entered to the above fields */ /* and the F keys. */ /* NUMBER OF BYTES OF REQUEST DATA */ DCL VAR(&RQSLEN) TYPE(*DEC) LEN(3 0) /* DATA FOR RRQSDTA PARAMETER OF SBMJOB COMMAND. */ DCL VAR(&RQSDTA512) TYPE(*CHAR) LEN(512) /* F4 WAS PRESSED, '1', OTHERWISE '0'. */ DCL VAR(&F4) TYPE(*CHAR) LEN(1) /* F11 WAS PRESSED, '1', OTHERWISE '0'. */ DCL VAR(&F11) TYPE(*CHAR) LEN(1) /* OBJECT EXISTS- '0 OBJECT WAS DELETED- '1' OR OBJECT DID NOT EXIST -'2'*/ DCL VAR(&EXIST) TYPE(*CHAR) LEN(1)
Additional information, along with examples of the STRPGMMNU command with the EXITPGM parameter, can be found in the CL Programming book in the Information Center.
Top |
None
Top |