Example: Creating abbreviated printer writer command

This example shows how to define and create an abbreviated command.

Note: By using the code example, you agree to the terms of the Code license and disclaimer information.

You can 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 Create Command (CRTCMD) command is:

CRTCMD CMD(DW1) PGM(DW1) SRCMBR(DW1)