Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mscompile.pl options

Status
Not open for further replies.

gbell

MIS
Feb 19, 2002
86
AU
Does anyone know how to compile a MIMS COBOL program so it will generate a line number in the error output when it aborts with a run time error 153 - Subscript out of range? I can see which program is failing but am unable to determine where.

I have tried tracing the program but the trace ends before the program aborts so it's not much help.

We are running 4.3 MIMS on HP UNIX, with Microfocus COBOL version v4.1.30-e
e.g.

error code: 153, pc=C4E58593, call=10, seg=0
153 Subscript out of range

The Microfocus doco says the line number will be listed after the seg=0

TIA
 
Sorry for not answering the compiler option question, but... Eight out of ten times when I've seen this, it has related back to an invalid printer and the error came out of mssprt. Make sure that the printers for the request are valid for the district that it (the request) is running in and that the district default printer is properly set up.

Is the same printer on the request more than once? or is there a printer from the dynamic-printer routine being created that is the same as the printer on the request parameters?

The line numbers that the compiler would generate are going to be for the post-macro code (not the real source line number) so you will need to keep the intermediate files (I think this is the -x option but it may be -D).

have you tried mscomp -D xxxxxx?

a suggestion.. If you compile for animation, the load module needs to keep the line numbers, but they will be for the intermediate (post macro) source.
Glen Colbert
gcolbert@mslden.com
 
With the standard options, I think you are out of luck, it
may be possible to set your cobol compiler switches to do this.

Like Glen, I've seen this error many time too. The most common causes I've seen is when a subscript is not initialize prior to being used or the value used exceeds the size of the subscripted table.

Being one of the programmers that favor trace over running animator, I run the program with trace, which will tell me which section to look in, and just add a trace statement
to show the subscripts being used.

Example:

EXEC TRACE PROD
COMP-ARG ('3110 - W30-SUB =', W30-SUB)
END-EXEC.

IF W50-STOCK-CODE (W30-SUB) = SPACES
DO SOMETHING

The value for w30-sub should be between 1 and the size of
the table.

Jeff Sullivan
jeff@addonsinc.com
 
With the standard options, I think you are out of luck, it
may be possible to set your cobol compiler switches to do this.

Like Glen, I've seen this error many time too. The most common causes I've seen is when a subscript is not initialize prior to being used or the value used exceeds the size of the subscripted table.

Being one of the programmers that favor trace over running animator, I run the program with trace, which will tell me which section to look in, and just add a trace statement
to show the subscripts being used.

Example:

EXEC TRACE PROD
COMP-ARG ('3110 - W30-SUB =', W30-SUB)
END-EXEC.

IF W50-STOCK-CODE (W30-SUB) = SPACES
DO SOMETHING

The value for w30-sub should be between 1 and the size of
the table.

Jeff Sullivan
jeff@addonsinc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top