MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SORT INREC FIELDS Query

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
somoos
Beginner


Joined: 18 Feb 2004
Posts: 3
Topics: 2
Location: London

PostPosted: Fri Aug 05, 2005 11:14 pm    Post subject: SORT INREC FIELDS Query Reply with quote

Hi

Code:

//STEP1 EXEC SORT90MB
//SORTIN   DD DSN=EADERS,DISP=SHR                             
//SORTOUT  DD DSN=INVOICE.EADERS,DISP=(,CATLG),           
//     UNIT=SYSDA,                                           
//     DCB=(MODDSCB,RECFM=FB,BLKSIZE=0,LRECL=320,DSORG=PS), 
//     SPACE=(320,(20,2),RLSE),AVGREC=K                     
//SYSIN    DD *                                                     
  INREC FIELDS=(1,5,1X'0000000F',1X'00000F',13,12,1X'000F',         
                27,3,1X'00000F000F',35,285,1X'40')                 
  SORT FIELDS=(1,34,CH,A)                                           
  SUM FIELDS=(153,7,PD,160,7,PD,181,7,PD,188,4,PD,192,4,PD,         
              198,4,PD,204,4,PD,210,4,PD,216,4,PD,222,4,PD,         
              228,4,PD,234,4,PD,240,4,PD,246,4,PD,252,4,PD)         
//*     


Can any one explain me form above code of a step , what inrec fields will do. If it filters the data equals in the input file 1X'0000000F' from 6th position there is no data like the specified. Please explain me how the output file gets generated.


Regards,
Som.
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat Aug 06, 2005 9:24 am    Post subject: Reply with quote

INREC reformats the record - INCLUDE and OMIT are the statements that filter records. For each input record, the INREC statement creates a reformatted record with the following items in the order shown:

    o positions 1-5 from the input record
    o the constant X'0000000F'
    o the constant X'00000F'
    o positions 13-24 from the input record
    o the constant X'000F'
    o positions 27-29 from the input record
    o the constant X'00000F000F'
    o positions 35-319 from the input record
    o the constant X'40'

INREC is processed before SORT and SUM, so the SORT and SUM statements operate on the fields in the reformatted record. The resulting records from these operations will appear in SORTOUT.

You can read all about DFSORT's control statements in "z/OS DFSORT Application Programming Guide" which you can access online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
somoos
Beginner


Joined: 18 Feb 2004
Posts: 3
Topics: 2
Location: London

PostPosted: Mon Aug 08, 2005 8:56 am    Post subject: Tanx Reply with quote

Hi Frank ,

Thanq for the reply and explanation.


Regards,
Som
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group