自定义CMD -Example

Example: Create a command
This example shows how to create a command to allow the system operator to call a program to start the system.
This example assumes you are using IBM-supplied source files. Do the following.
1. Enter the command definition source statement into the source file QCMDSRC using the member name of STARTUP.
CMD PROMPT('S Command for STARTUP')
2. Create the command by entering the following command.
CRTCMD CMD(S) PGM(STARTUP) SRCMBR(STARTUP)
3. Enter the source statements for the STARTUP program (the command processing program).
PGM
STRSBS QINTER
STRSBS QBATCH
STRSBS QSPL
STRPRTWTR DEV(QSYSPRT) OUTQ(QPRINT) WTR(WTR)
STRPRTWTR DEV(WSPR2) OUTQ(WSPRINT) WTR(WTR2)
SNDPGMMSG MSG('STARTUP procedure completed') MSGTYPE(*COMP)
ENDPGM
4. Create the program using the Create Bound CL Program (CRTBNDCL) command.
CRTBNDCL STARTUP
In the previous example, S is the name of the new command (specified by the CMD parameter). 
STARTUP is the name of the command processing program (specified by the PGM parameter) 
and also the name of the source member that contains the command definition statement (specified by the SRCMBR parameter). 
Now the system operator can either enter S to call the command or CALL STARTUP to call the command processing program.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值