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
 

 

Merge files using ICETOOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Wed Jan 04, 2006 6:47 pm    Post subject: Merge files using ICETOOL
Reply with quote

HI,

Pls help me in doing this.
Code:
F1:
111
222

F2:
aaaa
aaaaa
aaa

F3:
bbb
bbbbb
bbbbbbbb


Code:
outfile:
111
aaaa
aaaaa
aaa
222
bbb
bbbbb
bbbbbbbb


Data in F1 is added as header for data in other files.
Number of records in F1 equals number of (files-1)
Back to top
View user's profile Send private message

Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Wed Jan 04, 2006 8:02 pm    Post subject: Re: Merge files using ICETOOL
Reply with quote

Can you have more than 1 group in files 2 & 3 ? If so, what differentiates 1 group to an other ?

alain
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jan 04, 2006 9:53 pm    Post subject:
Reply with quote

Push,

If you're just trying to copy record 1 from F1 before the F2 records and record 2 from F1 before the F3 records, you can use a straightforward method like this DFSORT/ICETOOL job:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//F1 DD *
111
222
/*
//F2 DD *
aaaa
aaaaa
aaa
/*
//F3 DD *
bbb
bbbbb
bbbbbbbb
/*
//OUT DD DSN=&&O1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//TOOLIN DD *
COPY FROM(F1) TO(OUT) USING(CTL1)
COPY FROM(F2) TO(OUT)
COPY FROM(F1) TO(OUT) USING(CTL2)
COPY FROM(F3) TO(OUT)
/*
//CTL1CNTL DD *
  OPTION STOPAFT=1
/*
//CTL2CNTL DD *
  OPTION SKIPREC=1,STOPAFT=1
/*


If you're trying to do something more complex, you need to explain in detail what you're trying to do.
Back to top
View user's profile Send private message
pushpagiri

New User


Joined: 07 Jul 2005
Posts: 51

PostPosted: Thu Jan 05, 2006 10:08 am    Post subject:
Reply with quote

Hi Frank,

What can I do if i Have hundreds of files like this.Should i create 100 control cards to do this job / is there any easy way to do this ?

i.e.,F1 has 100 records and there are files from f2 to f101.I want to merge this many files.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jan 05, 2006 9:13 pm    Post subject:
Reply with quote

You could generate the control statements instead of hardcoding them.

I don't see an easier way to do it other than that unless there's some kind of regular pattern to all this. Do f2 to f101 all have the same number of records or can they have different numbers of records? Is there a pattern to the f1 records that would allow them to be generated or do they have to be taken from f1?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am


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