IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we SPLICE multiple files in a go


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aravindunlimited

New User


Joined: 08 May 2006
Posts: 16

PostPosted: Mon Mar 12, 2007 6:14 pm
Reply with quote

I have 4 files with a common primary key. Is there a way to SPLICE the 4 files with a single SPILCE command.

I tried pushing the files such a way that the whole format is created with space in between for induvidual files thinking that later when they are copied a straight SPLICE would merge it all in the required form

ABCDEF
ABCEEE
ABC123

what I did was

ABC DEF
ABCE EE
ABC 123

But the space from the last record will override the fields above.

help!
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Mar 12, 2007 6:30 pm
Reply with quote

Please post you JCL and control information.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Mar 12, 2007 8:42 pm
Reply with quote

aravindunlimited,

I can't tell what you want from what you've posted. You talk about four files but you only show one file with three records. And the bit about the spaces has no context so I don't know what it means.

Please show an example of the records in each input file and the expected output records. Also, what is the RECFM and LRECL of each input file?
Back to top
View user's profile Send private message
aravindunlimited

New User


Joined: 08 May 2006
Posts: 16

PostPosted: Thu Mar 15, 2007 11:35 pm
Reply with quote

//TOOLIN DD *
COPY FROM(INFILE3) TO(TEMP1) USING(CTL3)
COPY FROM(INFILE1) TO(TEMP1) USING(CTL1)
COPY FROM(INFILE2) TO(TEMP1) USING(CTL2)
COPY FROM(INFILE4) TO(TEMP1) USING(CTL4)
COPY FROM(TEMP1) TO(DSC)
SPLICE FROM(TEMP1) TO(OUTFILE) ON(1,10) -
WITH(21,6),WITH(27,3),WITH(30,7),USING(CTL5)

file1
1111111111aaa
2222222222bbb

file2
1111111111ooooooooo
2222222222ppppppppp

file 3
1111111111xx
2222222222yy


etc

Before splicing the control cards will arrange the temp file like

1111111111aaa
2222222222bbb
1111111111___ooooooooo
2222222222___ppppppppp
1111111111____________xx
2222222222____________yy

and splice it over the fields
What I expect is

1111111111aaaoooooooooxx
2222222222bbbpppppppppyy



What I expect is
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Mar 15, 2007 11:48 pm
Reply with quote

You can use WITHEACH to do that kind of thing. The first WITH(p,m) specifies the field you want from the first overlay record (e.g. ooooooooo in your example), the second WITH(p,m) specifies the field you want from the second overlay record (e.g. xx in your example), etc.

BTW, commas are not allowed between operands in SPLICE.

WITH(21,6),WITH(27,3),WITH(30,7),USING(CTL5)

should be:

WITH(21,6) WITH(27,3) WITH(30,7) USING(CTL5)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top