Home > AS/400 Tips > iSeries administrator tips > Use the RTVSBSSTS command to retrieve the subsystem status
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

Use the RTVSBSSTS command to retrieve the subsystem status


Marti Riera Blanc
04.03.2006
Rating: -4.20- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Values that can be returned for subsystem status:

*ACTIVE The subsystem is running.

*ENDING The subsystem are ending.

*INACTIVE The subsystem is not running.

*RESTRICT(ED) The controlling subsystem in a restricted condition.

*STARTING A STRSBS command has been issued for the subsystem *BLANKS Cannot allocate subsystem description.

 
CMD Source:
/*----------------------------------------------------------------MRB*/
/* Retrieve Subsystem Status (calling API QWDRSBSD)                  */
/*-------------------------------------------------------------------*/
/* CRTCMD CMD(RTVSBSSTS) PGM(*LIBL/RTVSBSSTSC) RCFILE(MYLIB/MYSRCFIL)*/
/*   ALLOW(*IPGM *BPGM) HLPPNLGRP(*LIBL/RTVSBSSTSP) HLPID(RTVSBSSTS) */
/*-------------------------------------------------------------------*/
/* Marti Riera 13/11/2003                                            */
/* http://www.recursos-as400.com/                                    */
/* mailto:mrierab@terra.es                                           */
/*-------------------------------------------------------------------*/
/* Values that can be returned for sbs status (&SBSSTS):             */
/* *ACTIVE       The subsystem is running.                           */
/* *ENDING       An ENDSBS command has been issued for the subsystem */
/*               or an ENDSYS command has been issued, but the       */
/*               subsystem is still running.                         */
/* *INACTIVE     The subsystem is not running.                       */
/* *RESTRICT(ED) An ENDSBS command for the controlling subsystem,    */
/*               an ENDSYS *ALL command, or an ENDSYS command has    */
/*               has placed the controlling subsystem in a           */
/*               restricted condition.                               */
/* *STARTING     A STRSBS command has been issued for the subsystem, */
/*               but it is still in the process of being started.    */
/* *BLANKS       Cannot allocate subsystem description.              */
/*-------------------------------------------------------------------*/
/* More information:                                                 */
/* http://publib.boulder.ibm.com/pubs/html/as400/v5r1/ic2931/index.htm?-
          info/apis/qwdrsbsd.htm                                     */
/*-------------------------------------------------------------------*/
             CMD        PROMPT('Retrieve Subsystem Status')
             PARM       KWD(SBSNAM) TYPE(SBSNAM) SNGVAL((*)) MIN(1) +
                          PROMPT('Subsystem name')
 SBSNAM:     QUAL       TYPE(*NAME) LEN(10) EXPR(*YES)
             QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                          SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
                          PROMPT('Library')
             PARM       KWD(SBSSTS) TYPE(*CHAR) LEN(9) RTNVAL(*YES) +
                          PROMPT('CL var Subsystem Status (9)') CLP Source:
/*----------------------------------------------------------------MRB*/
/* Retrieve Subsystem Status (calling API QWDRSBSD)                  */
/* Marti Riera 13/11/2003                                            */
/* http://www.recursos-as400.com/                                    */
/* mailto:mrierab@terra.es                                           */
/*-------------------------------------------------------------------*/
/* Values that can be returned for sbs status (&SBSSTS):             */
/* *ACTIVE       The subsystem is running.                           */
/* *ENDING       An ENDSBS command has been issued for the subsystem */
/*               or an ENDSYS command has been issued, but the       */
/*               subsystem is still running.                         */
/* *INACTIVE     The subsystem is not running.                       */
/* *RESTRICT(ED) An ENDSBS command for the controlling subsystem,    */
/*               an ENDSYS *ALL command, or an ENDSYS command has    */
/*               has placed the controlling subsystem in a           */
/*               restricted condition.                               */
/* *STARTING     A STRSBS command has been issued for the subsystem, */
/*               but it is still in the process of being started.    */
/* *BLANKS       Cannot allocate subsystem description.              */
/*-------------------------------------------------------------------*/
/* More information:                                                 */
/* http://publib.boulder.ibm.com/pubs/html/as400/v5r1/ic2931/index.htm?-
          info/apis/qwdrsbsd.htm                                     */
/*-------------------------------------------------------------------*/
             PGM        PARM(&SBSNAM &SBSSTS)
             DCL        VAR(&SBSNAM) TYPE(*CHAR) LEN(20)
             DCL        VAR(&SBSSTS) TYPE(*CHAR) LEN(9)
             DCL        VAR(&SBSSTSC) TYPE(*CHAR) LEN(12)
             DCL        VAR(&RCV) TYPE(*CHAR) LEN(244)
             DCL        VAR(&RCVL) TYPE(*DEC) LEN(4)
             DCL        VAR(&SBSFMT) TYPE(*CHAR) LEN(8)
             DCL        VAR(&ERR) TYPE(*DEC) LEN(4)
/* Set receiver variable to length = 136 */
             CHGVAR     VAR(&RCVL) VALUE(244)
/* Use qualified sbs name format */
             CHGVAR     VAR(&SBSFMT) VALUE(SBSI0200)
/* Retrieve subsystem status */
             CALL       PGM(QWDRSBSD) PARM(&RCV &RCVL &SBSFMT &SBSNAM
&ERR)
/* Extract sbs status from receiver */
             CHGVAR     VAR(&SBSSTSC) VALUE(%SST(&RCV 53 12))
             CHGVAR     VAR(&SBSSTS) VALUE(&SBSSTSC)
/* Send status */
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) +
                          MSGDTA('Subsystem status' *BCAT &SBSNAM +
                          *TCAT ' is' *BCAT &SBSSTSC *TCAT '.') +
                          MSGTYPE(*STATUS)
/* End program */
             RETURN
             ENDPGM
PNLGRP Source:
.*-----------------------------------------------------------------MRB*
.* Retrieve Subsystem Status (calling API QWDRSBSD)                   *
.* PANEL NAME  : RTVSBSSTSP  - Help Text                              *
.*--------------------------------------------------------------------*
.* CRTPNLGRP PNLGRP(*LIB/RTVSBSSTSP) SRCFILE(&MYSRCLIB/&MYSRCFILE)    *
.*--------------------------------------------------------------------*
.* Marti Riera 03/06/2005                                             *
.* http://www.recursos-as400.com/                                     *
.* mailto:mrierab@terra.es                                            *
.*--------------------------------------------------------------------*
.* 06/03/2006: Modificacion para recuperar mas estados de subsistema  *
.*             con el formato SBSI0200                                *
.*--------------------------------------------------------------------*
:PNLGRP.
.*--------------------------------------------------------------------*
.* Primary help text for the command.                                 *
.*--------------------------------------------------------------------*
:HELP NAME='RTVSBSSTS'.
Retrieve subsystem status
:P.
RTVSBSSTS Retrieve the subsystem status
:EHELP.
.*--------------------------------------------------------------------*
.*  Help text for the command parameters.                             *
.*--------------------------------------------------------------------*
:HELP NAME='RTVSBSSTS/SBSNAM'.
:XH3.Subsystem name (SBSNAM)
:P.
Input the subsystem and library name.
:EHELP.
.**********************************************************************
:HELP NAME='RTVSBSSTS/SBSSTS'.
:XH3.Subsystem Status (SBSSTS)
:P.
Specified the name of the CL variable that receives the value subsystem status.
The variable must be a character variable with minimum length of 9 characters.
:P.
Note: For compatibility with previous version of command, the length of
9
characters is used, for that reason value *RESTRICTED is given back *RESTRICT.
:P.
Values that can be returned for subsystem status:
:P.
:HP2.*ACTIVE:EHP2. The subsystem is running.
:P.
:HP2.*ENDING:EHP2. An ENDSBS command has been issued for the subsystem or an ENDSYS command has been issued, but the subsystem is still running.
:P.
:HP2.*INACTIVE:EHP2. The subsystem is not running.
:P.
:HP2.*RESTRICT(ED):EHP2. An ENDSBS command for the controlling subsystem, an ENDSYS *ALL command, or an ENDSYS command has placed the controlling subsystem in a restricted condition.
:P.
:HP2.*STARTING:EHP2. A STRSBS command has been issued for the subsystem, but it is still in the process of being started.
:P.
:HP2.*BLANKS:EHP2. Cannot allocate subsystem description.
:EHELP.
.*--------------------------------------------------------------------*
:EPNLGRP.

  
  


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries administrator tips
Analyze the health of your IBM i server with iScore
Researching high availability for your System i shop
Translating Linux for IBM i admins: Using GUI to make it easy
Translating Linux for IBM i admins: Working with jobs and networking
OpenOffice: What to know before making the transition from Microsoft Office
OpenOffice: An enterprise open source solution
Database performance comparisons on IBM i
Translating Linux for IBM i admins: User profile commands
Modern System i reports using Client Access
Tips for installing Lotus Domino server on a System i partition

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts