1
votes

I would like to write an AUTONOMOUS stored procedure (native). I'm using the DB2 database (V11.01)

  CREATE PROCEDURE SP_LOG (IN p_field1  char(2)
                          ,IN p_field2  varchar(50)
                          ,IN p_field3  varchar(50)
                          ,IN p_field4  varchar(3926) )
      VERSION V1
      ISOLATION LEVEL CS
    WLM ENVIRONMENT FOR DEBUG MODE WLMENV1
      RESULT SETS 0
      LANGUAGE SQL
    ALLOW DEBUG MODE 
      AUTONOMOUS
  BEGIN
    ...
    ...
  END

I'm using IBM DATA STUDIO 4.1.1 and I get the following error:

Creazione di procedura memorizzata restituzioni

SQLCODE: -104, SQLSTATE: 42601. XXXXX.SP_LOG: 11: ILLEGAL SYMBOL "". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: FOR. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.18.60 XXXXX.SP_LOG - Distribuzione per il debug non riuscita. XXXXX.SP_LOG - Rollback completato correttamente.

If you have any recommendations, I'd love to hear them!

Thanks :)

1
What platform? zOS or LUW?Daniel Lema
the stored must work in both platform (z/os and luw). step 1: run it on z/os platformkiller
It seems to be a BUG of IBM DATA STUDIO: www-01.ibm.com/support/…. Now I try to install version 4.1.3 and update itkiller

1 Answers

0
votes

Good news, I found the issue.

This is a bug of IBM Data Studio (IT26018 - AUTONOMOUS KEYWORD IS NOT CONSIDERED AS A VALID KEYWORD FOR DB2 ZOSV11 AND V12 IN DS.4.1.3 - For more information click here.

Here's how I solved it:

  1. I downloaded the new version (IBM DATA STUDIO 4.1.3) - Link
  2. Installed the new version using IBM INSTALLATION MANAGER
  3. I downloaded the FIX - Link
  4. Installed the FIX (Instructions are included in the .ZIP file (open the "Hotfix Guide.pdf" file)