/* Rexx - print static symbols */ /* Rather than chase control blocks this should be done by */ /* calling APIs but this does work as of z/OS 1.7 */ numeric digits 10 cvt=ptr(16) ecvt=ptr(cvt+140) sym =ptr(ecvt+296) entries = c2d(stg(sym+2,2)) say "There are "entries" symbols:" sym=sym+4 do a = 0 to entries-1 entry = sym+ptr((16*a)+sym) len = ptr(4+(16*a)+sym) name=stg(entry,len) entry = sym+ptr(8+(16*a)+sym) len = ptr(12+(16*a)+sym) val =stg(entry,len) say name"="val end Exit /*-------------------------------------------------------------------*/ ptr: Return c2d(storage(d2x(Arg(1)),4)) /* Return a pointer */ /*-------------------------------------------------------------------*/ stg: Return storage(d2x(Arg(1)),Arg(2)) /* Return storage */ /*-------------------------------------------------------------------*/