How to list the OPSMVS Global Temp Variables
search cancel

How to list the OPSMVS Global Temp Variables

book

Article ID: 235361

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

How can I easily find all of the GLOBALx and GLVTEMPx variables without needing to go through all of the entries, one at a time, on panel =4.8?

Environment

Release : 14.0

Component : OPS/MVS

Resolution

An easier way to see the variables would be to use the below REXX code. It will need to be run twice, once for the GLOBALx variables, and then again for the GLVTEMPx variables.  Set the variable GLVSTEM with the correct prefix, ie, GLVSTEM = 'GLOBAL', and GLVSTEM = 'GLVTEMP' .   It will then search for GLOBAL1, global2, etc , and then for GLVTEMP1, 2, etc

 

/*  GLVCHECK:  CHECK FOR NUMBER OF GLOBALS UNDER ALL VALID STEMS      */

 

GLVSTEM = 'GLOBAL'                               /* VALID STEMS      */

VALIDIDS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'  /* VALID ID'S       */

DO J = 1 TO WORDS(GLVSTEM)                        /* LOOP THRU STEMS  */

  GLV = WORD(GLVSTEM,J)                           /* SET GLV TO STEM  */

   DO I = 1 TO LENGTH(VALIDIDS)                   /* LOOP THRU ID'S   */

     ID = SUBSTR(VALIDIDS,I,1)                    /* GET NEW ID       */

     VALUE = GLV || ID                    /*  SET VALUE TO STEM || ID */

     CALL CHECKIT                                 /* CALL CHECKIT     */

   END                                            /* END I LOOP       */

END                                               /* END J LOOP       */

EXIT                                              /* TERMINATE PGM    */

 

CHECKIT:                                      /* SUBPROCEDURE CHECKIT */

PROCEDURE EXPOSE VALUE                        /* EXPOSE VALUE         */

 VALUE = STRIP(VALUE)                         /* CHK FOR GLVTEMP      */

 IF VALUE = 'GLVTEMP' THEN RETURN             /* IF GLVTEMP INVALID   */

 VERIFY = OPSVALUE(VALUE,'K')                 /* OPSVALUE K           */

    IF VERIFY > 0 THEN DO                     /* IF VALUE EXISTS      */

      SAY '***>'VALUE' STEM HAS 'VERIFY' SUBNODES.' /* SAY NUMBER     */

      X = OPSVALUE(VALUE,'S')

      DO WHILE QUEUED()>0                     /* LIST ALL SUBNODES    */

        PULL IT

        SAY IT

      END

    END

RETURN