For Programmers: Free Programming Magazines  


Home > Archive > Cobol > February 2006 > Declarative USE AFTER question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Declarative USE AFTER question
apple.time@yahoo.com

2006-02-02, 6:55 pm

In an existing program, I am seeing :

DECLARATIVES.
LGLWKT SECTION.
USE AFTER STANDARD EXCEPTION PROCEDURE ON LGLWK.
LRVITYPE SECTION.
USE AFTER STANDARD EXCEPTION PROCEDURE ON LRVITYPE.
END DECLARATIVES.

So tell me, if I get an unexpected error code on either file, what
exactly will happen? From what I see, the system will go to these USE
statements, and then there is no commands within the section, so then
NOTHING will happen. And, control will just be passed back to the
point where the file I/O was happening, as if nothing bad happened.

I am on the road, and cannot try these out... can someone tell me if I
should worry about this?

Thanks

The Grue - James T. Sprinkle

2006-02-02, 6:55 pm


<apple.time@yahoo.com> wrote in message
news:1138913819.966598.111170@g44g2000cwa.googlegroups.com...
> In an existing program, I am seeing :
>
> DECLARATIVES.
> LGLWKT SECTION.
> USE AFTER STANDARD EXCEPTION PROCEDURE ON LGLWK.
> LRVITYPE SECTION.
> USE AFTER STANDARD EXCEPTION PROCEDURE ON LRVITYPE.
> END DECLARATIVES.
>
> So tell me, if I get an unexpected error code on either file, what
> exactly will happen? From what I see, the system will go to these USE
> statements, and then there is no commands within the section, so then
> NOTHING will happen. And, control will just be passed back to the
> point where the file I/O was happening, as if nothing bad happened.
>
> I am on the road, and cannot try these out... can someone tell me if I
> should worry about this?
>
> Thanks
>


Shouldn't you be at work working on your cobol code assessment?

The Grue


HeyBub

2006-02-02, 9:55 pm

apple.time@yahoo.com wrote:
> In an existing program, I am seeing :
>
> DECLARATIVES.
> LGLWKT SECTION.
> USE AFTER STANDARD EXCEPTION PROCEDURE ON LGLWK.
> LRVITYPE SECTION.
> USE AFTER STANDARD EXCEPTION PROCEDURE ON LRVITYPE.
> END DECLARATIVES.
>
> So tell me, if I get an unexpected error code on either file, what
> exactly will happen? From what I see, the system will go to these USE
> statements, and then there is no commands within the section, so then
> NOTHING will happen. And, control will just be passed back to the
> point where the file I/O was happening, as if nothing bad happened.
>
> I am on the road, and cannot try these out... can someone tell me if
> I should worry about this?
>
> Thanks


Suppose your program is supposed to process updates from a file generated by
another process. There may or may not be any updates to apply. The easy way
to test is to open the file, get back a "file not there" file status code
("35"), and so give the updating process a miss until tomorrow.

BUT - the operating system MAY intervene and crash the whole execution - or
at least display some annoying messages.

That's the main reason we used DECLARATIVES - to override busy-body,
meddling, OS.

Here's a test: Comment the DECLARATIVES and see if everything turns to shit.


2006-02-02, 9:55 pm

In article <1138913819.966598.111170@g44g2000cwa.googlegroups.com>,
apple.time@yahoo.com <apple.time@yahoo.com> wrote:
>In an existing program, I am seeing :
>
> DECLARATIVES.
> LGLWKT SECTION.
> USE AFTER STANDARD EXCEPTION PROCEDURE ON LGLWK.
> LRVITYPE SECTION.
> USE AFTER STANDARD EXCEPTION PROCEDURE ON LRVITYPE.
> END DECLARATIVES.
>
>So tell me, if I get an unexpected error code on either file, what
>exactly will happen?


Exactly what the code tells it to do... more or less, maybe, sometimes.

[snip]

>I am on the road, and cannot try these out... can someone tell me if I
>should worry about this?


No, you have nothing to worry about... your boss, your users, your
company, those are other questions.

DD

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com