The Start Programmer Menu command can be used for the following:
Four of the command parameters allow you to fill in the standard input fields at the bottom of the menu. These parameters are the following:
The command may be used with one or more of the parameters that control the initial values of the menu. You could design this as part of an initial program for sign-on or for situations in which a user calls a specific user-written function. The following example shows such a program, with a separate function for each application area requiring different initial values.
PGM CHGLIBL LIBL(PGMR1 QGPL QTEMP) LOOP: STRPGMMNU SRCLIB(PGMR1) OBJLIB(PGMR1) JOBD(PGMR1) MONMSG MSGID(CPF2320) EXEC(GOTO END) /* F3 or F12 to leave menu */ GOTO LOOP END: ENDPGM
The other parameters assist you in controlling the menu and its functions. For example, you can specify ALWUSRCHG(*NO) to prevent a user from changing the values that appear on the menu. This parameter should not be considered to be a security feature because a user who is using the menu can call the STRPGMMNU command and change the values in a separate call. (The user can also start functions by using F10 to call the command entry display.) If the menu is displayed by the STRPGMMNU command, you can prevent the user (by authorization) from calling the QPGMMENU program directly, but you cannot prevent the user from requesting another call of the STRPGMMNU command.
The EXITPGM and DLTOPT parameters allow you to provide your own support for the menu create option (option 3). The system may call a user program when you request option 3. IBM provides online information that discusses the parameters and the parameter list that are passed to the user program. Refer to the CL section of the Programming category in the iSeries Information Center. The following describes some typical uses of the EXITPGM parameter.
The EXITPGM parameter can be used for the following purposes:
For example, if F4 (Prompt) is not used, the EXITPGM parameter could change one or more of the create commands to specify your own default requirements. If F4 is used, the EXITPGM parameter could submit the command as entered by the programmer (with no parameters changed).
This requires scanning the value of the &RQSDTA512 parameter (which is passed to the exit program) to see if it had already been used and substituting the required value.
For example, the user parameter of the SBMJOB command could be changed to specify the value of the job description instead of the value of *CURRENT. It is also possible to retrieve the values of one or more job attributes by using the RTVJOBA command, entering the attributes as specific values.
For example, if you have a naming standard that requires all physical files to be named with 7 characters and end with a P, the exit program could reject any attempt to use the CRTPF command with a name that did not follow this standard.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.