MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error in the SORT code

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Nancy
Beginner


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Tue Dec 16, 2003 2:01 am    Post subject: Error in the SORT code Reply with quote

While running the SORT jcl, I am getting an error i.e. REPORT HAS INCOMPATIBLE LRECL.

My JCL looks like below.

Code:

//SORT01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//REPORT DD DSN=USERID.REPORT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SCRPK,
// SPACE=(TRK,20,20),RLSE),
// DCB=( RECFM=FBA,LRECL=80,BLKSIZE=80)
//SORTIN DD *
//SYSIN DD *
SORT FIELDS=(1,80,CH,A)
OUTFIL FNAMES=REPORT,LINES=30,
HEADER2=(2:'BOOKSTORE LIST',
50:'CURRENT DATE',DATE,
60:'PAGE',PAGE,
3/,2:'BOOK NAME',
55:'AUTHOR',
65:'PRICE',
72:'COPIES',
/,2:50'-',
55:10'-',
65:8'-'),
OUTREC=(2:1,15,
CHANGE=(50,
C'INS',C'BASICS OF INSURANCE',
C'LOMA',C'LOMA EXAMINATION GUIDE',
C'COMM SKILLS',C'COMMUNICATION SKILLS',
C'AMER ENG',C'AMERICAN ENGLISH',
C'RDR',C'READER''S DIGEST'),
55:51,10,
66:61,5,
72:66,4,
80:X),
TRAILER1=(2:'SUMMARY FOR ',DATE,
60:'PAGE:',PAGE,
3/2:'BOOKS IN STOCK',COUNT,
3/2:'AVERAGE PRICE OF BOOKS : ',
AVG=(61,4,ZD))
/*

Please suggest !

Regards
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Dec 16, 2003 7:40 am    Post subject: Reply with quote

nancy,

Just remove the following line and run your Job.
Code:

DCB=( RECFM=FBA,LRECL=80,BLKSIZE=80)


The reason for the eror is that you are using a report features which will increment the lrecl by 1 i.e the the output file lrecl will become 81. The extra 1 byte is to accomodate the carriage control character. You really don't have to code the DCB parameter for sort as sort calculates them automatically.You also have some overlapping fields.

You can get rid of the carriage control character by specifying the following parm
Code:

 OUTFIL FNAMES=REPORT,REMOVECC,LINES=30,
 HEADER2=...



Hope this helps...

cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nancy
Beginner


Joined: 23 May 2003
Posts: 77
Topics: 26

PostPosted: Tue Dec 16, 2003 7:56 am    Post subject: Reply with quote

Kolusu,

I have tried your suggestion but removing the DCB parameter was of no help. I have got the solution now.

My HEADER2 code should have the PAGE colums start from 70 instead of 60 because DATE was not having enough space in case if we start PAGE from 60.

My code is working fine after making the following change.

50:'CURRENT DATE',DATE,
70:'PAGE',PAGE,

Thanks for your help.
Nancy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group