Sort - unwanted data



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Sort - unwanted data

Postby Kitz » Tue Jun 21, 2011 3:11 am

I'm reading a file using SORT which is in the format FBA and LRECL=133 and, then writing to an output file of the format FB and LRECL=80. I am using INREC FIELDS=(1:2,5,8:8,8,18:94,9,28:115,5) along with the SORT.

The output is actually 32 length (though LRECL is 80) but the rest of the field is unwanted data. Please advise how to get rid of this data?

Please help.

Thanks & Regards,
Kitz
Kitz
 
Posts: 47
Joined: Thu Mar 17, 2011 3:46 am
Has thanked: 0 time
Been thanked: 1 time

Re: Sort - unwanted data

Postby Frank Yaeger » Tue Jun 21, 2011 4:10 am

Kitz,

I can't tell from your explanation if you want the output LRECL to be 32 or 80. Which is it?

If you want the output data set to have RECFM=FB, the you must specify RECFM=FB on the output DD. Otherwise DFSORT will use the input RECFM of FBA.

If you want your output data set to have LRECL=32, then use this INREC statement and ensure that your output data set has LRECL=32 (or no LRECL) and RECFM=FB.

    OPTION COPY
    INREC FIELDS=(1:2,5,8:8,8,18:94,9,28:115,5) 


If you want LRECL=80 for your output data set, then use this INREC statement and ensure that your output data set has LRECL=80 (or no LRECL) and RECFM=FB.

    OPTION COPY
    INREC FIELDS=(1:2,5,8:8,8,18:94,9,28:115,5,80:X) 


You need to have the reformatted length set up by the INREC statement MATCH the LRECL of the output file.

If you're still having problems, show the complete JES log for your run.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: Sort - unwanted data

Postby Kitz » Tue Jun 21, 2011 1:49 pm

Thanks a lot Frank. I need LRECL=80 and RECFM=FB for my output dataset:
It worked with your below code:

  OPTION COPY
  INREC FIELDS=(1:2,5,8:8,8,18:94,9,28:115,5,80:X)


Thanks again.

Regards,
Kitz
Kitz
 
Posts: 47
Joined: Thu Mar 17, 2011 3:46 am
Has thanked: 0 time
Been thanked: 1 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post