You can create your own abbreviated commands to simplify IBM-supplied commands or to restrict the parameters allowed for users. For example, to allow users the ability to change only the printer device parameter, you can create your own Change Job (CJ) command. Following are three steps to create and implement your own CJ command:
CMD PROMPT('Change Job') PARM KWD(PRTDEV) + TYPE(*NAME) + LEN(10) + SPCVAL(*SAME *USRPRF *SYSVAL *WRKSTN) + PROMPT('Printer Device')
PGM PARM(&PRTDEV) DCL VAR(&PRTDEV) TYPE(*CHAR) LEN(10) CHGJOB PRTDEV(&PRTDEV) ENDPGM
CRTCMD CMD(CJ) PGM(CJ) SRCMBR(CJ)
You could create an abbreviated command called DW1 to start the printer writer W1.
The command definition statement is:
CMD /* Start printer writer command */
The command processing program is:
PGM STRPRTWTR DEV(QSYSPRT) OUTQ(QPRINT) WTR(W1) ENDPGM
The CRTCMD command is:
CRTCMD CMD(DW1) PGM(DW1) SRCMBR(DW1)
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.