Donnie, Here's a post from a year ago that I saved for my own reference. cds
-----Original Message----- From: Stevenson, Charles Sent: Wednesday, June 23, 2004 8:32 AM To: 'u2-users@listserver.u2ug.org' Subject: [UV] SYSTEM(9001) (was: [U2] SYSTEM(49) on UV) > From: Leroy Dreyfuss > > SYSTEM(9001) was added at 10.0.4 and was improved upon later... > ...the 10.0 manuals will not have it.... > > BTW: this isn't the first time SYSTEM(9001) appeared on this list.... I think I probably first reported it on this list and tried to document how it works out of gratitude. I dug the following from the list archive, http://www.indexinfocus.com/. Until the manual is updated, I hope this documentation is good enough: 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 u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/