免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 25097 | 回复: 26
打印 上一主题 下一主题

RCVF的用法 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2008-12-08 11:40 |显示全部楼层
RCVF rcdfmt(JOBENDP)

论坛徽章:
0
2 [报告]
发表于 2008-12-08 11:50 |显示全部楼层
RCVF file(JOBENDP) wait(*no)

论坛徽章:
0
3 [报告]
发表于 2008-12-08 12:01 |显示全部楼层
RCVF   wait(*no)

论坛徽章:
0
4 [报告]
发表于 2008-12-08 13:37 |显示全部楼层
要不你把代码贴全,我们试试 .

[ 本帖最后由 digitalchina 于 2008-12-8 13:39 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-12-08 13:42 |显示全部楼层
DCLF FILE(INPUT) OPNID(INFILE1)
:
RCVF OPNID(INFILE1)

论坛徽章:
0
6 [报告]
发表于 2008-12-08 13:44 |显示全部楼层

看看有没有用?

Example 1: Receive Data from Database File

DCLF FILE(MENU1)
:
RCVF OPNID(*NONE) The CL procedure receives data from the database file named MENU1. The RCVF command is associated with the Declare File command that does not have an open file identifier specified.



Example 2: Receive Data from Display Device

DCLF FILE(SCREENX) RCDFMT(R1 R2)
:
RCVF DEV(DISPLAY2) RCDFMT(R1)

The CL procedure receives data from the user at the display station named DISPLAY2. The data is received in the record format named R1 in the device file named SCREENX. The procedure waits for the user data before it continues processing.



Example 3: Handling End-of-File Exception

DCLF FILE(INPUT) OPNID(INFILE1)
:
RCVF OPNID(INFILE1)
MONMSG CPF0864 EXEC(GOTO EOF)

The CL procedure receives a record sequentially from the database file named INPUT. The procedure monitors for the end-of-file exception CPF0864 and goes to label EOF when the message is received.



Example 4: Using RCVF with WAIT command

DCLF FILE(MSCREEN) RCDFMT(MIN1 MIN2 MIN3)
:
RCVF DEV(&DNAME) RCDFMT(MIN2) WAIT(*NO)
WAIT DEV(&DNAME)

The CL procedure receives user data from several devices one at a time by way of the device file named MSCREEN. The procedure receives data from the device named in the variable &DNAME using the record format MIN2, but it does not wait for the data to come in. The same RCVF command is used to receive data from several devices; because the CL variable &DNAME is used, only the device name in the DEV parameter must be changed each time the command is run. A WAIT command for each device must be issued later in the procedure because the WAIT command actually receives the data. Both the RCVF and the WAIT commands may be processed for each device (one at a time) to send data to the procedure. If a user response is delayed, the commands can be processed as many times as necessary until the user responds with the data or a End Receive (ENDRCV) command cancels the request.

论坛徽章:
0
7 [报告]
发表于 2008-12-08 14:02 |显示全部楼层
你不是用过 SNDRCVF    RCDFMT(ENDJOB)      ?

这里还是用它.

论坛徽章:
0
8 [报告]
发表于 2008-12-08 14:15 |显示全部楼层
你的程序不全,太多地方要改.

不过我看了下SPOOL FILE

400-              DCLF       FILE(TESTLIBL/ACTJOBLIST)                 
     QUALIFIED FILE NAME - TESTLIBL/ACTJOBLIST                        
        RECORD FORMAT NAME - ACTJOBLIST                              
          CL VARIABLE     TYPE     LENGTH     PRECISION     TEXT     
           &ACTJOBLIST    *CHAR     200                              

从这里可以看到RCDFMT 是和文件名一样的.

论坛徽章:
0
9 [报告]
发表于 2008-12-08 14:25 |显示全部楼层
dspfd  JOBENDP


看看它的RCDFMT 是什么?

论坛徽章:
0
10 [报告]
发表于 2008-12-08 14:42 |显示全部楼层
看懂你的意思了,不过我这里不支持 OPNID()


你可不可以用RTVJOBA 来看指定的JOB状态,如果活动就把他END ?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP