View previous topic :: View next topic
|
Author |
Message |
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Hi,
I have a PS that contains names of few datasets (of same DCB) and i want to merge these PS. Is there a way to accomplish this using a JCL???
e.g : FILE1 is the O/P of STEP1 and FILE1 has just the file names like
FILEA
FILEB
FILEC
FILED
...
FILEZ
And i want to merge FILEA thru FILEZ in the next step...
Is there a way to do this using IDCAMS, IEBGENER, SORT, ICETOOL etc....
Thanks in advance |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Previously posted on the forum
Code: |
/* REXX *** COPY MULTIPLE DATASETS TO ONE OUTPUT - INPUT FILE LIST
CONTAINED IN DATASET ALLOCATED TO DDNAME INFILES */
"FREE FI(INFILES)"
"ALLOC FI(INFILES) DA('Input list dataset') SHR"
"EXECIO * DISKR INFILES ( STEM INFS. FINIS"
IDSN = ""
DO AA = 1 TO INFS.0
IDSN = STRIP(IDSN" '"STRIP(INFS.AA)"'")
END
"FREE FI(SYSIN,SYSUT1,SYSUT2,SYSOUT,SYSPRINT)"
"DEL 'Output dataset'"
"ALLOC FI(SYSOUT) SYSOUT(X)"
"ALLOC FI(SYSPRINT) SYSOUT(X)"
"ALLOC FI(SYSIN) DUMMY"
"ALLOC FI(SYSUT1) DA("IDSN") SHR"
"ALLOC FI(SYSUT2) DA('Output dataset') NEW TRACKS SPACE(3 3)
RECFM(F B) LRECL(80)"
"CALL *(IEBGENER)"
"FREE FI(SYSIN,SYSUT1,SYSUT2,SYSOUT,SYSPRINT,INFILES)"
EXIT |
|
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Pranav,
do you mean merge or copying ?
Depending on the answer and the order of the data in each file, you may not be able to use some of the utilities.
Gerry |
|
Back to top |
|
|
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Thanks expat.. But we are forbidden to use REXX... :-(
Thanks guptae.. I will try this...
Hi gcicchet,
I jus wanted to merge data in all the files to a single file... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I jus wanted to merge data in all the files to a single file... |
What does "merge" mean to you. . .
It has a standard meaning that i believe is not your meaning. Simply copying multiple files into a single file with no regard to the sequence of the data is not a merge (regardless of the number of people who misuse the term). |
|
Back to top |
|
|
pranavaraj
New User
Joined: 03 Jan 2007 Posts: 15 Location: US
|
|
|
|
Hi guptae,
Thanks for the link.. That worked...
Hi Dick,
Sorry for any confusion... I just wanted to combine the data in all the files to one file... |
|
Back to top |
|
|
|