|
Here's some code from our weekly backup program (is this legal ?):
It ends all subsystems, then checks every minute until subsystems are ended.
HTH,
Loyd
pgm
/* API variables */
dcl var(&receiver) type(*char) len(100)
dcl var(&receiverl) type(*char) len(4) value(x'00000064')
dcl var(&format) type(*char) len(8) value('SSTS0200')
dcl var(&reset) type(*char) len(10) value('*YES')
dcl var(&error) type(*char) len(4)
dcl var(&rstdflag) type(*char) len(1)
/* .... */
/* End subsystems for save operation */
sndpgmmsg msgid(cpf9898) msgf(qcpfmsg) +
msgdta('** Ending all subsystems immediately') tomsgq(*sysopr)
endsbs sbs(*all) option(*immed)
sbscheck:
call pgm(QWCRSSTS) parm(&receiver &receiverl &format &reset &error)
/* Restricted state flag is byte 31 (offset 30): */
/* 0 = not in restricted state */
/* 1 = restricted state */
chgvar var(&rstdflag) value(%sst(&receiver 31 1))
if cond(&rstdflag *eq '0') then(do)
sndpgmmsg msgid(cpf9898) msgf(qcpfmsg) +
msgdta('** Waiting for subsystems to end') tomsgq(*sysopr)
dlyjob dly(60)
goto cmdlbl(sbscheck)
enddo
/* In restricted state, can perform backup */
rste:
endpgm
-----Original Message-----
From: David Loveless [mailto:duke@julian.uwo.ca]
Sent: Wednesday, May 24, 2000 10:40 AM
To: MIDRANGE-L@midrange.com
Subject: Testing for Restricted Condition?
How can I verify that the machine is actually in Restricted Condition after
an
ENDSBS *All has been done in a CL program?
Thanks for your help!
--
David W. Loveless E-mail: duke@julian.uwo.ca
Technical Support Analyst Phone: (519)-661-2111 X85504
The University of Western Ontario FAX: (519)-661-3532
Information Technology Services
Room 12, Natural Sciences Building
London, Ontario, CANADA N6A 5B7
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.