MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
naveen_kj Beginner Joined: 03 Feb 2003 Posts: 18 Topics: 8 Location: India
Posted: Wed Apr 09, 2003 9:58 am Post subject: One to one copy of files
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
Cogito-Ergo-Sum Advanced Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Wed Apr 09, 2003 10:03 am Post subject:
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
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Wed Apr 09, 2003 10:06 am Post subject:
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
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Wed Apr 09, 2003 10:14 am Post subject:
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
naveen_kj Beginner Joined: 03 Feb 2003 Posts: 18 Topics: 8 Location: India
Posted: Wed Apr 09, 2003 10:50 am Post subject:
It is working.... thanks kolusu
Back to top
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