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
 

 

Splicing multiple records into a single one

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

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Fri Dec 29, 2006 3:45 pm    Post subject: Splicing multiple records into a single one
Reply with quote

I have to splice the records in the input file into single record in output file using Sort.

For Ex

Input File
0000000006
0000000006
0000000002

Output file
000000000600000000060000000002

Sai
Back to top
View user's profile Send private message

William Thompson

Global Moderator


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

PostPosted: Fri Dec 29, 2006 4:07 pm    Post subject:
Reply with quote

So your input file has only 3 records?
If more than 3, do you still want only one output record?
Have you looked at some of the posts in this forun and seen what additional information is required to help you with your requirement?
Do you have DFSORT/ICETOOL with all the current PTFs?
This:
http://www.ibmmainframes.com/viewtopic.php?t=15794&highlight=splice might give you a headstart.....
Back to top
View user's profile Send private message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Fri Dec 29, 2006 4:32 pm    Post subject: Splicing multiple records into a single one
Reply with quote

First using Outrec place the recods as below
Code:

0000000006
                 0000000006
                                  0000000002


& Then splice the records using the witheach option.
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: Fri Dec 29, 2006 8:59 pm    Post subject:
Reply with quote

Sai,

Here's a DFSORT/ICETOOL job that will do what you asked for.

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (FB/10)
//OUT DD DSN=...  output file (FB/30)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(31,1,CH) -
   WITHEACH WITH(11,10) WITH(21,10) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(31:C'A',32:SEQNUM,1,ZD)),
   IFTHEN=(WHEN=(32,1,ZD,EQ,+2),OVERLAY=(11:1,10)),
   IFTHEN=(WHEN=(32,1,ZD,EQ,+3),OVERLAY=(21:1,10))
  OUTFIL FNAMES=OUT,BUILD=(1,30)
/*
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 Nov 15, 2010 11:21 pm    Post subject:
Reply with quote

With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct 2010), you can now use the new RESIZE operator of DFSORT's ICETOOL to do this quite easily like this:

Code:

//NEW EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (FB/10)
//OUT DD DSN=...  output file (FB/30)
//TOOLIN DD *
RESIZE FROM(IN) TO(OUT) TOLEN(30)
/*


For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 4 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 IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am


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