0

any way i can find whether a file is migrated state within JCL ? i need to put condition in my jcl depending on the location of the file, like how we can refer the creation, reference, expiration date..

change
  • 3,400
  • 7
  • 32
  • 42
  • 1
    Is this required for your other question where DFSMSdss was suggested as the answer? If so, could you please explain in detail exactly what you are trying to accomplish? The BY keyword in DFSMSdss can handle almost every item you list above. – zarchasmpgmr Jun 06 '12 at 20:07

1 Answers1

2

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."

zarchasmpgmr
  • 1,422
  • 10
  • 21