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:
"Bailie, Jack" <[log in to unmask]>
Reply To:
Bailie, Jack
Date:
Wed, 13 Sep 2000 13:46:25 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
I found this same problem with a FORTRAN program a year or so ago.  It's a
known problem - not likely to get fixed.  I forget the details, but I think
you get different results whether the subroutine is included in the program
or in an XL.

Jack


                -----Original Message-----
                From:   Tony Summers [mailto:[log in to unmask]]
                Sent:   Wednesday, September 13, 2000 12:22 PM
                To:     [log in to unmask]
                Subject:        Cobol, Loader and HP3000 problem

                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