4、CL programming (二)

一、Passing parameter in CL

Ü   PASSING THE PARAMETER IN CL

PGM(CTO04R00)


二、QCMDEXC API

Ü  QCMDEXC

 

·        This is an API to execute command from HLL.

·        We can change the command at run time.

·        The commands that are only used in CL programare not permissible here.

·        Below is the process on how to use this API.

D CMD             S              1    DIM(75) CTDATA PERRCD(75)
D CMDLEN          S             15 5
C                   EVAL      CMDLEN = %LEN(%TRIM(CMD))
C* Execute Command  using QCMDEXC
C                   CALL      'QCMDEXC'
C                   PARM                    CMD
C                   PARM                    CMDLEN

 Example


OUTPUT

 Dataqueue DTAQ000 is deleted from IROBO1.


三、Example-SNDF,RCVF,SNDRCVF

Ü   To read from the database file and then writeit on the screen.

Below is the display file that hasbeen used in the program:


***NOTE:  We can use SNDRCVFinstead of SNDF and RCVF.

          SNDRCVF is used onlyfor display file.

 OUTPUT

We press ENTER to get the screen below:



四、Example RCVF

ÜCL program toread a database file and display its field’s value on the console & promptevery time before reading a new record from the file

 Ø  Physical file used in theprogram = CUST

Ø  CL Program


OUTPUT

 Below is the output that we get on the console.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值