Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us