CL Programming

Creating Abbreviated Commands

Example 1

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:

Example 2

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)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]