ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SYSTOOLS.BASE64DECODE producing SQLState 57017

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SYSTOOLS.BASE64DECODE producing SQLState 57017

    Hey everyone,

    I am having an issue with SYSTOOLS.BASE64DECODE(and encode fwiw). I am able to run it just fine in Run SQL Scripts, but as soon as I attempt the same code with adding INTO or using SET like I see everyone else, I get SQLState 57017. I've played around with Char/Varchar types and the CCSID(819, 1208, 65535) of the field being assigned the decoded data with no luck.

    Any help would be appreciated and potentially stop me from crying myself to sleep each night. I've attached a picture of my script and results from Run SQL Scripts. Here's the current code from my test program.


    Code:
           DCL-S decoded VarChar(8192) CCSID(819);
    
           EXEC SQL SET :decoded = SYSTOOLS.BASE64DECODE('Hello World');
    -Ryan

  • #2
    Hi,

    under which ccsid runs your job? If it's 65635, then try to change your job ccsid to some real.

    Br,
    Manuel

    Comment


    • #3
      Originally posted by marcosma View Post
      Hi,

      under which ccsid runs your job? If it's 65635, then try to change your job ccsid to some real.

      Br,
      Manuel
      You're my savior! Many thanks.

      The issue was the default CCSID was 65535, so changing that the job to be CCSID 37 instantly solved my issues.

      Again, thank you,
      Ryan

      Comment

      Working...
      X