There's two issues with this.
One. You're starting with a character column and you want to encrypt it
in place. We just went through FOR BIT DATA and DSPFFD calling it HEX
instead of CHARACTER.
Two. Size of encryption. If you were only storing 1 byte in let's say a
30 character field, maybe but that conversion to HEX may be enough to
cause a record format level check - not sure.

For more information on encryption size see also:
- Chuck showed you some math in his SQL explantion but I don't think he
explained the x+y+z or whatever it was.
- Infocenter. Length depends on encryption selected. For example
ENCRYPT_TDES uses the math:
The length attribute for the data type of data-string must be less than m
- MOD(m,8) - n - 1, where m is the maximum length of the result data type
and n is the amount of overhead necessary to encrypt the value.

More explanation on the overhead follows in infocenter.
http://publib.boulder.ibm.com/eserver/ibmi.html


Rob Berendt

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].