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


Creating Nonstandard PDS Member Names

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

The preceding topic described a method for creating a member in a PDS where the member name is specified on the JCL DD statement. Only member names consisting of characters from a specific character set may be specified in JCL. Please refer to the book z/OS MVS JCL Reference, topic "Character Sets" for a complete description of the supported character set. If your application has a need to create member names with characters outside the character set supported by JCL you should either use BPAM and issue your own STOW macro, or use BSAM or QSAM while following this procedure (see Figure 1 for an example):

  1. Code DSORG=PS or DSORG=PSU in the DCB macro.
  2. In the DD statement specify the name of the PDS where the member is to be created, that is, DSNAME=dsname. Code other parameters as appropriate.
  3. In your program issue an RDJFCB macro to obtain a copy of the JFCB control block, this represents your JCL DD statement. The RDJFCB macro is described in z/OS DFSMSdfp Advanced Services.
  4. You can update JFCBELNM with a member name consisting of characters that are not limited to those which can be specified in JCL. The member name cannot consist of bytes that all are X'FF'.
  5. Process the member with an OPEN TYPE=J macro, a series of PUT or WRITE macros, and the CLOSE macro. The system issues a STOW macro when the data set is closed.
    Note: If the member name specified in JFCBELNM begins with '+' (X'4E'), '-' (X'60'), or X'Fx', the system does not issue the STOW macro. CLOSE will interpret '+' (X'4E'), '-' (X'60'), or X'Fx' in JFCBELNM as an indication that the data set is a generation data set (GDS) of a generation data group (GDG).
Figure 1. Creating A Nonstandard member name in a PDS
 //PDSDD  DD    ---,DSNAME=MASTFILE,SPACE=(TRK,(100,5,7)),     
 //             DISP=(NEW,CATLG),DCB=(RECFM=FB,LRECL=80)---  
             ...                                                        
             RDJFCB  (OUTDCB)                                             
             ...
             MVC    JFCBELNM,NAME
             OI     JFCBIND1,JFCPDS    Set JFCB flag indicating member name provided                                        
             ...
             OPEN       (OUTDCB,(OUTPUT)),TYPE=J
              ...
              PUT   OUTDCB,OUTAREA     Write record to member               
              ...
              CLOSE (OUTDCB)           Automatic STOW                       
              ...
     OUTAREA  DS    CL80               Area to write from                   
     OUTDCB   DCB   ---,DSORG=PS,DDNAME=PDSDD,MACRF=PM                      
     NAME   DC   XL8'0123456789ABCDEF' 

If the preceding conditions are true but you code DSORG=PO (to use BPAM) and your last operation on the DCB before CLOSE is a STOW macro, CLOSE does not issue the STOW macro.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014