Posted: Thu Aug 19, 2010 4:24 pm Post subject: Splitting record based on location of occurrences
I am new to the DFSORT utility. I have looked at many posted questions & responses on the Internet but still haven't found any solution that would solve my problem. So I have decided to post my question here since I have to meet my deadline at the current job.
My input file contain 3 character account prefix followed by 70 occurrences
Position 1-3 Account prefix
Position 4-6 Occurrence 1
Position 7-9 Occurrence 2
Position 10-12 Occurrence 3
Position 13-15 Occurrence 4
Position 209-212 Occurrence 70
The input file need to be exploded based on the position of each occurrence and then sorted based on the account prefix.
Joined: 18 Feb 2006 Posts: 812 Location: San Jose, CA
Posted: Thu Aug 19, 2010 9:50 pm Post subject:
Do you only have one record in the input file, or do you have more than one record?
Can a record have blank occurrences at the end, e.g. a record has 20 occurrences followed by blanks?
What is the RECFM and LRECL of the input file? What RECFM and LRECL do you want for the output file. _________________ Frank Yaeger - DFSORT Development Team (IBM) - firstname.lastname@example.org
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
I have many records in the input file. A record can have blank occurrences at the end or in the middle. But I still have to explode them even they are blank, then my output file would look like this:
Input and output files will have the same RECFM and LRECL :
Do you think that I can do something like a loop in DFSORT ?
do you not want to have the file sorted on the 3 char account id?
your example output shows records in presentation seq, which is unsorted. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
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