JCL to create members using Flat File

 

 
 
 
 
 
 
 
JCL to create members using Flat File
 
 
When I shared a tip to unload members from a PDS to PS, a lot of users were prompted to ask how to do the other way round.  
 
I think you will have to maneuver with PS file created using the IEBPTPCH and you can feed it as SYSIN card in the following JCL.
 
I am leaving it up to you and use your creativity to convert the flat file (created by IEBPTPCH) so that it can be used as SYSIN card here.
 
Note:- The following JCL would however be reading a member instead of a physical sequential file. I could not make a PS work here, it always abended with S013.
 
The following JCL will read the data provided as SYSIN in the member. You can click here
; ; ; ;
 
 
//IEBUPDTE EXEC PGM=IEBUPDTE,PARM=NEW                     
//SYSPRINT DD SYSOUT=*                                    
//SYSUT2   DD DISP=(NEW,CATLG),DSN=USERID.NEW.PDS,
//         SPACE=(CYL,(5,5,5),RLSE),                      
//         RECFM=FB,LRECL=80,BLKSIZE=0                    
//SYSIN    DD DSN=USERID.OLD.PDS(CARDIN),DISP=SHR
/*                                               
 
 
The contents of SYSIN are as follows
 
 
./ ADD NAME=MEMBER1                 
TEXT IN MEMBER ONE WILL COME HERE   
./ ENDUP                            
 
 
This will create a PDS with member name MEMBER1 in the new pds
USERID.NEW.PDS
 
 
You can go through the IBM manual to know more about 
IEBUPDTE