> Lastly, if you use the REMOVE function within your code,
> instead of resetting the pointer, just use a temporary
> variable so that the position of the pointer in the passed
> in argument is both irrelevant and unchanged. That way
> you don't inadvertantly affect a piece of code that's
> workin
I like the idea of a replacement function, unfortunately, the filename is
not quoted in the i-desc so using my replacement function for TRANS will not
compile. I may be stuck with adding the RAISE.
>
>
> If you're going to programmatically change a bunch of
> dictionaries, you
> might want to
Do you have sub values in your data? if not it maybe useful to write a
program to select each file and execute all I-Descriptors that use the TRANS
function on each record looking for @SVM in the result. This may take some
time to run but will ensure all TRANS have been converted.
-Original
From: "Andrea Charles" <[EMAIL PROTECTED]>
To:
Sent: Friday, January 21, 2005 8:31 AM
Subject: [U2] UV-piopen TRANS function
> Thanks for all the suggestions. I think I am going to bite the bullet and
> add the RAISE to all i-descriptors. Think I can come up with a BASIC
program
> to accomplish
Note that you also want to raise when the
position is -1 ( retreiving the entire record lowered ).
And when we're at it we can remove the restriction
that TRANS only handles positions not attribute names:
FUNCTION ATRANS( F,K,P,X )
L = ( IF NOT(NUM(P) THEN L = TRANS("DICT ":F,P,2,"X") ELSE P)
I don't know of any configuration setting for this. This is actually a
'feature' of the TRANS function in UV. You could pass in a multi-valued
list of keys to translate and get a multi-value list of the entire record
back, hence the need to lower the record.
Rich Taylor | Senior Programmer/Analys
From: Mats Carlid
What's wrong with
FUNCTION ATRANS( F,K,P,X )
RETURN (RAISE(TRANS(F,K,P,X))
END
?
--
looks good, except how about something like:
FUNCTION ATRANS( F,K,P,X )
REMOVE DUM FROM K SETTING MORE ; check for any delimiters
K = K ; * reset rmv ptr in case
@listserver.u2ug.org
Sent: 1/19/05 12:47 PM
Subject: Re: [U2] UV-piopen TRANS function
What's wrong with
FUNCTION ATRANS( F,K,P,X )
RETURN (RAISE(TRANS(F,K,P,X))
END
?
Must be as reliable as trans itself !
!
Call it as SUBR("*ATRANS", F,K,P,X)
in I-descriptors and as
y = A
What's wrong with
FUNCTION ATRANS( F,K,P,X )
RETURN (RAISE(TRANS(F,K,P,X))
END
?
Must be as reliable as trans itself !
!
Call it as SUBR("*ATRANS", F,K,P,X)
in I-descriptors and as
y = ATRANS( FILE,KEY,POS,X)
in a program
(once You've inserted a deffun in the program :
DEFFUN ATRANS(F,K,P,
Andrea,
This is a known conversion issue.
I don't think there is a workaround other than to write your own TRANS
function replacement. (If you do, be sure to mimic some of the
efficient caching of already-read records that TRANS does.) If IBM
wanted to, a new UVCONFIG option could be a way coul
10 matches
Mail list logo