George, It's better illustrated by multiple call levels. A colleague here wrote these specifically to test this:
STACK.1 SUBROUTINE STACK.1 CRT "|--------|" CRT CHANGE(SYSTEM(9001), @AM, CHAR(13):CHAR(10)) CRT "|--------|" RETURN STACK.2 SUBROUTINE STACK.2 CALL STACK.1 RETURN STACK.WRAP CRT @(-1) CALL STACK.2 And here's the results: |--------| 3ý/(absolute path)/BP.O/STACK.1ý0x6 2ý/(absolute path)/BP.O/STACK.2ý0x0 1ý/(absolute path)/BP.O/STACK.WRAPý0xe |--------| Best Regards, Richard Lewis On Tue, May 13, 2014 at 11:59 AM, George Gallen <ggal...@wyanokegroup.com>wrote: > Unless I'm doing it wrong....didn't look it up. > > For me - on UV 10.0.2 > > PRINT SYSTEM(9001) > STOP > END > > Outputs > > >RUN LIB TEST > 0 > > George > > -----Original Message----- > From: u2-users-boun...@listserver.u2ug.org [mailto: > u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson > Sent: Tuesday, May 13, 2014 1:55 PM > To: u2-users@listserver.u2ug.org > Subject: Re: [U2] Read yourself > > > I had posted an update, that I had tried it (it returns the program stack) > Its System(9001), and it will return the subroutine names in the stack as > well as the main program (on Universe 11 anyway) > > Someone has to try this on Unidata, and on D3 to make sure it also returns > the subroutine name. > > What it returns is the absolute path, so you would still need a program to > translate this into a LOCAL file name and program id, which is, to what, > I'm trying to get. > > Like I mentioned, I'm sure there is a way to do it, it's just a question > of whether someone has a routine which *does* this already, and the answer > is apparently not, so if I have to roll my own. > > > -----Original Message----- > From: George Gallen <ggal...@wyanokegroup.com> > To: U2 Users List <u2-users@listserver.u2ug.org> > Sent: Tue, May 13, 2014 10:40 am > Subject: Re: [U2] Read yourself > > > Does the 9001 call work for subroutines, or just the main program? > > Also, it's platform specific > > It all depends on what your trying to do, if the 9001 call works, great, > if not > figure something else out. > > -----Original Message----- > From: u2-users-boun...@listserver.u2ug.org [mailto: > u2-users-boun...@listserver.u2ug.org] > On Behalf Of Wjhonson > Sent: Tuesday, May 13, 2014 1:31 PM > To: u2-users@listserver.u2ug.org > Subject: Re: [U2] Read yourself > > > Well do you see any problem in just using the SYSTEM(9001) and ignoring > embedding this information ? > > > > > -----Original Message----- > From: George Gallen <ggal...@wyanokegroup.com> > To: U2 Users List <u2-users@listserver.u2ug.org> > Sent: Tue, May 13, 2014 10:27 am > Subject: Re: [U2] Read yourself > > > Then you would need to write another program that scans the programs and > checks > if the VERDATA element > For the program name matches the @ID in the program file - if not email > someone > to fix it. > > Then have it run nightly - so if it did get cloned without changing, it > wouldn't > > be that way > For long. > > George > > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users