[U2] RE: U2] UV-piopen TRANS function

2005-01-22 Thread Stevenson, Charles
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 working

Re: [U2] UV-piopen TRANS function

2005-01-21 Thread Allen Egerton
From: Andrea Charles [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org 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

RE: [U2] UV-piopen TRANS function

2005-01-21 Thread Tim Franklin
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

RE: [U2] UV-piopen TRANS function

2005-01-21 Thread Andrea Charles
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. snip If you're going to programmatically change a bunch of dictionaries, you might want to

RE: [U2] UV-piopen TRANS function

2005-01-19 Thread Stevenson, Charles
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

RE: [U2] UV-piopen TRANS function

2005-01-19 Thread Andrea Charles
@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 = ATRANS( FILE,KEY

RE: [U2] UV-piopen TRANS function

2005-01-19 Thread Stevenson, Charles
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

RE: [U2] UV-piopen TRANS function

2005-01-19 Thread Richard Taylor
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

Re: [U2] UV-piopen TRANS function

2005-01-19 Thread Mats Carlid
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) K =