| 
 | 
Granted it will change your field size...
CREATE TABLE ROB/TESTAC3 
 (MYKEY BIGINT NOT NULL WITH DEFAULT, 
  SSN  CHAR (9 ) NOT NULL WITH DEFAULT)
insert into rob/testac3
  values(1, encrypt_rc2('123456789','Pacific','Ocean'))    
Value for column or variable SSN too long. 
Reduce the length of the string from 29 to a maximum of 9
drop table rob/testac3
CREATE TABLE ROB/TESTAC3 
 (MYKEY BIGINT NOT NULL WITH DEFAULT, 
  SSN  VARCHAR (50) NOT NULL WITH DEFAULT)
insert into rob/testac3
  values(1, encrypt_rc2('123456789','Pacific','Ocean'))    
1 rows inserted in TESTAC3 in ROB.
dsppfm rob/testac3
*...+....1....+....2....+....3....+....4....+....5....+....6
           /¤   NsOcean je3ñpm ¼Á>Ûk mà  
0000000001069002DAD8889F98F4990B66F9196444444444444444444444
000000010DC1F5055263515F153974F75EB2B46000000000000000000000
select * from rob/testac3
ssn looks sort of like the above
But I can't seem to decrypt it.
Starting somewhat over
delete  from rob/testac3
set encryption password='Pacific'
SET ENCRYPTION PASSWORD statement complete. 
insert into rob/testac3 values(1, encrypt_rc2('123456789'))
1 rows inserted in TESTAC3 in ROB. 
select mykey, decrypt_char(ssn) from rob/testac3
Argument 01 of function DECRYPT_CHAR not valid.
Arghh!!!!
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/db2/rbafzmstscale.htm#scadecrypt
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.