Specifying the File Sequence Number

When a new data set is to be placed on a magnetic tape volume, you must specify the file sequence number if the data set is not the first one on the reel or cartridge. The maximum value of the file sequence number of a data set on a tape volume is 65␠535 for the following tapes:
  • Standard label (SL) tapes
  • Standard user label (SUL) tapes
  • Leading tape mark (LTM) tapes
  • Unlabeled (NL) tapes
  • Bypass label processing (BLP) tapes
Restriction: The ISO/ANSI (AL) labeled tapes do not allow a file sequence number greater than 9999.

Related reading: For additional information about using file sequence numbers, see z/OS DFSMS Using Magnetic Tapes.

You can specify the file sequence number in one of the following ways:
  • Code the file sequence number as the first value of the LABEL keyword on the DD statement or using the DYNALLOC, macro for dynamic allocation.
  • Catalog each data set using the appropriate file sequence number and volume serial number. Issue the OPEN macro because the catalog provides the file sequence number.

    OPEN uses the file sequence number from the catalog if you do not specify it on the DD statement or dynamic allocation.

  • You can use the RDJFCB macro to read the job file control block (JFCB), set the file sequence number in the JFCB, and issue the OPEN, TYPE=J macro for a new or uncataloged data set. The maximum file sequence number is 65␠535. This method overrides other sources of the file sequence number.

Related reading: For more information on the OPEN macro, see z/OS DFSMS Macro Instructions for Data Sets. For more information on the RDJFCB and OPEN, TYPE=J macros, see z/OS DFSMSdfp Advanced Services. For more information on IEHPROGM, see z/OS DFSMSdfp Utilities.