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
 

 

Combine 4 80-byte records into single 320-byte records

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

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Wed May 12, 2010 7:56 pm    Post subject: Combine 4 80-byte records into single 320-byte records
Reply with quote

I have one FB file with 80-byte record length. I want to copy these records into 320 record length file. That means I need to concatenate 4 records and write into output file.
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 May 12, 2010 11:21 pm    Post subject:
Reply with quote

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/80)
//OUT DD DSN=...  output file (FB/320)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(321,8,CH) KEEPNODUPS WITHEACH -
  WITH(81,80) WITH(161,80) WITH(241,80) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=GROUP,RECORDS=4,PUSH=(321:ID=8,SEQ=1)),
        IFTHEN=(WHEN=(329,1,ZD,EQ,2),BUILD=(81:1,80,321:321,8)),
        IFTHEN=(WHEN=(329,1,ZD,EQ,3),BUILD=(161:1,80,321:321,8)),
        IFTHEN=(WHEN=(329,1,ZD,EQ,4),BUILD=(241:1,80,321:321,8))
  OUTFIL FNAMES=OUT,BUILD=(1,320)
/*
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Thu May 13, 2010 11:30 am    Post subject: Combine 4 80-byte records into single 320-byte records
Reply with quote

Hi Frank,

Thank you very much for your help. Your solution gave me desired result.
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: Sat Oct 30, 2010 1:59 am    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 do this more easily like this:

Code:

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


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 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 Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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