Discussione:
SAVSYS
(troppo vecchio per rispondere)
MarcoG
2013-11-18 14:01:40 UTC
Permalink
ciao, c'è modo di eseguire un savsys senza tenere impegnata la console?
una specie di SAVSYS batch in qctl!
Dovrei lanciarlo su una macchina a v7r1, ora è un pc in lan, ma dato che
dei pc non mi fido mai abbastanza.... Che dite mi posso fidare?
Ciao
MarcoG
Emanuele Spinelli
2013-11-18 14:43:09 UTC
Permalink
Post by MarcoG
ciao, c'è modo di eseguire un savsys senza tenere impegnata la console?
una specie di SAVSYS batch in qctl!
Dovrei lanciarlo su una macchina a v7r1, ora è un pc in lan, ma dato che
dei pc non mi fido mai abbastanza.... Che dite mi posso fidare?
Ciao
MarcoG
non puoi eseguire un savsys in batch, devi farlo a macchina dedicata
dalla console con go save opz.21
Salvo che il pc sia una ciofeca esagerata non avrai sicuramente problemi
MarcoG
2013-11-18 14:50:24 UTC
Permalink
Post by Emanuele Spinelli
non puoi eseguire un savsys in batch, devi farlo a macchina dedicata
dalla console con go save opz.21
Salvo che il pc sia una ciofeca esagerata non avrai sicuramente problemi
Eh si immaginavo, grazie.
Roberto Tempesti
2013-11-18 15:16:18 UTC
Permalink
Post by MarcoG
Post by Emanuele Spinelli
non puoi eseguire un savsys in batch, devi farlo a macchina dedicata
dalla console con go save opz.21
Salvo che il pc sia una ciofeca esagerata non avrai sicuramente problemi
Eh si immaginavo, grazie.
Ho trovato questa segnalazione:

<quote>
Actually, as of V5R3, you can run a SAVSYS in batch as long as you put
together a CL program and the job is submitted to jobq QCTL. The CL should
contain:
ENDSBS SBS(*ALL) OPTION(*IMMED) BCHTIMLMT(720)

The BCHTIMLMT is the amount of time, in minutes, used to bring the system
"back to life" in case there is a problem. You can then add a SAVSYS and any
other save commands you like.
<unquote>

Vedi se ti puo' servire.

Saluti
MarcoG
2013-11-18 15:55:13 UTC
Permalink
Post by Roberto Tempesti
<quote>
Actually, as of V5R3, you can run a SAVSYS in batch as long as you put
together a CL program and the job is submitted to jobq QCTL. The CL should
ENDSBS SBS(*ALL) OPTION(*IMMED) BCHTIMLMT(720)
The BCHTIMLMT is the amount of time, in minutes, used to bring the system
"back to life" in case there is a problem. You can then add a SAVSYS and any
other save commands you like.
<unquote>
Vedi se ti puo' servire.
Saluti
grazie, ho cercato in internet è ho trovato questo:
http://www-01.ibm.com/support/docview.wss?uid=nas8N1015176
Franco Lombardo
2013-11-18 17:36:08 UTC
Permalink
Interessante. Sapete se la stessa cosa può essere utilizzata per RCLSTG?

Grazie

Ciao

Franco


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.francolombardo.net
Scala, Java, As400.....
http://twitter.com/f_lombardo
http://www.linkedin.com/in/francolombardo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CRPence
2013-11-18 18:57:10 UTC
Permalink
<<SNIP>> Sapete se la stessa cosa può essere utilizzata per RCLSTG?
Since v5r3 I believe... when the command was changed to ALLOW(*ALL)
to avoid CPD0031 [or a warning on compile per CPD0772]. Anything for
which its processing can be performed in batch [as noted, that since
includes the Reclaim Storage command], and for which the timing [length
of time required to complete] is either predictable or for which its
termination before that required length of time is either innocuous or
easily-recovered, that processing can be performed using the Batch Time
Limit (BCHTIMLMT) feature of the End Subsystems (ENDSBS).

As such, it is recommended that the Reclaim request should *not*
include the *DBXREF portion, unless sufficient recovery time is allowed
to complete a separate RCLSTG SELECT(*DBXREF) afterward; in case the
RCLSTG was not able to complete in the time allotted. The reclaim of
the Database Cross-Reference information is sensitive to cancellation
whereas the request to RCLSTG SELECT(*ALL) OMIT(*DBXREF) is designed to
allow interruption without negative consequences.
--
Regards, Chuck
Franco Lombardo
2013-11-19 10:48:59 UTC
Permalink
So something like this should work:

PGM
MONMSG MSGID(CPF0000 MCH0000 CPD0000) EXEC(GOTO +
CMDLBL(END_PGM))
ENDHOSTSVR SERVER(*ALL)
ENDTCPSVR SERVER(*ALL)
DLYJOB DLY(60)
ENDSBS SBS(*ALL) OPTION(*IMMED) BCHTIMLMT(*NOMAX)
DLYJOB DLY(120)
RCLSTG SELECT(*DBXREF) /* *DBXREF is THE reason for RCLSTG
:-) */

END_PGM: PWRDWNSYS OPTION(*IMMED) RESTART(*YES)
ENDPGM

Thanks

Bye

Franco

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.francolombardo.net
Scala, Java, As400.....
http://twitter.com/f_lombardo
http://www.linkedin.com/in/francolombardo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CRPence
2013-11-19 18:11:58 UTC
Permalink
Post by CRPence
<<SNIP>> Sapete se la stessa cosa può essere utilizzata per RCLSTG?
Since v5r3 I believe... when the command was changed to ALLOW(*ALL)
<<SNIP>>
PGM
MONMSG MSGID(CPF0000 MCH0000 CPD0000) +
EXEC(GOTO CMDLBL(END_PGM))
ENDHOSTSVR SERVER(*ALL)
ENDTCPSVR SERVER(*ALL)
DLYJOB DLY(60)
ENDSBS SBS(*ALL) OPTION(*IMMED) BCHTIMLMT(*NOMAX)
DLYJOB DLY(120)
RCLSTG SELECT(*DBXREF) /* *DBXREF is THE reason for RCLSTG :-) */
PWRDWNSYS OPTION(*IMMED) RESTART(*YES)
ENDPGM
That may be intended as an example only as an approximation rather
than what someone might really want to code, so I offer some possible
concerns, for which some thought might best be given before implemented
exactly that. So FWiW:

That program would have the system restarting even when the reclaim
was unable to start; e.g. if the subsystems had not yet ended, or any
errors on the prior ENDxxx requests. That may be desirable, but seems
contrary to general expectation. I would likely code the target EXEC()
of the monitor to restart the controlling subsystem [perhaps using a
feature that effects a partial restart] rather than PwrDwn... to notify
of the failure and allow for [remote] review. And only have the Power
Down System request occur after the apparent successful completion of
the synchronous portion of the RCLSTG request.

The global Monitor Message (MONMSG) need only include CPF0000 [or
just CPF9999]. The others are extraneous, such that any message with
either prefix within that full-range are issued, the effect is firstly
incorrect [a defect], and secondly the CPF0000 would intercept the
failure because the initial effect is CPF9999 is within the range of
CPF0000.

As noted in my prior reply <snipped from quote>, if the BCHTIMLMT is
insufficient for the RCLSTG SELECT(*DBXREF) to complete, then the
interrupted request will have to be repeated; and that next time,
allowed to complete. The benefit of that request over including the
DBXRF data with the RCLSTG SELECT(*ALL), is that the processing is
performed /gather-first/ and the results processed from a queue in the
background system jobs QDBSRVXR* jobs. Effectively, if _all_ gathered
data fits on the queues, then all of the remaining work is being
processed asynchronous to that program. Having the system ending
immediately afterward, will have the system completing that background
processing, after the system restarts; ending the system /immediately/
vs controlled does not allow that system job to be notified of the
ending... albeit IIRC those jobs do not look at the ending status anyhow.

Ending host servers and TCP/IP first is pure nonsense. If required,
that is surely an indication of a defect with the Operating System.
Thus if implementing those requests is required to avoid a problem,
doing that is clearly a *circumvention* of whatever is that defect.

Rather than a hard-coded DLYJOB [that could be too short or too long
in-waiting], the effect of /restricted state/ should be verified using
either an event [the *SYSOPR message queue gets notified] or polling for
the /restricted state/ condition either by repeated ENDSBS *ALL requests
[IIRC that is possible] or by using an API that returns the /restricted
state/ indicator; e.g. the Work Management "Retrieve System Status
(QWCRSSTS) API" with the "SSTS0200 Format".
--
Regards, Chuck
Franco Lombardo
2013-11-20 07:58:48 UTC
Permalink
Chuck,

first of all, thanks for your answer: great ideas, as usual!
if the BCHTIMLMT is insufficient for the RCLSTG SELECT(*DBXREF)....
but I used BCHTIMLMT(*NOMAX), I think it would be a sufficient time :-) or
am I missing something?
What is unclear to me is your explanation of the "asynchronous" behaviour of
RCLSTG: does the command end while some of its work is still running in
system jobs? So, how could I understand when to end the system? Maybe using
PWRDWNSYS OPTION(*CNTRLD)?

Thanks a lot.

Bye

Franco

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.francolombardo.net
Scala, Java, As400.....
http://twitter.com/f_lombardo
http://www.linkedin.com/in/francolombardo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CRPence
2013-11-20 17:17:32 UTC
Permalink
Post by Franco Lombardo
if the BCHTIMLMT is insufficient for the RCLSTG SELECT(*DBXREF)...
but I used BCHTIMLMT(*NOMAX), I think it would be a sufficient time
:-) or am I missing something?
I was trying to be generic in my comment, with regard to the reclaim
of the system Database Cross-Reference request being interrupted; i.e.
any interruption requires restarting the request, to recover. I
realize, by re-reading, my intended implication was not very clear. It
is correct, that the specific\shown *NOMAX would be sufficient to avoid
a timeout. However...

As I recall there are numerous /warnings against/ using *NOMAX
because the termination of the request requires a forced-pwrdwn from the
panel [or equivalent], if for any reason the request needed to be
terminated. While the concept of /no specific time limit/ is compatible
with computing and theory, the reality is that giving up the computer
for an indefinite amount of time is not generally an option; i.e.
realities of specific time-requirements trump the theoretical lack of
specific time-requirements. Because there is no feedback from the
request [as there could be, or means to inquire such as SysRqs-3, given
the request had instead been performed from a workstation], there is
limited means to know if two hours later, that the request is likely to
complete versus knowing if the request might be looping, hung, or in an
indefinite-wait [such as a deadlock].
Post by Franco Lombardo
What is unclear to me is your explanation of the "asynchronous"
behaviour of RCLSTG: does the command end while some of its work is
still running in system jobs? So, how could I understand when to end
the system? Maybe using
PWRDWNSYS OPTION(*CNTRLD)?
There is no *requirement* to avoid ending the system to allow the
asynchronous work to complete, because the QDBSRVXR* jobs must be able
to handle the termination without losing track of its work. The point
was merely to reveal that some amount of asynchronous work likely will
pend the system restarting.... and thus that background work restarts
after the system restarts, and thus any impacts from that pending work
may be experienced then. So *if* there is some benefit to knowing that
[most of the] work will be completed before the PwrDwn\restart...

I do not recall if there was a feature that was integrated into the
OS specifically to enable detection of the completion of the amount of
work for either job, but IIRC there are methods to detect at least that
the primary enqueued [queued-up] entries [those on the first queue] have
since been emptied; analogously, detecting the first of two pipes has
been drained. One of the following should suffice for a means to effect
a wait, until the first queue is emptied; in order of preference and
likelihood of effecting the wait:
- call the Retrieve Short Name (QDBRTVSN) API to request the
short\system name from a long-name; e.g. of SYSROUTINES in QSYS2
- create a long-name database file into a non-QTEMP [user] library
- create\add a constraint to a file in a [user] library
- rcldbxref *check /* may or may not by design, have a wait */
- the RDB Directory commands function on a timeout, so paired
ADDRDBDIRE\RMVRDBDIRE [or requests to CHGRDBDIRE] could be used to
implement a timed-wait polling.

These other requests below can be composed to detect if work remains
[though waiting would require coded-delay with loop\polling], from
either job, but depends on the implementation details; i.e. which named
queues... but no requirement to parse the output nor reverse-engineer
the counts, by using the known number or spool records to force the dump
request to fail if any messages were on the queue [and OVRDBF can be
used with a SIZE() limit on the database file but that is more complicated]:
- dmpsysobj qdbxrefq qsys 0a c4 /* limit MaxRcds with OVRPRTF */
- dmpsysobj qdbxrefq2 qsys 0a c4 /* limit MaxRcds with OVRPRTF */
- rcldbxref *check LIB(last_alphabetic) /* if no-wait per prv ref */
--
Regards, Chuck
Franco Lombardo
2013-11-20 17:37:40 UTC
Permalink
:-O

Thanks a lot!

Bye.

Franco

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.francolombardo.net
Scala, Java, As400.....
http://twitter.com/f_lombardo
http://www.linkedin.com/in/francolombardo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CRPence
2013-11-24 19:09:38 UTC
Permalink
Post by CRPence
<<SNIP>> Sapete se la stessa cosa può essere utilizzata per
RCLSTG?
Since v5r3 I believe... when the command was changed to ALLOW(*ALL)
to avoid CPD0031 [or a warning on compile per CPD0772]. Anything for
which its processing can be performed in batch [as noted, that since
includes the Reclaim Storage command], and for which the timing
[length of time required to complete] is either predictable or for
which its termination before that required length of time is either
innocuous or easily-recovered, that processing can be performed using
the Batch Time Limit (BCHTIMLMT) feature of the End Subsystems
(ENDSBS). <<SNIP>>
Seems the ALLOW(*ALL) change was probably only since v7r1, so the
CHGCMD RCLSTG ALLOW(*ALL) will be required to prevent the errors in
older releases; library-qualify, as-necessary, the CMD() parameter
specification on the Change Command request(s). There is AFaIK, no
restriction in prior releases, for making that change.

http://archive.midrange.com/midrange-l/201311/msg00715.html
http://archive.midrange.com/midrange-l/201311/msg00714.html
--
Regards, Chuck
Continua a leggere su narkive:
Loading...