Thank you!

 

From: Wjhonson [mailto:wjhon...@aol.com] 
Sent: Monday, March 25, 2013 4:29 PM
To: u2-users@listserver.u2ug.org; sjos...@sjplus.com
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

Reply via email to