Thanks for the info Charles. Can you please tell me the address of the u2ug wiki site. I have checked all the email from the u2-users group and cannot find the web site address. I saw a couple of reference about the site coming soon... Even checked the u2ug.org site and cannot get reference to the wiki site.
Thanks Bernard Lubin Development Department Reynolds and Reynolds -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stevenson, Charles Sent: Wednesday, 5 September 2007 2:30 AM To: u2-users@listserver.u2ug.org Cc: Bernard Lubin Subject: RE: [U2] [UV] - Getting the call stack trace within a program I posted the following when SYSTEM(9001) was invented. It's gotta be in the archives somewhere. I recently added it to the newly developing U2UG Wiki, along with a table of other un- or poorly documented uses of SYSTEM(n), sorted by said "n". Most info I gleaned from u2-users list archives. Some formatting is lost Cut&Pasting it back to this text-only format, but here it is: _____________________ SYSTEM(9001) Call stack of current process SYSTEM(9001) tells you what program you are in & where you came from! It will return a dynamic array that contains roughly the same info that PORT.STATUS LAYER.STACK or RAID "T" command coughs up. - Value 1 of each attribute is the depth in the return stack Non-negative numbers mean that those programs are all part of the return stack. 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. - Value 2 is the program - Value 3 is the hex address The object address you see when you VLIST a program For the negative depths, n/a. (0x0 on DUMMY example is real. They are small programs.) - The number of values is constant, the number of attributes grows or shrinks. Oh well. One caution: The data is turned 90 degrees from conventional MV data design: the values "should" have been the attributes; the attributes, values. Each value has a different meaning, multi-attributes for multiple occurrences. ------------------------------------------------------------------------ -------- 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/SYS90010x6 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~}/dbms/uv/catdir/*UVPRINTMS G}0x4b40~0}/dbms/uv/catdir/-MATBLOCK}0x01}/dbms/uv/catdir/-PERMISSIONS}0 x0~-2}/dbms/uv/catdir/-GET.FILE.NAME}0x0~-3}/dbms/uv/BP.O/ED.B}0x0~" ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/