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
 

 

Can we SPLICE multiple files in a go

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Can we SPLICE multiple files in a go
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: 3158
Location: Tucson AZ

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

Please post you JCL and control information.
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: Mon Mar 12, 2007 8:42 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Mar 15, 2007 11:48 pm    Post subject:
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    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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm


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