IGYCRCTL Compiler NUMBER option



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

IGYCRCTL Compiler NUMBER option

Postby richiewu » Thu Jul 25, 2013 2:50 pm

Hi

I want to compile Enterprise COBOL on z/OS and specified NUMBER option that let compiler generate error message with real source line number,

But this option not work, the error message generated with expanded COPYBOOK/SQLCA line numbers.

Here is my parm detail expanded by JES

IEFC653I SUBSTITUTION JCL - PGM=IGYCRCTL,REGION=4M,COND=(4,LT),PARM='SSRANGE,NUMBER,LIB,RENT,MAP,LIST,
TEST(NONE,SYM,SEP),NOXREF,DBCS,NOSEQ,TRUNC(OPT)'


How fix it?

Thanks in advance.
richiewu
 
Posts: 9
Joined: Mon Jul 12, 2010 8:10 am
Has thanked: 2 times
Been thanked: 0 time

Re: IGYCRCTL Compiler NUMBER option

 

Re: IGYCRCTL Compiler NUMBER option

Postby Robert Sample » Thu Jul 25, 2013 5:15 pm

You did not indicate what you consider "real source line number" in your post. I suspect that what you want is not available from the compiler.

From the Enterprise COBOL Programming Guide manual, section on NUMBER (emphasis added by me):
2.4.34 NUMBER

Use the NUMBER compiler option if you have line numbers in your source code and want those numbers to be used in error messages and SOURCE, MAP, LIST, and XREF listings.

Click here to display pages in Accessible mode

┌─── NUMBER option syntax ───────────────────────────────────────────────┐
│ │
│ ┌─NONUMBER─┐ │
│ >>──┼──────────┼────────────────────────────────────────────────────>< │
│ └─NUMBER───┘ │
│ │
└────────────────────────────────────────────────────────────────────────┘

Default is: NONUMBER

Abbreviations are: NUM|NONUM

If you request NUMBER, the compiler checks columns 1 through 6 to make sure that they contain only numbers and that the numbers are in numeric collating sequence. (In contrast, SEQUENCE checks the characters in these columns according to EBCDIC collating sequence.) When a line number is found to be out of sequence, the compiler assigns to it a line number with a value one higher than the line number of the preceding statement. The compiler flags the new value with two asterisks and includes in the listing a message indicating an out-of-sequence error. Sequence-checking continues with the next statement, based on the newly assigned value of the previous line.

If you use COPY statements and NUMBER is in effect, be sure that your source program line numbers and the copybook line numbers are coordinated.

If you are doing a batch compilation and LIB and NUMBER are in effect, all programs in the batch compile will be treated as a single input file. The sequence numbers of the entire input file must be in ascending order.

Use NONUMBER if you do not have line numbers in your source code, or if you want the compiler to ignore the line numbers you do have in your source code. With NONUMBER in effect, the compiler generates line numbers for your source statements and uses those numbers as references in listings.

These users thanked the author Robert Sample for the post:
richiewu (Fri Jul 26, 2013 6:45 am)
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: IGYCRCTL Compiler NUMBER option

Postby richiewu » Fri Jul 26, 2013 6:53 am

Robert Sample wrote:You did not indicate what you consider "real source line number" in your post. I suspect that what you want is not available from the compiler.


Yes, I think so, the real source line means the fact line number of COBOL source, except COPYBOOKs

I'm researching extract all the error msg from JES and reformat in an error format that can be read by Vim then integrate with quick-fix to locate error directly.

I already used alternative way implemented it for PL/I, that is capture the line content from PL/I compiler msg and use it match source code with grep command to get real line number, then change the PL/I compiler generated line number.
richiewu
 
Posts: 9
Joined: Mon Jul 12, 2010 8:10 am
Has thanked: 2 times
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post