IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort - Sort on Variable file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Thu Jun 09, 2011 9:45 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 09, 2011 10:16 pm
Reply with quote

search the forum (or ibm sort manuals) for the option which allows short records.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 09, 2011 10:23 pm
Reply with quote

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
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Thu Jun 09, 2011 10:27 pm
Reply with quote

Read about OUTREC Statement Notes

Thanks,
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jun 09, 2011 10:35 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top