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
 
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 Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 4 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

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