rm/cobol85 compile warning 
Author Message
 rm/cobol85 compile warning

I'll let other more RM-oriented people respond directly for the RM
implications, but in my opinion it is "bad form" to STOP RUN in a called
sub-program UNLESS some "unrecoverable error" has occurred.  Otherwise, you
should "Exit Program" (or GoBack if you compiler has it) until you are at
the top level and then STOP RUN from there.

Having said that, it is "well defined" what is supposed to happen if you do
a STOP RUN *anywhere* in the application (run-unit) and your COBOL system is
*supposed* to clean up after itself.

--
Bill Klein
    wmklein <at> ix dot netcom dot com

Quote:
> hi all,
> i don't have the manual for rm/cobol-85 so i'm hoping this issue isn't
> too common :)
> anyway.... my program uses a subprogram to "stop run", it's called from
> a number of places.
> When compiling i get the following warning:
> "0048: W PERFORM exit procedure ends with unconditional transfer of
> control:   EX"
> this warning is generated on a 'perform my-exit-routine' statement,
> i can't see why it's 'unconditional', i can post some code if need be
> :).
> Is this warning anything to worry about?? is it poor cobol programming
> practice to have a seperate sub program for exiting the app?
> thanks for any help

> -mark d



Sun, 03 Mar 2002 03:00:00 GMT  
 rm/cobol85 compile warning
hi all,
i don't have the manual for rm/cobol-85 so i'm hoping this issue isn't
too common :)
anyway.... my program uses a subprogram to "stop run", it's called from
a number of places.
When compiling i get the following warning:
"0048: W PERFORM exit procedure ends with unconditional transfer of
control:   EX"
this warning is generated on a 'perform my-exit-routine' statement,
i can't see why it's 'unconditional', i can post some code if need be
:).
Is this warning anything to worry about?? is it poor cobol programming
practice to have a seperate sub program for exiting the app?
thanks for any help

-mark d



Mon, 04 Mar 2002 03:00:00 GMT  
 rm/cobol85 compile warning
[snip]

Quote:
>When compiling i get the following warning:
>"0048: W PERFORM exit procedure ends with unconditional transfer of
>control:   EX"
>this warning is generated on a 'perform my-exit-routine' statement,
>i can't see why it's 'unconditional', i can post some code if need be
>:).

Mark:

Posting the code might eliminate some of the mystery, but here's a guess:

Look at the paragraph (or section) "my-exit-routine" and I think you will
find that it ends (has as its last statement) a statement which causes
unconditional transfer of control to some other part of your program.  Such
statements are GOBACK, GO TO, and STOP RUN.

So, guessing that you might have something like:
    my-exit-routine.
        STOP RUN.
you know the cause of the warning diagnostic.  You are being warned (that's
what the 'W' is about) because one reading a PERFORM statement would
normally assume that the PERFORMed procedure would return control to the
next statement following the PERFORM.

Best regards,
Tom Morrison
Liant Software Corporation



Mon, 04 Mar 2002 03:00:00 GMT  
 rm/cobol85 compile warning

Quote:

> Mark:

> Posting the code might eliminate some of the mystery, but here's a guess:

> Look at the paragraph (or section) "my-exit-routine" and I think you will
> find that it ends (has as its last statement) a statement which causes
> unconditional transfer of control to some other part of your program.  Such
> statements are GOBACK, GO TO, and STOP RUN.

> So, guessing that you might have something like:
>     my-exit-routine.
>         STOP RUN.
> you know the cause of the warning diagnostic.  You are being warned (that's
> what the 'W' is about) because one reading a PERFORM statement would
> normally assume that the PERFORMed procedure would return control to the
> next statement following the PERFORM.

> Best regards,
> Tom Morrison
> Liant Software Corporation

ah yes, your guess was right, i've eliminated 'my-exit-routine' altogether and
have let the program stop run on its own accord, so to speak :)  (ie not from a
perform etc statement)..
i'll be sure to remember this in the future,
thank you both for replying.

- mark d



Tue, 05 Mar 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. RM/COBOL85 PROBLEM?

2. RM/Cobol 85 v.6.5 applications developed with RM/Panels running under W95

3. Problem with RM/COBOL, RM+DB & telnet

4. CW2.003 - hand coded reports compile warning - help!

5. HELP!!! Compile Warnings and Errors

6. how to compile and a set of .prg file I am getting this warning

7. Warnings at compile time for possible runtime pattern matching failure

8. ADA Compile Warning

9. compile warning

10. Warning compiling data structure

11. Problems with DVF (warning messages and compiling the wrong files)

12. Compiling warning ...

 

 
Powered by phpBB® Forum Software