需要使用JCL在PDS文件中搜索成员 [英] Need to search a member in PDS file using JCL

查看:225
本文介绍了需要使用JCL在PDS文件中搜索成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助来创建JCL,以在PDS文件中搜索当前年份的成员(即RPxxxx,其中xxxx表示2018年).每年由使用PDS文件的年度工作创建的新成员.因此,成员名称在PDS文件中不是固定的,即后缀每年更改一次.

I need a help to create a JCL to search the current year member (I.e. RPxxxx Where xxxx denote the year 2018) in a PDS file. A new member created on every year by the yearly job which used the PDS file. Hence the member name is not fixed in PDS file I.e. suffix has been changed in every year.

我们需要创建一个JCL,以检查PDS文件中当前年份的成员是否存在.因此,后续作业将成功运行.

We need to create a JCL which check if the current year member present or not in the PDS file. So the successor job will run successfully.

如果当前年份成员存在于PDS文件中,则新作业将以RC 0000运行,这表明将自动触发后继作业.

If the current year member present in the PDS file then the new job will run with RC 0000 which indicate the successor job will be triggered automatically.

如果PDS文件中不存在任职年份成员,则该作业将失败,并显示RC 0001,这表示直到该作业成功恢复后,才会触发下一个后续作业.

If the curr year member is not present in the PDS file then the job will fail with RC 0001 which indicates the next successor job will not trigger until this job recovered successfully.

请帮助我创建这样的JCL.

Please help me to create such JCL.

非常感谢您的帮助.

先谢谢了.

推荐答案

LISTDS(一种TSO功能)显示数据集属性.您可以利用IKJEFT01实用程序(可让您批量运行TSO功能)&运行此TSO功能.但是,LISTDS发出的返回码不是您想要的.

LISTDS, a TSO function, display data set attributes. You can make use of the IKJEFT01 utility (which allows you to run TSO functions in batch) & run this TSO function. However, the Return codes issued by LISTDS are not what you want.

因此,我建议使用IKJEFT01实用工具运行如下所示的REXX脚本,以评估PDS中成员的存在.

So, I would suggest to run a REXX script like the below using IKJEFT01 utility to evaluate the presence of member in a PDS.

/* REXX */         
arg dsname         
address tso        
"listds ("dsname")"
if (rc \= 0) then  
exit 1              

运行的JCL如下所示.

The run JCL would look like the below.

//JOBNAME    JOB ('ACCOUNTING INFORMATION'),
//     CLASS=2,MSGCLASS=H,NOTIFY=&SYSUID    
//P1 EXEC PGM=IKJEFT01                      
//SYSPROC DD DSN=YOUR.REXX.LIB,DISP=SHR     
//SYSTSPRT DD SYSOUT=*                      
//SYSTSIN DD *                              
  %EMPTY7 'YOUR.PDS(RPXXXX)'                  
/*    

SYSTSIN DD中的

EMPTY7 是REXX脚本的名称. SYSPROC DD中提供的库将存储您的REXX脚本.

EMPTY7 in SYSTSIN DD is the name of the REXX script. Library given in the SYSPROC DD is where your REXX script will be stored.

如果您需要更多详细信息,请告诉我.

Let me know if you need more details.

这篇关于需要使用JCL在PDS文件中搜索成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆