HP3000-L Archives

September 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tony Summers <[log in to unmask]>
Reply To:
Tony Summers <[log in to unmask]>
Date:
Wed, 13 Sep 2000 18:22:24 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
I have a cobol subprogram that has 4 parameters

I have called that subprogram from my main program twice - once with all 4 parameters and once with just two. 

If the code is organised thus

if <condition which happens to be false>
     CALL "X" USING A, B.
end if
CALL "X" USING A,B,C,D.

then the program fails to load - as I would expect.

If, however, the code is organized thus :

if <condition which happens to be false>
    CALL "X" USING A, B,C,D
end if 
CALL "X" USING A,B.

then the program loads, but then aborts on bound violation when the second call to the subroutine is made.

Note it appears to be important that the first call to the correct version of the subroutine is not "executed" .

Can anyone suggest a method that prevents the program from either being compiled in the first place or have 
I discovered a little known bug in the loader ? 

Many thanks.

ATOM RSS1 RSS2