RESULT[1] does work the same, at least on UV10.0 - maybe some have
concern on cross-platform portability.

And Symeon - thanks for your code fragment.  That, and a nights rest
helped me to get things going.  I'll post the encryption code that's now
working if anyone is interested.  It may be of use to anyone who later
faces the same unresolved issue 8088.

Many thanks. 

R. Baker Hughes
UniVerse Programming
Mouser Electronics, Inc.
(817) 804-3598 *
[EMAIL PROTECTED] *

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David A. Green
Sent: Friday, August 25, 2006 10:07 AM
To: [email protected]
Subject: RE: [U2] Encrypt issue 8088

Why do programmers use result[LEN(result),1]? Doesn't result[1] do the
same thing but easier, quicker, and more readable?

Thanks,
David A. Green
DAG Consulting
www.dagconsulting.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Symeon Breen
Sent: Friday, August 25, 2006 1:06 AM
To: [email protected]
Subject: Re: [U2] Encrypt issue 8088

Here is my standard crypt sub


   FUNCTION AD.CRYPT(Word,key,iv)
* Function to crypt something i.e. a password
* a2c limited, Oct2005

   Crypt=Word

   Err='';result='';resLoc=1;salt=''

   algorithm="rc2-cbc"

   Err=ENCRYPT(algorithm,2,Word,1,key,1,1,salt,iv,result,resLoc)

   IF NOT(Err) THEN
      IF result[LEN(result),1]=CHAR(10) THEN
result=result[1,LEN(result)-1]
;* IBM ISSUE 8088
      Crypt=result
   END

   RETURN Crypt
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to