In answer to your P.S. question - just precautionary
I changed the code to
Set :SQLHexEquivalent = Hex(:binaryHMAC);
And got the same error
SQL0171 30 250 Position 17 Argument 1 of function HEX not valid.
And the IBM knowledge center not being available doesnt help
I then changed the code to
Set :SQLHexEquivalent = Hex('binaryHMAC');
THIS did compile - but all I will be getting the the hex of the word binaryHMAC and not the value in the field binaryHMAC
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Wednesday, June 11, 2014 1:34 PM
Subject: Re: Attempting to use SQL HEX
On 11-Jun-2014 11:57 -0500, Alan Shore wrote:
Before I forget, we are on V5r4
In STRSQL I can execute the following SQL statement
And get the response of:
I need to do the same thing on a field in an SQLRPG program Here is
the code snippet
exec sql SET OPTION COMMIT=*NONE, DATFMT=*ISO, CLOSQLCSR=*ENDMOD; exec
sql DISCONNECT ALL; exec sql CONNECT RESET; Exec Sql
Select Hex(binaryHMAC) into :SQLHexEquivalent
And when I compile the program, this is the error
SQL0206 30 250 Position 38 Column BINARYHMAC not in specified tables.
As always - any and all responses gratefully accepted
Probably the desired request is either
SET :SQLHexEquivalent = HEX(:binaryHMAC) ;
SET :SQLHexEquivalent = HEX('binaryHMAC') ;
P.S. What is with the CONNECTION stuff? Was that coded due to some difficulties [in the past, and so carried into new code], as some precautionary action, or is there some specific purpose served by explicitly effecting what would typically be default behavior of an implicit connection to *LOCAL?