Thanks! I guess I just need to upgrade my uv (9.6.1.4) to take advantage. That's enough incentive for me! -Dianne
Stevenson, Charles wrote: >>Is there a way in basic to get the name of the program you're >>in? I want to pass the name of the program to a subroutine >>for error reporting and I don't want to have to set a >>variable PROG.NAME = "THIS.PROG.NAME" >>in every program. I was hoping for some kind of @PROGNAME >>variable, but I can't find one. >> >> > >For UV SYSTEM(9001) and I'll dust off this old post from a couple years >ago: >-----Original Message----- >Subject: [UV] SYSTEM(9001) tells you what program you are in & where you >came from! >From: Stevenson, Charles ([EMAIL PROTECTED]) >Date: 03/20/03 > > >After whining about this for, lo, these many years let me be quick to >praise the Universe team for giving us this. This will be a wonderful >debugging tool! > > >UV 10.0.6 Patchlist says: > 2621 The UniVerse BASIC SYSTEM(9001) function now returns the > @LEVEL in correct order, and returns correct addresses. > > >SYSTEM(9001) will return a dynamic array that contains roughly the same >info that PORT.STATUS LAYER.STACK or RAID "T" command coughs up. > >Here is a sample subroutine that displays the data and a dummy program >that calls it. >Then from the menu, I get to pseudo-TCL and execute the dummy program. > > >CT CDS.BP SYS9001 DUMMY > > SYS9001 > 0001 SUBROUTINE SYS9001 > 0002 CRT "Depth Executing.......................... Address" > 0003 S = SYSTEM(9001) > 0004 FOR A = 1 TO COUNT( S, @AM ) > 0005 CRT S<A,1> "4R##: ": S<A,2> "40L#40": S<A,3> > 0006 NEXT A > 0007 CRT QUOTE( S ) > 0008 RETURN > > DUMMY > 0001 CALL SYS9001 > > >ED VOC LIST > 8 lines long. > > ----: XEQ RUN CDS.BP DUMMY > Executing the command "RUN CDS.BP DUMMY". > Depth Executing.......................... Address > 3: CDS.BP.O/SYS9001 0x6 > 2: CDS.BP.O/DUMMY 0x0 > 1: /dbms/uv/catdir/*UVPRINTMSG 0x4b40 > 0: /dbms/uv/catdir/-MATBLOCK 0x0 > -1: /dbms/uv/catdir/-PERMISSIONS 0x0 > -2: /dbms/uv/catdir/-GET.FILE.NAME 0x0 > -3: /dbms/uv/BP.O/ED.B 0x0 > >"3}CDS.BP.O/SYS9001}0x6~2}CDS.BP.O/DUMMY}0x0~1}/dbms/uv/catdir/*UVPRINTM >SG}0x4b40~0}/dbms/uv/catdir/-MATBLOCK}0x0~-1}/dbms/uv/catdir/-PERMISSION >S}0x0~-2}/dbms/uv/catdir/-GET.FILE.NAME}0x0~-3}/dbms/uv/BP.O/ED.B}0x0~" > > >One caution: the data is turned 90 degrees from the conventional way MV >data is handled (?what were they thinking?) > > - Value 1 of each attribute is the depth in the return stack, > The non-negative numbers mean that those programs are all part > of the return stack. > The negative numbers below simply mean those subroutines were > called and returned from in the past. > I don't think @LEVEL has anything to do with it, > contrary to the patchlist text. > That's as much as I've figured out so far. > > - Value 2 is the program > > - Value 3 is the hex address (the obj address you see when you VLIST a >program) > For the negative depths, n/a. > (0x0 on DUMMY is real. They are small programs.) > > - The number of values is constant, > the number of attributes grows or shrinks. Oh well. > >SYSTEM(9001) is not in the 10.0 doc set that came with my upgrade pack >from IBM, so I figured after all the complaining I have done I at least >owe this post. > > >Thank-you LeRoy & company, >Charles Stevenson ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
