Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to copy data from 2 or more flat files in to one

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rahil_maqsood

New User


Joined: 28 Mar 2005
Posts: 6

PostPosted: Wed Jun 01, 2005 2:07 pm    Post subject: how to copy data from 2 or more flat files in to one
Reply with quote

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
View user's profile Send private message

MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Jun 01, 2005 2:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
jkbytes

Active User


Joined: 19 Feb 2005
Posts: 141
Location: South Africa

PostPosted: Wed Jun 01, 2005 4:43 pm    Post subject: Re: how to copy data from 2 or more flat files in to one
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Jun 01, 2005 5:58 pm    Post subject: Re: how to copy data from 2 or more flat files in to one
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Jun 01, 2005 7:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
nirav

New User


Joined: 14 Feb 2005
Posts: 3

PostPosted: Sun Jun 05, 2005 8:19 am    Post subject: Re: how to copy data from 2 or more flat files in to one
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us