z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Creating a PDSE Member with BSAM or QSAM

z/OS DFSMS Using Data Sets
SC23-6855-00

If you do not need your program to add user data entries to the directory, you can write a member without using the STOW macro, as shown in Figure 1.
Figure 1. Creating One Member of a PDSE
   //PDSEDD DD    DSNAME=MASTFILE(MEMBERK),SPACE=(TRK,(100,5,7)),
   //             DISP=(NEW,CATLG),DCB=(RECFM=FB,LRECL=80,BLKSIZE=80),
   //             DSNTYPE=LIBRARY,STORCLAS=S1P01S01,---
            ...
            OPEN  (OUTDCB,(OUTPUT))
            ...
            PUT   OUTDCB,OUTAREA     Write record to member
            ...
            CLOSE (OUTDCB)           Automatic STOW
            ...
   OUTAREA  DS    CL80               Area to write from
   OUTDCB   DCB   ---,DSORG=PS,DDNAME=PDSEDD,MACRF=PM

You can use the same program to allocate either a sequential data set or a member of a PDS or PDSE with only a change to the JCL, as follows:

  1. The PDSE might be system managed. Specify a STORCLAS in the DD statement for the PDSE, or let the ACS routines direct the data set to system-managed storage.
  2. Code DSORG=PS in the DCB macro.
  3. Specify in the DD statement that the system is to store the data as a member of a PDSE; that is, DSNAME=name(membername).
  4. Either specify a data class in the DD statement or allow the ACS routines to assign a data class.
  5. Use an OPEN macro, a series of PUT or WRITE macros, and the CLOSE macro to process the member. When the data set is closed, the system issues a STOW macro.

As a result of these steps, the data set and its directory are created, the records of the member are written, and an entry is automatically made in the directory with no user data.

A PDSE becomes a PDSE program library when the binder stores the PDSE's first member.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014