CLIST可以访问PDS成员和GDG文件吗?

发布于 2024-09-14 18:19:53 字数 270 浏览 3 评论 0原文

我需要检查 GDG 文件中的字符串,例如,检查文件 AAA.BBB.CCC.DDD(0) 中的“ABCDEFG”。

如果是,则将此字符串“ABCDEFG”附加到 PDS 成员的底部:

ABD.EFG.HIG(NAMES)。

如果两个文件都是PSD文件,就没有问题,当我更改为GDG和PDS成员时,它不起作用。

我的 Clist 程序无法分配 gdg 文件,也无法附加到成员。当我将文件分配给 SHR 和 OLD 时,它覆盖了该成员。 MOD 不适用于会员文件。

I need to check a string in a GDG file, for example, to check 'ABCDEFG' in file : AAA.BBB.CCC.DDD(0).

IF YES, append this string 'ABCDEFG' to the bottom of a PDS member:

ABD.EFG.HIG(NAMES).

IF BOTH FILES ARE PSD FILES, there is no problem, while I changed to GDG and PDS member, it didn't work.

My Clist program can not allocate a gdg file, and also can not append to a member.It overided the member, when i allocated the file to SHR and OLD. MOD didn't work to a member file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

后eg是否自 2024-09-21 18:19:53

clist 可以访问 GDG,但您必须将文件名从 gdg 相对引用 (0) 转换为完全限定的数据集名称。在您的示例中,您需要将该文件引用为:AAA.BBB.CCC.DDD.G1234V00(其中 G1234V00 是最新版本标识符)。

通常,您可以通过编写例程来在数据集上运行 LISTCAT 命令、SYSTRAP 输出然后将完全限定名称解析为 CLIST 变量来完成此操作。

示例:

PROC 0

  /* This illustrates a basic clist method using SYSTRAP */
  /* to extract a fully qualified GDG dataset name       */ 

     CONTROL NOFLUSH NOPROMPT NOLIST NOCONLIST NOSYMLIST NOMSG MAIN 

  /* Target dataset name */
     SET GDG = 'RAPP.RAP000.YQ.TAX.YQINFO.BK'                       

  /* SET SYSTRAP LIMIT and execute IDCAMS LISTC command */
     SET &SYSOUTTRAP = 300                                          
     LISTC ENTRIES(&GDG)                                            

  /* Calculate line number of last entry in LISTC results */
     SET &I = &SYSOUTLINE-21

  /* calculate ending position of GDG name in report */
     SET &L = &LENGTH(&GDG) + 23

  /* extract SYSTRAP data into clist string variable */
     SET &C = &&SYSOUTLINE&I

  /* substring data from SYSTRAP line into clist variable and list */
     SET &D = &SUBSTR(17:&L,&STR(&C))                               
     WRITE &D                                                       
END 

输出示例...

RAPP.RAP000.YQ.TAX.YQINFO.BK.G8203V00


The clist can access a GDG but you have to convert the file name from a gdg relative reference (0) to a fully qualified dataset name. In your examble, you would need to reference the file as: AAA.BBB.CCC.DDD.G1234V00 (where G1234V00 is the most current version Identifier).

Typically you can do this by writing a routine to run a LISTCAT command on the dataset, SYSTRAPing the output and then parsing the fully qualified name into a CLIST variable.

Example:

PROC 0

  /* This illustrates a basic clist method using SYSTRAP */
  /* to extract a fully qualified GDG dataset name       */ 

     CONTROL NOFLUSH NOPROMPT NOLIST NOCONLIST NOSYMLIST NOMSG MAIN 

  /* Target dataset name */
     SET GDG = 'RAPP.RAP000.YQ.TAX.YQINFO.BK'                       

  /* SET SYSTRAP LIMIT and execute IDCAMS LISTC command */
     SET &SYSOUTTRAP = 300                                          
     LISTC ENTRIES(&GDG)                                            

  /* Calculate line number of last entry in LISTC results */
     SET &I = &SYSOUTLINE-21

  /* calculate ending position of GDG name in report */
     SET &L = &LENGTH(&GDG) + 23

  /* extract SYSTRAP data into clist string variable */
     SET &C = &&SYSOUTLINE&I

  /* substring data from SYSTRAP line into clist variable and list */
     SET &D = &SUBSTR(17:&L,&STR(&C))                               
     WRITE &D                                                       
END 

Example output...

RAPP.RAP000.YQ.TAX.YQINFO.BK.G8203V00


~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文