|
John McKee on 01/16/2013 04:17 PM wrote:
I am reaching here. From a Unix class over twenty years ago,
shutdown of the system (that system did not have a handy-dandy
shutdown command) used two kill commands. The first was sent with
(I think) a value of 1, and processes could trap that code. They
could either just ignore it or do something. A short time later, a
kill with a 9 was sent. This killed the process as it could not be
caught or ignored. Maybe the *CNTRLD option does something like
this deep under the covers. Suppose system was not in restricted
state. A *CNTRLD shutdown >could< be used to allow processes
(subsystems) the opportunity to gracefully end. <<SNIP>>
There is function like that built into the system. And it was
recently discussed on this list. RPG can check for %SHTDN
http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/topic/rzasd/sc092508873.htm#bbshut
CL can check for RTVJOBA ENDSTS(&ENDSTS)
Those get activated when a *CNTRLD is done. Either via ENDJOB or
ENDSBS or even PWRDWNSYS. The problem is, let's say you have a data
queue program. You wait on the data queue for 30 seconds. If no
activity you check for %SHTDN. If no shutdown you go wait another 30
seconds. Now, someone runs PWRDWNSYS *CNTRLD DELAY(1). %SHTDN is
activated but you won't check it until the next loop. Before that
loop gets activated the *CNTRLD automatically gets changed to *IMMED
and your job goes down hard.
Event driven languages can process this differently than procedural
languages.
You can try to submit a DCR or a COMMON requirement that %SHTDN hit
an interactive program waiting on a screen as if a function key was
pressed and you can check that indicator.
Sounds simple and reasonable, and wouldn't necessarily be disruptive
on existing programs, but I question whether IBM would avoid it out
of hand as it has anything to do with updating the 5250 experience.
This mailing list archive is Copyright 1997-2026 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.