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: 6967
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: 7315

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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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