If you only want to test your stored procedure, i.e. check whether the
output parameter returns the any (expected) value, you do not need a dynamic
Just use parameter markers (?) as place holders in your call statement.
call swiretest/fsp975dn ('82 ',1140627,'4200', ?);
The return value is shown as message
Mit freundlichen Grüßen / Best regards
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
Von: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Gary
Gesendet: Tuesday, 02.9 2014 18:57
An: Midrange Systems Technical Discussion
Betreff: testing an SQL procedure
Still trying to test my SQL procedure I created last week.
From Four Hundred Guru article
Dynamic Compound Statements in DB2 for i by Michael Sansoterra:
I'm trying to run the following from Run Sql Scripts:
DECLARE doc_num CHARACTER(11);
call swiretest/fsp975dn ('82 ',1140627,'4200',doc_num); END ; ; This
SQL State: 42601
Vendor Code: -104
Message: [SQL0104] Token DOC_NUM was not valid.
This was run against our test partition which is V7R1M0, with "recent" PTF's
I'm doing everything I can to avoid embedded SQL, wanting to learn the
easier/faster way to create and test SQL procedures.
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