Many to many copy.

JES2/3, JCL, utilities.
Post Reply
Abhilash Sharma
New Member
Posts: 6
Joined: Wed Jun 11, 2014 8:29 am

Many to many copy.

Post by Abhilash Sharma »

Hi,

I've 12 input files (and in future it might be more). Let's file be fileA, fileB, fileC and so on and 12 output files as - fileA1, fileB1, fileC1 and so on. I want to copy the input files to output files such as fileA goes to fileA1, fileB geso to fileB1 ...

I know it can be done by IDCAMS but I don't want to use that, as it would take as many steps as many files. Please let me know how to resolve it? And can this be done just by a single step. It'll be less matainece going forward.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Many to many copy.

Post by enrico-sorichetti »

doing it in one step and one control statement depends on the naming scheme

if You are satisfied with a high level qualifier change ADRDSSU aka DFDSS can do it in one shot

the syntax is along the lines of

Code: Select all

   COPY DATASET(INCLUDE(some.pattern.**)) -                                                                          
        RENAMEUNCONDITIONAL(some.pattern.**,theothr.pattern.**) 
I said ALONG the lines ...

check the manual for the exact syntax and additional parametes
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Many to many copy.

Post by Robert Sample »

I know it can be done by IDCAMS but I don't want to use that, as it would take as many steps as many files.
This statement makes no sense. IDCAMS allows you to put all 12 input files as well as all 12 output files as DD statements and use 12 REPRO statements -- all in one step.
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 “JCL - Job Control Language.”