Need help in creating the jcl thru rexx

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
User avatar
Krishna556
New Member
Posts: 1
Joined: Tue Dec 15, 2020 10:38 pm

Need help in creating the jcl thru rexx

Post by Krishna556 »

Hi Team,

We need to create the jcl to delete 100's of programs from multiple libraries so one my friend suggested me to use REXX.
I'm very new to rexx. Please help me on this.

Requirement is
1. PS file1 will have list of PDS for taking backup and deleting the components.

PS File1:

Code: Select all

AAAAAA.BBBBBB.CCCCCC ====> PDS1
BBBBBB.CCCCCC.DDDDDD ====> PDS2
CCCCCC.DDDDDD.EEEEEEE ====> PDS3
DDDDDD.EEEEEEE.FFFFFFFFF ====> PDS4
2. PS file2 will have list of members to copy and delete.
PS FIle2:

Code: Select all

MEM1
MEM2
MEM3
MEM4
MEM5
3.Another PDS to create the JCL.

Code: Select all

AAA.BBB.CCC.DDD
JCL should be as below in PDS as AAA.BBB.CCC.DDD(DELJCL1):

Code: Select all

//S010   EXEC PGM=IEBCOPY                       
//SYSPRINT DD SYSOUT=*                          
//INDD     DD DISP=SHR,DSN=AAAAAA.BBBBBB.CCCCCC ===> PDS1
//OUTDD    DD DSN=BBBBBB.CCCCCC.DDDDDD,              ====> PDS2
//            DISP=(NEW,CATLG,DELETE),          
//            UNIT=SYSDA,DCB=*.INDD,            
//            SPACE=(CYL,(20,20,20),RLSE)       
//*                                             
//SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(5,5))      
//SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(5,5))      
//*                                             
//SYSIN DD *                                    
 COPY INDD=((INDD,R)),OUTDD=OUTDD               
 SELECT MEMEBR=MEM1
 SELECT MEMEBR=MEM2
 SELECT MEMEBR=MEM3
 SELECT MEMEBR=MEM4
 SELECT MEMEBR=MEM5
//* 
//S020     EXEC PGM=DELMEM                 
//*                                        
//SYSOUT   DD SYSOUT=*                     
//SYSPRINT DD SYSOUT=*                     
//*                                        
//SYSUT1   DD DISP=SHR,DSN=AAAAAA.BBBBBB.CCCCCC ===> PDS1
//*                                        
//SYSIN    DD *                            
S M=MEM1
S M=MEM2
S M=MEM3
S M=MEM4
S M=MEM5
/*
//S030   EXEC PGM=IEBCOPY                       
//SYSPRINT DD SYSOUT=*                          
//INDD     DD DISP=SHR,DSN=CCCCCC.DDDDDD.EEEEEEE ====> PDS3
//OUTDD  DD DSN=DDDDDD.EEEEEEE.FFFFFFFFF                  ====> PDS4
//            DISP=(NEW,CATLG,DELETE),          
//            UNIT=SYSDA,DCB=*.INDD,            
//            SPACE=(CYL,(20,20,20),RLSE)       
//*                                             
//SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(5,5))      
//SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(5,5))      
//*                                             
//SYSIN DD *                                    
 COPY INDD=((INDD,R)),OUTDD=OUTDD               
 SELECT MEMEBR=MEM1
 SELECT MEMEBR=MEM2
 SELECT MEMEBR=MEM3
 SELECT MEMEBR=MEM4
 SELECT MEMEBR=MEM5
//* 
//S040     EXEC PGM=DELMEM                 
//*                                        
//SYSOUT   DD SYSOUT=*                     
//SYSPRINT DD SYSOUT=*                     
//*                                        
//SYSUT1   DD DISP=SHR,DSN=DDDDDD.EEEEEEE.FFFFFFFFF ====> PDS4
//*                                        
//SYSIN    DD *                            
S M=MEM1
S M=MEM2
S M=MEM3
S M=MEM4
S M=MEM5
/*
Thanks in advance and appreciate for the help.

Thanks,
Krishna
User avatar
giskard reventlov
Registered Member
Posts: 11
Joined: Wed Jul 29, 2020 4:42 pm

Re: Need help in creating the jcl thru rexx

Post by giskard reventlov »

so one my friend suggested me to use REXX
be honest please ...
what You really need is not help, but a working script

ask Your friend to help You 8-)
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”