免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: i400as
打印 上一主题 下一主题

RCVF的用法 [复制链接]

论坛徽章:
0
31 [报告]
发表于 2008-12-08 15:17 |只看该作者
原帖由 digitalchina 于 2008-12-8 15:07 发表
*LDA  不用,用 *PGA  试试.


不行耶。三个参数都试过,GTA还是取不到值,*PGA提示说,程序没有重新启动。

论坛徽章:
0
32 [报告]
发表于 2008-12-08 15:20 |只看该作者
你DEBUG 看看LDA 和你的PF有多大差别. 估计是PF内容造成.

论坛徽章:
0
33 [报告]
发表于 2008-12-08 15:22 |只看该作者
WRKACTJOB JOB(jobname)


如果为空就表示你要的JOB不是ACTIVE,
反之就可以删除, 而且这样做得到的PF内容比较规整.

论坛徽章:
0
34 [报告]
发表于 2008-12-08 15:30 |只看该作者
原帖由 digitalchina 于 2008-12-8 15:20 发表
你DEBUG 看看LDA 和你的PF有多大差别. 估计是PF内容造成.



大哥,我没懂你的意思哦。

STRSQL可以看到,CPYSPLF是成功的,JOBENDP的数据和WRKACTJOB的数据是一样的。

我不太明白
0022.00              CHGDTAARA  DTAARA(*LDA) VALUE(JOBENDP)            
0023.00              RTVDTAARA  DTAARA(*LDA (16 10)) RTNVAR(&JOBNAME)   的位置应该如何算?


                                                        Display Spooled File                                                        
File  . . . . . :   QPDSPAJB                                                                             Page/Line   1/1           
Control . . . . .                                                                                        Columns     1 - 130      
Find  . . . . . .                                                                                                                  
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1....+....2....+....3
  5722SS1 V5R3M0 040528                  Work with Active Jobs                                    8/12/08 15:25:14        Page    1
  Reset . . . . . . . . . . . . . . . . . :   *NO                                                                                   
  Subsystems  . . . . . . . . . . . . . . :   *ALL                                                                                 
  CPU Percent Limit . . . . . . . . . . . :   *NONE                                                                                 
  Response Time Limit . . . . . . . . . . :   *NONE                                                                                 
  Sequence  . . . . . . . . . . . . . . . :   *SBS                                                                                 
  Job name  . . . . . . . . . . . . . . . :   *ALL                                                                                 
  CPU %  . . . :      .          Elapsed time . . . . . . . :   000:00:0           Active jobs . . . . . . :     52                 
                                                                  --------Elapsed---------                                          
  Subsystem/Job  User        Number   Type  Pool   Pty      CPU   Int    Rsp   AuxIO  CPU%   Function         Status  Threads      
  QBATCH         QSYS        359014   SBS     2     0       1.9                    0    .0                     DEQW         1      

请问这个位置是指行数?

论坛徽章:
0
35 [报告]
发表于 2008-12-08 15:34 |只看该作者
The Retrieve Data Area (RTVDTAARA) command is used in a CL program or REXX procedure to retrieve all or part of a specified data area and copy it into a variable. RTVDTAARA does not retrieve any other attributes of the data area. Existence of the data area is not required at the time the CL program is compiled.

If the job is a group job, the data area specified may be the group data area (*GDA). This data area is automatically associated with the group, and it is inaccessible from jobs outside the group. The length of this character data area is 512 bytes.

A local data area (*LDA) is a character data area that is 1024 bytes in length, and it is automatically associated with the job. Another job cannot access the local data area.

If the job is a prestart job, the data area specified may be the data area that contains program initialization parameter data (*PDA). This data area is automatically associated with the prestart job and is inaccessible from other jobs. The length of this character data area is 2000 bytes.

When a data area other than a local data area, group data area, or program initialization parameter data area must be retrieved during the processing of the RTVDTAARA command, the data area is locked during the retrieval operation so that commands in other jobs cannot change or destroy it until the operation is complete. If the data area is shared with other jobs and is updated in steps involving more than one command in a job, the data area should be explicitly allocated to that job until all the steps have been performed. A data area other than a local data area, group data area, or program initialization parameter data area can be explicitly allocated with the Allocate Object (ALCOBJ) command. No allocation is necessary for a local data area, group data area, or program initialization parameter data area.

Restrictions

1. To use this command, the user must have *USE authority for the data area and *EXECUTE authority for the library where the data area is located. No specific authority is required to retrieve the value of a local data area or group data area.

2. This command is conditionally threadsafe. The following restrictions apply:
   a. Retrieving DDM data areas in a job that allows multiple threads is not threadsafe.
   b. Retrieving DDM data areas will fail when more than one thread is active in a job.


是不是你的WRKACTJOB 得到的结果太长了? *LDA 只有1024字节.

论坛徽章:
0
36 [报告]
发表于 2008-12-08 15:37 |只看该作者
Assume data area DA1 has been created by the following command:

CRTDTAARA DTAARA(DA1) TYPE(*CHAR) LEN(3) VALUE(ABC)

and variable &CLVAR1 has been declared as:

DCL VAR(&CLVAR1) TYPE(*CHAR) LEN(5) VALUE(VWXYZ)



Example 1: Retrieving a Character Data Area

RTVDTAARA DTAARA(DA1) RTNVAR(&CLVAR1)

results in: &CLVAR1 = ’ABC ’


Example 2: Retrieving a Subset of a Character Data Area

RTVDTAARA DTAARA(DA1 (2 1)) RTNVAR(&CLVAR1)

results in: &CLVAR1 = ’B   ’



Example 3: Retrieving a Decimal Data Area Assume data area DA2 has been created with the following attributes:

CRTDTAARA DTAARA(DA2) TYPE(*DEC) LEN(5 2) VALUE(12.39)

and variable &CLVAR2 has been declared as:

DCL VAR(&CLVAR2) TYPE(*DEC) LEN(5 1) VALUE(4567.

Running this command:
RTVDTAARA DTAARA(DA2) RTNVAR(&CLVAR2)

results in: &CLVAR2 = 0012.3

Note: Fractional digits are truncated instead of rounded.

希望对你有帮助.

论坛徽章:
0
37 [报告]
发表于 2008-12-08 15:43 |只看该作者
Example 3: Changing Specific Characters of the Local Data Area

CHGDTAARA DTAARA(*LDA (5 4)) VALUE(’TWO’)

This command changes characters 5 through 8 of the user’s local data area.

论坛徽章:
0
38 [报告]
发表于 2008-12-08 16:03 |只看该作者
如果不用CHGDTAARA,有什么办法可以取得JOBENDP中JOBNAME的值?谢谢。

JOBENDP的格式是*print的格式。

[ 本帖最后由 i400as 于 2008-12-8 16:05 编辑 ]

论坛徽章:
0
39 [报告]
发表于 2008-12-08 16:15 |只看该作者
digitalchina  还在不?

如果不用CHGDTAARA,有什么办法可以取得JOBENDP中JOBNAME的值?谢谢。

JOBENDP的格式是*print的格式。

论坛徽章:
0
40 [报告]
发表于 2008-12-08 16:19 |只看该作者
在CLP中使用RUNSQLSTATMENT 用SQL语句去查PF

然后再CALL , 不过好象有点麻烦,暂时只想到这么多了.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP