© serviceprofessionalgmbh

During test it is often useful to look up various variables in the ISPF pools. Yet typing the required VGETs and SAYs in the trace makes it all very tedious. This little routine offers the possibility to retrieve any number of variables from the pool and display their content on the screen. Input for the routine is a character string consisting of the required variablename divided by comma.

/*
   REXX * SVAR
   LESEN BELIEBIGER VARIABLEN AUS DEN ISPF-POOLS
   UND AUSGABE AM TERMINAL
*/
ARG VARNAMES ',' TYPE
IF VARNAMES = '' THEN call hilfe
SELECT
   WHEN left(TYPE,1) = 'S' THEN TYPE = 'SHARED'
   WHEN left(TYPE,1) = 'P' THEN TYPE = 'PROFILE'
   OTHERWISE                    TYPE = 'ASIS'
END
ADDRESS ISPEXEC
"VGET ("VARNAMES")"TYPE
SAY "FELD      LEN   INHALT  (RC AUS VGET:" RC "- AUS POOL:" TYPE
SAY "========  ===   ============================================="
DO I = 1 TO WORDS(VARNAMES)
   VAR = WORD(VARNAMES,I)
   SAY LEFT(VAR,9)"("RIGHT(LENGTH(VALUE(VAR)),3,0)") <"VALUE(VAR)">"
END
exit

hilfe:
   parse source . . name .
   DMY =  copies(" ",length(name))
   say "Aufruf:"
   say "          " dmy  "  .-------+"
   say "          " dmy  "  v       !"
   say ">>---- TSO" name "--- var --+--+--------------+---><"
   say "          " dmy  "             !              !"
   say "          " dmy  "             '--,--+- S -+--'"
   say "          " dmy  "                   !     !"
   say "          " dmy  "                   '- P -'"
exit
back to REXX with ISPF