The preceding topic described a method for creating a member in
a PDSE 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):
- Code DSORG=PS or DSORG=PSU in the DCB macro.
- In the DD statement specify the name of the PDSE where the member
is to be created, that is, DSNAME=dsname. Code other parameters as
appropriate.
- 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.
- You can update JFCBELNM with 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'.
- 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 PDSE //PDSDD DD ---,DSNAME=MASTFILE,SPACE=(TRK,(100,5,7)),
// DISP=(NEW,CATLG),DCB=(RECFM=FB,LRECL=80)---
...
RDJFCB (OUTDCB)
...
MVC JFCBELNM,NAME
...
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.