IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Dec 19, 2011 11:28 pm
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:

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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Discard record with 0 entry if Dup... SYNCSORT 7
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
Search our Forums:


Back to Top