Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort - Sort on Variable file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - Sort on Variable file
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 09, 2011 10:23 pm    Post subject:
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: 578
Location: USA

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

Read about OUTREC Statement Notes

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Thu Jun 09, 2011 10:35 pm    Post subject: Reply to: Sort on Variable file
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us