0

I'm currently working on an AS400 machine to create a stored procedure which accepts a string array as an input argument. My code is as follow:

CREATE TYPE stringArray as VARCHAR(100) array[100] 
CREATE PROCEDURE ALI/LWRH_SP
(
    IN list stringArray
)
LANGUAGE SQL
BEGIN
    --TO DO SOME WORK
END 

Unfortunately, when I run the mentioned code, the system gives me an error:

SQL0104: token array was not valid. valid tokens:END-OF-STATEMENT

Does anyone know how I can manage this error?

1
  • 1
    Edit your question to add the version of the Db2 for i that you are using. If your version is IBM i 6.1 then you may be out of luck, as the docs suggest that only IBM i 7.1 or higher supports array types on SQL procedures. Also try qualifying the type name where used. Commented Jan 21, 2018 at 13:23

1 Answer 1

1

If your version is IBM i 6.1 (or lower) then you may be out of luck, as the docs suggest that only IBM i 7.1 or higher supports array types on SQL procedures.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.