Re: [U2] Looking for an OCONV/ICONV
Thanks, I hadn't thought of using CONVERT, it's a nice way to do what I need with just one line of code. - Original Message From: Henry Unger hun...@hitech.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Thursday, September 3, 2009 3:19:31 PM Subject: Re: [U2] Looking for an OCONV/ICONV I don't recall anything built-in, but... Here is an I-type expression that will strip everything except hexadecimal notation characters from @RECORD: @RECORD; CONVERT('0123456789ABCDEF', '', @1); CONVERT(@2, '', @1) Change @RECORD to some other field as desired. If you really want to create an ICONV/OCONV function, you can do that too if you are using UniVerse. Something like this: FUNCTION U( STATUS, VALUE, TYPE ) IF TYPE THEN * ICONV() TEMP = CONVERT('0123456789ABCDEF', '', VALUE) RESULT = CONVERT(TEMP, '', VALUE) END ELSE * OCONV() RESULT = VALUE END STATUS = 0 RETURN (RESULT) END Catalog as $ and use as the conversion in the dictionary as U. Best regards, Henry Unger Hitech Systems, Inc. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jacques G. Sent: Thursday, September 03, 2009 11:43 AM To: U2 Users List Subject: [U2] Looking for an OCONV/ICONV Is there an OCONV/ICONV I could use to filter out characters invalid for an hexadecimal notation ? Ei anything other than 01234567890ABCDEF ? I had a cheat sheet for special ICONV/OCONV statements but I've seemed to have misplaced it. ___ 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] Looking for an OCONV/ICONV
Is there an OCONV/ICONV I could use to filter out characters invalid for an hexadecimal notation ? Ei anything other than 01234567890ABCDEF ? I had a cheat sheet for special ICONV/OCONV statements but I've seemed to have misplaced it. ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Looking for an OCONV/ICONV
I don't recall anything built-in, but... Here is an I-type expression that will strip everything except hexadecimal notation characters from @RECORD: @RECORD; CONVERT('0123456789ABCDEF', '', @1); CONVERT(@2, '', @1) Change @RECORD to some other field as desired. If you really want to create an ICONV/OCONV function, you can do that too if you are using UniVerse. Something like this: FUNCTION U( STATUS, VALUE, TYPE ) IF TYPE THEN * ICONV() TEMP = CONVERT('0123456789ABCDEF', '', VALUE) RESULT = CONVERT(TEMP, '', VALUE) END ELSE * OCONV() RESULT = VALUE END STATUS = 0 RETURN (RESULT) END Catalog as $ and use as the conversion in the dictionary as U. Best regards, Henry Unger Hitech Systems, Inc. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jacques G. Sent: Thursday, September 03, 2009 11:43 AM To: U2 Users List Subject: [U2] Looking for an OCONV/ICONV Is there an OCONV/ICONV I could use to filter out characters invalid for an hexadecimal notation ? Ei anything other than 01234567890ABCDEF ? I had a cheat sheet for special ICONV/OCONV statements but I've seemed to have misplaced it. ___ 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