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
 
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm

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