× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rich you are right.
In my old age I forget things.
The problem I had with ENDJOB was keeping track of
the job number.
To prevent multiple 'Terminations' I do one of 2 things.
1. I check for locks on a data area. This requires the
active job to apply a lock on a data area.
2. I have a CHKJOB command that tells me if the job
is active or on a jobq.  This second method is also useful
to prevent multiple 'Starts' as it detects jobs in JOBQs.

I think I got the original code from MC Computing Magazine
by Ernie Malaga and modified it. (WRKJOBS)
I would post the code here if someone can clarify the
copyright issues.

Frank Kolmann



From: Rich Duzenbury <rduz@westernmidrange.com>

At 05:16 PM 12/2/02, you wrote:
>I use OVRDBF EOFDLY, the program goes into state EOFW.
>You will need to make provision to tell the program
>to terminate.  I usually write a record to the
>file with EOFDLY with a special value eg.
>'TERMINATE' the program checks for the value then
>ends. (Seton LR , RETURN etc)

I've had negative experiences with programs that write special 'terminate'
messages.  It seems that folks will run them more than once, such that the
next time the service starts, it immediately terminates itself.  Several
years ago, I saw an amusing case where several tens of 'terminate' messages
were written to the file.  Needless to say, the service would not stay
active until special action was taken to clear the bogus messages.

I don't believe you have to go to any such trouble as to write a special
record.  As I recall, a controlled end of job will terminate the read
statement.  Then, simply run the SHTDN opcode to test to see if the job is
being ended.  If so, terminate gracefully.

Regards,
Rich




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.