View previous topic :: View next topic
|
Author |
Message |
mushreyas
New User
Joined: 18 Jul 2008 Posts: 59 Location: Bangalore
|
|
|
|
Hi,
I came across this scenario while trying to sort a variable file of length 1500 including RDW. My requirement is to include 2 byte identifier at 75th position(rest all should be same as input) hence i used the below sort card for which i got OUTREC - SHORT RECORD error even the total length is 1500.
Scenario 1
SORT FIELDS=COPY
OUTFIL FILES=01 OUTREC=(1,78,79:C'QQ',81,1420)
However when i tried using the sort card as below i got the desired output
Scenario 2
SORT FIELDS=COPY
OUTFIL FILES=01 OUTREC=(1,78,79:C'QQ',81)
Scenario 3
SORT FIELDS=COPY
OUTFIL FILES=01 OUTREC=(1,78,79:C'QQ')
But i tried eliminating 81 from the above sort card(as in scenario 3) and the output has the record contents copied only till 76th position and rest all is filled with spaces which is valid. Can anyone explain what happened in 2nd scenario.
Attributes of my input and output files are as below..
RECFM=VB LERCL=1500 BLKSIZE=30000
Hope the information is enough for analysing... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
search the forum (or ibm sort manuals) for the option which allows short records. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Also, as an aside, if the file is DASD resident I would suggest a BLKSIZE of 27998 to maximise the storage capabilities, and for tape a BLKSIZE of 32760. |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It would look like you have a short record, even though you say you don't.
[If all records are 1500, why bother with a VB? Why blocksize of 30000, leaving space for a whole extra record on the track? 1580 bytes wasted per track, nearly 5% bigger dataset than necessary.] Edit: Expat knows better than I.
I guess, but haven't checked, that the "81" is doing from start position 81 to "end of record", so working with the shorter record(s) as well.
You can use the product to rip through the file extracting all records which are not 1500 and see what is left. There must be something.
OMIT COND=(1,2,BI,EQ,X'05DC')
(check that, it is untested). |
|
Back to top |
|
|
|