Did you know that there is now an Application Program Interface available in r11 to allow access to MVS Static System Symbols?

Document ID : KB000055552
Last Modified Date : 14/02/2018
Show Technical Document Details

The API is named $CAPKBIF and it is documented in Chapter 7 of the Unicenter NetMaster, NetSpy, and SOLVE Network Control Language Reference.

For example, the following NCL could be used to display all Static System Symbols:

&CALL PROC=$CAPKBIF PARMS=(PLEXSYM,,COUNT)
&Count = &$CAVALUE
&WRITE Number of PLEXSYM variables = &Count
&SYM =
&I = 1
&DOWHILE &I LE &Count
&CALL PROC=$CAPKBIF PARMS=(PLEXSYM,&SYM,NEXT)
&SYM = &$CAVALUE
&CALL PROC=$CAPKBIF PARMS=(PLEXSYM,&SYM,VALUE)
&WRITE &I &SYM=&$CAVALUE
&I = &I + 1
&DOEND

The following is an example of the output produced:

Number of PLEXSYM variables = 11

  1. DBTV1=CICST1
  2. HSM=4N
  3. MAESCLNT=IMS11
  4. MAESNAME=MAZ11
  5. SYS=11
  6. SYSALVL=2
  7. SYSCLONE=11
  8. SYSNAME=CA11
  9. SYSPLEX=PLEXC1
  10. SYSPV=SYSP01 11
  11. SYSR1=MVR16D

Question: What if I only want to display one static system symbol?

Answer: A program like the following could be used to display one particular system symbol.

&CALL PROC=$CAPKBIF PARMS=(PLEXSYM,&1,VALUE)
&IF .&$CAVALUE NE . &THEN +
   &WRITE TERM=YES LOG=NO DATA=The symbol for &1 is &$CAVALUE
&ELSE +
   &WRITE TERM=YES LOG=NO DATA=No symbol found for &1

It could be invoked with the name of the symbol you wanted to display.

For instance, if the program is called PLEXSYM and PLEXSYM SYSNAME is entered, the following would be returned:

The symbol for SYSNAME is XE61

If SYSNAME is not found, the following would be returned:

No symbol found for SYSNAME