View previous topic :: View next topic
|
Author |
Message |
rahil_maqsood
New User
Joined: 28 Mar 2005 Posts: 6
|
|
|
|
Hi Everyone,
Can anybody tell me how to copy data from 2 or more flat files in to another flat file using utility not by concatenating using DD statement. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Why don't you want to use a concatenated list?
It's for the reason that the logical record lenght or the format of record is different?
Which is the original problem? |
|
Back to top |
|
|
jkbytes
Active User
Joined: 19 Feb 2005 Posts: 139 Location: South Africa
|
|
|
|
Code: |
000200 //STEP1 EXEC PGM=IEBCOPY
000300 //SYSPRINT DD SYSOUT=*
000400 //IN DD DSN=MTPLB21.JCL.CNTL,DISP=SHR
000500 //OUT DD DSN=MTPLB21.JCL.ANJ,DISP=SHR
000800 //SYSIN DD *
000900 COPY OUTDD=OUT,INDD=IN
001000 SELECT MEMBER=(SEC1,SEC2,SEC3)
001100 /* |
i guess this utility will do the job |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Whenever I want to copy one-to-one, one-to-many, many-to-many, or many-to-one, I use ICETOOL:
Code: |
//COPY EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=DSN1
//IN2 DD DISP=SHR,DSN=DSN2
...
//INX DD DISP=SHR,DSN=DSNX
//OUT DD DSN=DSNOUT,
// DISP=(MOD,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT)
COPY FROM(IN2) TO(OUT)
...
COPY FROM(INX) TO(OUT)
/*
//*
|
|
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
I think that are several method to do the same thing(IEBCOPY is useful only for partitioned whereas ICETOOL or IDCAMS work fine for both PS,PO) but there is only one reason that exclude the concatenation of files -I hope! |
|
Back to top |
|
|
nirav
New User
Joined: 14 Feb 2005 Posts: 3
|
|
|
|
If you want to use utility then you can use Fileaid utility to copy any number of flat files (not more than 255) into one single file.
The sample is:
//STEP01 EXEC PGM=FILEAID
//*
//DD01 DD DISP=SHR,DSN=sample1.flatfile1
// DD DISP=SHR,DSN=sample2.flatfile2
//DD01O DD DSN=output.flatfile3,
// DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
// SPACE=(TRK,(4,10),RLSE),
// UNIT=SYSDA
the only thing you need to take care is all the files must have same DCB parameters.
Does this give your answer, please let me know. |
|
Back to top |
|
|
|