Need JCL or a command



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Need JCL or a command

Postby jithamitra » Tue May 23, 2017 12:37 pm

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
jithamitra
 
Posts: 1
Joined: Tue May 23, 2017 12:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need JCL or a command

Postby prino » Tue May 23, 2017 1:02 pm

ren 'a.b.c' 'd.e.f'
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Need JCL or a command

Postby willy jensen » Tue May 23, 2017 2:23 pm

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 */                
 
willy jensen
 
Posts: 465
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Need JCL or a command

Postby willy jensen » Tue May 23, 2017 2:27 pm

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'
 
willy jensen
 
Posts: 465
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Need JCL or a command

Postby Terry Heinze » Tue May 23, 2017 7:01 pm

prino wrote:
ren 'a.b.c' 'd.e.f'

Won't a RENAME give you a possible security violation (RACF, ACF2, etc.) error?
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Need JCL or a command

Postby prino » Wed May 24, 2017 12:47 am

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))
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post