In UniData, there's a CTLGTB file (not directory) with dictionary items and a catalog item with a format like:

4 Dev (0)-> AE CTLGTB *

606 record(s) selected.

< 1 > Top of "MVNET.DICTWRITE" in "CTLGTB", 4 lines, 47 characters.
*--: p
001: S
002: 3
003: E:\MVNET\MVNET.BP MVNET.DICTWRITE
004: admin
Bottom.

...and the dictionaries look like:

Dictionary of File: CTLGTB 14:01:27 Mar 25 2013
Dict Name...... Typ # Col-Heading.... Field-Definition.... Conversion.......... Formt Assoc...

@ID D 0 CATALOG NAME 28L S
TYPE            D 1 1L    S
ARG             D 2 #ofArguments 3R    S
ORIG            D 3 ORIGINATOR 22L   S
WHO             D 4 7L    S
5 records listed

...and output looks like:

2 Dev (0)-> SSCROLL CTLGTB BY ORIG ID-SUPP @ID FMT "35L" TYPE ARG ORIG FMT "72L" WHO FMT "12L" Command => SORT CTLGTB 14:03:31 Mar 25 2013 CATALOG NAME............. T ARG ORIGINATOR...................................... WHO..... US_EXECUTOR S 5 @UDTHOME/SYS_BP US_EXECUTOR root help M 0 @UDTHOME/SYS_BP help root U2.MASTER.TRIGGER.D S 4 E:\AboE\Abo\BP\BP U2.MASTER.TRIGGER.D admin U2.MASTER.TRIGGER.U S 5 E:\AboE\Abo\BP\BP U2.MASTER.TRIGGER.U admin UOLOGIN S 2 E:\AboE\Abo\BP\BP UOLOGIN admin BAWEBEXEC S 2 E:\DESIGNBAIS\BA\DBI\DBI BAWEBEXEC admin DB.G.EOP.DATA S 0 E:\DESIGNBAIS\BA\DBI\DBI DB.G.EOP.DATA admin

HTH,

Bill
Untitled Page


------------------------------------------------------------------------
----- Original Message -----
*From:* wjhon...@aol.com
*To:* u2-users@listserver.u2ug.org, sjos...@sjplus.com
*Date:* 3/25/2013 1:28 PM
*Subject:* Re: [U2] Cataloged programs // finding
To be more clear.  The path of the source code, is embedded at the tail of the 
opcode in the GLOBAL.CATDIR item for that catalogued routine name.  If you can 
retrieve that path you can then parse it and compare it to what you know or 
think you know about where your code is stored from the *PICK* point-of-view 
(since the path will be fully specified, not Pick type).

However....

If you simply try to READ the opcode that is the GLOBAL.CATDIR item, you have to be aware, that it 
CAN include  CHAR(255) in that opcode.  CHAR(255) to a STRING type variable means "End Of 
String" so seeing that in your STRING, will pre-maturely *truncate* the string on that 
character, making you think you've end the "END" of that variable.

So you will never get the *full* opcode and thus probably never see the path 
you want, if you just happen to have a byte which is the CHAR(255) otherwise 
known as HEX FF.

Hope that's more clear.  In order to *around* this problem you can use the 
READBLK command instead of the READ command, and READBLK *one* *byte* *at* *a* 
*time*.

Using the READBLK it will *not* attempt to interpret the FF as an end-of-string 
condition, so you can test for it, and skip over it and know as well that you 
still have *more* to read.  That's not all there is.



-----Original Message-----
From: Wjhonson <wjhon...@aol.com>
To: SJoslyn <sjos...@sjplus.com>; u2-users <u2-users@listserver.u2ug.org>
Sent: Mon, Mar 25, 2013 11:41 am
Subject: Re: [U2] Cataloged programs // finding


I have this built into my "VIEW" routine which allows inter-call jumping
but I don't have it as a sep program
Just be aware that you *have* to read the opcode in BLOCK form (READBLK) because
it *can* have embedded char 255's which will truncate any string read.  Nice
huh?

So you have to step the code, byte by frickin byte :)


-----Original Message-----
From: Susan Joslyn <sjos...@sjplus.com>
To: u2-users <u2-users@listserver.u2ug.org>
Sent: Mon, Mar 25, 2013 11:10 am
Subject: [U2] Cataloged programs // finding


Hi Geniuses.
At a few of my customer sites I've seen people have these little hand-built
utilities that help them identify the file/location of the source of a
globally cataloged item.
I could really use a handy little device like that - on both platforms,
Universe and Unidata.  Does anyone - ideally - have one of those they'd like
to share for either platform?  Or, at least know how to quickly put that
together.  I confess, I don't want to go do the research into this if I can
just smile pretty and borrow it?  But I'll go read up if that's what I need
to do.

TIA,
Susan

_______________________________________________
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

Reply via email to