Send the check to David.
Jerry C. Adams
IBM i Programmer/Analyst
The truth? It's a much overrated thing. -Joseph Adams, Sr.
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Friday, April 27, 2012 2:32 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: SQL encryption v5r4 error
Wow - very nice.
How do you guys know all this stuff?? Very impressive.
I found several articles on Iseries SQL encryption, but nothing about "for
I have Conte's SQL/400 book and also Howard Arners - nothing about this
(probably because ENCRYPT wasn't supported when published no doubt).
The Iseries SQL error description didn't help much.
I feel like I should be paying tuition on this list!!
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Friday, April 27, 2012 1:56 PM
Subject: Re: SQL encryption v5r4 error
On 27 Apr 2012 11:12, Stone, Joel wrote:
Any ideas what is incorrect ?
SET ENCRYPTION PASSWORD 'AAABBB'
create table jstone/fl2 (field1 char(20)) insert into fl2 (field1)
values(Encrypt_RC2('TEST')) select decrypt_char(field1) from fl2
Argument 01 of function DECRYPT_CHAR not valid.
what doesn't SQL like here??
The DECRYPT_CHAR argument-01 requires the CHAR to have been defined as
FOR BIT DATA.
Try the following variation. An extra modification has the date\type
attributes in a field, instead of as derived from a literal\constant as
assigned by the SQL:
set encryption password 'AAABBB'
create table fl2
( field1 char(20)
, field2 char(40 /*20+16+4*/) FOR BIT DATA
insert into fl2 (field1) values('TEST')
update fl2 set field2=Encrypt_RC2(field1)
select field1, decrypt_char(field2) as field2 from fl2
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l
This inbound email has been scanned for all viruses by the MessageLabs
This outbound email has been scanned for all viruses by the MessageLabs
For more information please visit http://www.symanteccloud.com