有什么方法可以在 JCL 中找到文件是否处于迁移状态?我需要根据文件的位置在我的 jcl 中添加条件,例如我们如何引用创建、引用、到期日期..
1 回答
JCL does not have the ability to query attributes; it is merely a method of referencing where data is, or specifying criteria for creating data.
If you need this type of information, it sounds like you need a REXX procedure. REXX is the primary scripting language for IBM mainframe operating systems. (There are implementations for the LUW world.) In REXX, you have access to several items which can help you:
- IGGCSI00, the Catalog Interface - this is an interface to most of the data returned by the IDCAMS LISTCAT command.
- The SYSDSN() function, which is a quick way of determining whether or not a data set exists (along with a few extra status values)
- The LISTDSI() function, which once you validate with SYSDSN(), retrieves many different pieces of information about a data set. Most of what you are looking for is there.
IGGCSI00 is documented in the DFSMS Managing Catalogs book, in the chapter called "Catalog Search Interface User's Guide". The other two are documented in the "TSO/E REXX Reference."