× 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.



On 8/31/16, 11:00 AM, dlclark@xxxxxxxxxxxxxxxx wrote:
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 08/31/2016
01:56:19 PM:
Is there a way for a CL program to check whether a subsystem is up?

You can call an RPG service procedure from a CL program to get the
subsystem status. The following is jsut such an RPG service procedure
which I wrote.

That led me to something much simpler:


DCL VAR(&RCVR) TYPE(*CHAR) LEN(38)
DCL VAR(&RCVL) TYPE(*INT) LEN(4) VALUE(38)
DCL VAR(&ERROR) TYPE(*CHAR) LEN(8) +
VALUE(X'0000000000000000')

CALL PGM(QWDRSBSD) PARM(&RCVR &RCVL 'SBSI0100' +
'BAR FOO ' &ERROR)

IF COND(%SST(&RCVR 29 10) *EQ '*INACTIVE ') +
THEN(STRSBS SBSD(FOO/BAR))

More elegant than STRSBS with a MONMSG, and it gives one a choice of how to respond to the "*INACTIVE" status, either starting the subsystem, or falling back on QINTER or some such.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.