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
 

 

two record formats in one sort step

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

New User


Joined: 24 Mar 2004
Posts: 29

PostPosted: Tue Jun 29, 2004 10:40 am    Post subject: two record formats in one sort step
Reply with quote

Hi,

Is it possible to create 2 different format of files for one input file in a single sort step

say if we have two OUTFIL statement for one input file with different include conditions. I want first 50 characters to be in the first file but i want the complete record in the second file. is it achievable


thanks
Muthu
Back to top
View user's profile Send private message

imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Tue Jun 29, 2004 3:57 pm    Post subject:
Reply with quote

muthukumar,

    //STEP1 EXEC PGM=ICETOOL
    //INDD DSN = INPUT FILE
    //OUTDD1 DSN =OUTPUT FILE CONTAINING WHOLE RECORD
    //OUTDD2 DSN= OUTPUT FILE CONTAINING FIRST 50 BYTES

    //TOOLIN DD *
    COPY FROM(INDD) TO(OUTDD1)
    COPY FROM(INDD) USING F50
    /*
    F50CNTL DD *
    OUTFIL FNAMES=OUTDD2,OUTREC=(1,50)
    /*
    //
Back to top
View user's profile Send private message
muthukumar

New User


Joined: 24 Mar 2004
Posts: 29

PostPosted: Tue Jun 29, 2004 4:46 pm    Post subject:
Reply with quote

thanks a lot
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: Tue May 03, 2005 1:53 am    Post subject:
Reply with quote

You don't need two passes to do this. You can do it in one pass with DFSORT as follows:

Code:

//STEP1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUTDD1 DSN=... output file containing entire record
//OUTDD2 DSN=...  output file containing first 50 bytes
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=OUTDD1
  OUTFIL FNAMES=OUTDD2,OUTREC=(1,50)
/*
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 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
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


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