ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Retrieve Configuration Status - Get the description of the status code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retrieve Configuration Status - Get the description of the status code

    Retrieve Configuration Status (RTVCFGSTS)


    0 VARIED OFF - The s
    10 VARY OFF PENDING - The description
    20 VARY ON PENDING - The descr
    ...

    this return the status code i want the description, how can i do it?
    Attached Files

  • #2
    The QDCRCFGS API returns the status code as well as the text.

    Comment


    • #3
      Hello Thunder,

      The RTVCFGSTS command (like most commands that start with RTV) is meant to be called from a CL program. To get back the status code, you can pass a CL variable in the STSCDE parameter. Here's a very simple example:

      Code:
      PGM
      
          DCL VAR(&STATUS) TYPE(*DEC) LEN(5 0)
      
          RTVCFGSTS CFGD(QPADEV003Q) CFGTYPE(*DEV) STSCDE(&STATUS)
      
          IF (&STATUS *GT 50 *AND &STATUS *LT 67) DO
             SNDUSRMSG  MSG('A user is active on this device.')
          ENDDO
      
      ENDPGM

      Comment

      Working...
      X