[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Showing value of a s/g



Reply to note from Harry Binswanger  Fri, 07 Sep
2007 16:47:17 -0400

> >Isn't it PV?
>
> I know how to do it in a program, I want to do it from the
> command line, like we do with: va/nv $sl
>
> For instance, I call a U2 routine that puts something into s/g
> 50. I don't see anything on the prompt line. I was supposed to
> have something in s/g 50 "going in" to the routine, and maybe I
> messed that up, so I want to know what's now in 50.

You have the right syntax: VA/NV @nn, where nn is the
Save/Get ID (0-9|A-Z|100-1999). Note the last range in the usage:
it starts at 100. The problem with "VA/NV @50" is that S/Gs in the
range 00-99 are *transient*, meaning that they lose content (and
become uninitialized) the instant the program that EXits, or stops
RUNning. So, of course "VA/NV @50" always returns a blank PRompt;
if you can issue the command, there is necessarily no program
running and S/G 50 is non-existent.

There are tools in U2 for capturing and viewing the runtime contents
of S/Gs: XPOLL and XRAY. If you want to view S/G contents
immediately before a program EXits, use XPOLL, as in
XPOLL framename arg or XPOLL RUN MYGREAT.PM (note
"" in the second command, NOT ""). XPOLL displays
the contents of all transient S/Gs 00-99; if you want to limit the
listing to a particular S/G or range, use, e.g.,
XPOLL:50 framename arg. Very handy.

If you want to view S/G contents at any point *during* execution,
use XRAY; follow the Help-screen instructions for embedding XRAY
statement(s) at the desired checkpoints in your code; issue
HELP XRAY for details.

--
Carl Distefano
cld@xxxxxxxx