MEMBER Statement


MEMBER statement specifies the member name or member alias of a output PDS or PDSE.

Syntax -

//SYSIN DD *
  MEMBER NAME=(name[,alias 1][,alias 2][,...])
/*

Parameters -

KeywordDescription
NAME=(name[,alias][,...])Specifies a member name and its aliases.

Practical Example -


Scenario - Split sequential file records into a PDS member along with PDS creation.

Input PS File - MATEPK.IEBGENER.INPUTPS

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
E0001    EMPLOYEE1           DIR                 LOC1      0000100000    
E0002    EMPLOYEE2           MGR       DEPT1     LOC1      0000080000    
E0003    EMPLOYEE3           MGR       DEPT2     LOC2      0000075000    
E0004    EMPLOYEE4           TL        DEPT1     LOC1      0000050000    
E0005    EMPLOYEE5           SSE       DEPT1     LOC1      0000045000    
E0006    EMPLOYEE6           SE        DEPT1     LOC1      0000034000    
E0007    EMPLOYEE7           SSE       DEPT2     LOC2      0000046000    
******************************** Bottom of Data ********************************

Code -

----+----1----+----2----+----3----+----4----+----5----+----6
//MATEPKM  JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
//             NOTIFY=&SYSUID
//************************************************************
//* COPY SEQUENTIAL FILE DATA TO PDS MEMBER
//************************************************************
//STEP10   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=MATEPK.IEBGENER.INPUTPS,DISP=SHR
//SYSUT2   DD DSN=MATEPK.IEBGENER.OUTPDS,DISP=OLD
//SYSIN    DD  *
  GENERATE MAXNAME=1
    MEMBER NAME=MEMBER5
/*

JOB Status -

 COMMAND INPUT ===>                                            SCROLL ===> CSR  
********************************* TOP OF DATA **********************************
DATA SET UTILITY - GENERATE                                                     
  GENERATE MAXNAME=1                                                            
    MEMBER NAME=MEMBER5                                                         
 
PROCESSING ENDED AT EOD                                                         
******************************** BOTTOM OF DATA ********************************

Output - MATEPK.IEBGENER.OUTPDS

VIEW       MATEPK.IEBGENER.OUTPDS(MEMBER5) - 01.00       Columns 00001 00072 
Command ===>                                                  Scroll ===> CSR  
****** ***************************** Top of Data ******************************
000001 E0001    EMPLOYEE1           DIR                 LOC1      0000100000   
000002 E0002    EMPLOYEE2           MGR       DEPT1     LOC1      0000080000   
000003 E0003    EMPLOYEE3           MGR       DEPT2     LOC2      0000075000   
000004 E0004    EMPLOYEE4           TL        DEPT1     LOC1      0000050000   
000005 E0005    EMPLOYEE5           SSE       DEPT1     LOC1      0000045000   
000006 E0006    EMPLOYEE6           SE        DEPT1     LOC1      0000034000   
000007 E0007    EMPLOYEE7           SSE       DEPT2     LOC2      0000046000   
****** **************************** Bottom of Data ****************************

Explaining Example -

  • SYSUT1 DD maps the input data set (MATEPK.IEBGENER.INPUTPS).
  • SYSUT2 DD defines the output partitioned data set (MATEPK.IEBGENER.OUTPDS).
  • SYSIN DD defines the control data set.
  • GENERATE MAXNAME=1 indicates a maximum of one names in subsequent MEMBER statements.
  • MEMBER NAME=MEMBER5 names the member as MEMBER5 and copies the input file data to the member.