Page 1 of 1

Need JCL or a command

PostPosted: Tue May 23, 2017 12:37 pm
by jithamitra
Guys,
I need to copy all the PS and PDS files created by a USERId to another USERID area.
Example USERID1.TEST.* to USERID2.TEST.*

I have a list of 1000 Ps and PDS files created by a user and as I came in as his replacement, I am supposed to copy all the data to my area.

Please help

regards,
Jeeth

Re: Need JCL or a command

PostPosted: Tue May 23, 2017 1:02 pm
by prino
ren 'a.b.c' 'd.e.f'

Re: Need JCL or a command

PostPosted: Tue May 23, 2017 2:23 pm
by willy jensen
Look at the ADRDSSU program.
Something like the following should do the trick:

//DSCOPY   EXEC PGM=ADRDSSU        
//SYSPRINT DD SYSOUT=*            
 COPY DATASET( -                  
       INC(-                      
         USERID1.TEST.** -        
       ) -                        
      ) -                          
      SPHERE -                    
    RENAMEU(USERID2) -            
    SPHERE TOL(ENQF) CATALOG SHR -
    NULLSTORCLAS -                
 /* END OF INPUT */                
 

Re: Need JCL or a command

PostPosted: Tue May 23, 2017 2:27 pm
by willy jensen
Just realized that 'SPHERE' appears more than once, you have to remove one.
Using the parm here will give you a nice simulation:

//DSCOPY   EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'
 

Re: Need JCL or a command

PostPosted: Tue May 23, 2017 7:01 pm
by Terry Heinze
prino wrote:
ren 'a.b.c' 'd.e.f'

Won't a RENAME give you a possible security violation (RACF, ACF2, etc.) error?

Re: Need JCL or a command

PostPosted: Wed May 24, 2017 12:47 am
by prino
Terry Heinze wrote:
prino wrote:
ren 'a.b.c' 'd.e.f'

Won't a RENAME give you a possible security violation (RACF, ACF2, etc.) error?

Of course it will, but that's not my problem. :mrgreen:

(And with one PP,GM replacing another PP,GM, it's unlikely that this will happen here as both should be in the same RACF group(s))