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
 

 

for each input record, want to reformat it into two records

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

New User


Joined: 12 Aug 2008
Posts: 46
Location: china

PostPosted: Mon Dec 19, 2011 9:21 pm    Post subject: for each input record, want to reformat it into two records
Reply with quote

Hi, all

I have a requirement like this, for each input record, I want to reformat it into two records, I use two OUTRREC for each INREC to the same OUTFIL, it doesn't work, is there any other way?

the sort ctlcard:
Code:
 //SYSIN   DD *                                                               
   OPTION COPY                                                               
   INREC FIELDS=(1:1,47,X,57,4,62,4,X,                                       
   287,22,80:SEQNUM,6,ZD,RESTART=(1,16))                                     
   OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(80,6,ZD,EQ,01),                           
    PUSH=(86:25,3))                                                           
   OUTFIL FNAMES=OUT,FTOV,INCLUDE=(17,5,ZD,NE,0),                             
   OUTREC=(1:53,4,5:SEQNUM,4,BI,09:X'0001',C'ED',                             
   13:86,3,58,19,77,3,PD,EDIT=(TTTT),                                         
   25X,64:X'2538',X'0000',68:C'CEB09041',12X,C'CUS1',                         
   92:X'0000',X'00004C',X'00000000',C'  ',C'01')                             
   OUTFIL FNAMES=OUT,FTOV,INCLUDE=(17,5,ZD,NE,0),                             
   OUTREC=(1:53,4,5:SEQNUM,4,BI,09:X'0001',C'ED',                             
   13:86,3,58,19,77,3,PD,EDIT=(TTTT),                                         
   25X,64:X'00C7',X'0000',68:C'CEB09041',12X,C'CUS1',                         
   92:X'0000',X'00014C',X'00000000',C'0000000',                               
   108:53,4,PD,EDIT=(TTTTTTT))                                               
 /*                                                                           


message:

Code:
ICE219I 0 DUPLICATE DDNAME OUT      IGNORED                   
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1       
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 Dec 19, 2011 11:28 pm    Post subject:
Reply with quote

If you want to create two output records for each input record, you would use ONE OUTFIL statement like this:

Code:

    OUTFIL FNAMES=OUT,...,
        BUILD=(fields_for_first_record,/,
             fields_for_second_record)


The / tells DFSORT to start a new record.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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