MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

One to one copy of files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
naveen_kj
Beginner


Joined: 03 Feb 2003
Posts: 18
Topics: 8
Location: India

PostPosted: Wed Apr 09, 2003 9:58 am    Post subject: One to one copy of files Reply with quote

I want to copy the records from files using SYNCSORT.

In SORT, the SYSIN is having 3 files. I want 3 output files with the record of respective 3 input files.

e.g,

Input files are having the records as,

Infile1
A
B
C

Infile2
D
E
F

Infile 3
G
H
I

The output file should have the records as,

Outfile1
A
B
C

Outfile2
D
E
F

Outfile3
G
H
I

I want to use only SORT and want to get the results in one step.

could some one can help me.....

thanks in advance,
Naveen
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Apr 09, 2003 10:03 am    Post subject: Reply with quote

naveen_kj,
I do not quite understand the problem. I mean, all your outfiles are exactly simialr to the infiles. Can you please state your requirements more clearly?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Apr 09, 2003 10:06 am    Post subject: Reply with quote

Naveen,

The following DFSORT/ICETOOL jcl will give you the desired results.If you have syncsort at your shop then change the pgm name to synctool

Code:

//STEP0100 EXEC PGM=ICETOOL                               
//*                                                       
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN1      DD DSN=YOUR INPUT DATASET1,
//            DISP=SHR
//IN2      DD DSN=YOUR INPUT DATASET2,
//            DISP=SHR
//IN3      DD DSN=YOUR INPUT DATASET3,
//            DISP=SHR
//OUT1     DD DSN=YOUR OUTPUT FILE1,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//OUT2     DD DSN=YOUR OUTPUT FILE2,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//OUT3     DD DSN=YOUR OUTPUT FILE3,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//TOOLIN   DD *                                     
   COPY FROM(IN1) TO(OUT1)
   COPY FROM(IN2) TO(OUT2)
   COPY FROM(IN3) TO(OUT3)
/*



Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Apr 09, 2003 10:14 am    Post subject: Reply with quote

Naveen,

You can use a simple IDCAMS also to achieve the desired results.

Code:

//STEP0100 EXEC PGM=IDCAMS                               
//*                                                       
//SYSPRINT DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN1      DD DSN=YOUR INPUT DATASET1,
//            DISP=SHR
//IN2      DD DSN=YOUR INPUT DATASET2,
//            DISP=SHR
//IN3      DD DSN=YOUR INPUT DATASET3,
//            DISP=SHR
//OUT1     DD DSN=YOUR OUTPUT FILE1,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//OUT2     DD DSN=YOUR OUTPUT FILE2,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//OUT3     DD DSN=YOUR OUTPUT FILE3,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//TOOLIN   DD *                                     
  REPRO INFILE(IN1) OUTFILE(OUT1)
  REPRO INFILE(IN2) OUTFILE(OUT2)
  REPRO INFILE(IN3) OUTFILE(OUT3)
/*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
naveen_kj
Beginner


Joined: 03 Feb 2003
Posts: 18
Topics: 8
Location: India

PostPosted: Wed Apr 09, 2003 10:50 am    Post subject: Reply with quote

It is working.... thanks kolusu
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group