Try this.
SET EndDate = CASE
when test=31 THEN case1
when test=30 THEN case2
when test=29 THEN case3
else case4
end CASE;
...
SET SQLSTMT = 'call ProcedureDate2(' CONCAT BeginDate CONCAT ', ' CONCAT EndDate CONCAT ', ' CONCAT .97 CONCAT ')';
execute immediate SQLSTMT;
Not tested...
What are you wanting to do exactly coz the procedure doesn't look right in the sequence.
F.E.
You can NOT do
SET v2_ukey = MAX(ukey);
You have to do
1/ SELECT MAX(ukey) into MyVar From ...
2/ SET MyVar = MyVar + 1;
3/ If you are on release V5R3+ create a Sequence Object and use it to insert...
ok. I think I get it. Check out "SQL0104N error in DB2 Command Editor due to incorrect statement termination character" @ https://www-304.ibm.com/support/docview.wss?uid=swg21224723
Philippe
Pls paste here the relevant OVRDBF FILE(MHISRYL8)...
There's maybe something to do with the activation group.
Side note.
You could also shorten the QRYSLT like so
QRYSLT('MHAGNT = %VALUES("39001N" "37355N" ... "23579E"'))
Philippe
Don't use STRPCO/STRPCCMD which is nowadays an old technology with the awkward constraint to install the VB.Net app on each user's PC. I'd put the VB.Net app in a serve r shared folder and use RUNRMTCMD instead.
Philippe
There's no RRN in a logical file. You can however get the physical RRN the logical is pointing to using the INFDS on the F-spec of the relevant logical file.
The RRN is a binary field pos 397-400 in the INFDS.
Philippe
Pls do NOT consider my first answer. There's no possibility to update or delete one's post <Grin>
Instead, tell us on what line the error happens as I can see no reason why the UDTF doesn't work.
Philippe
Look how it is easy using the RPG cycle.
H DFTACTGRP(*NO)
H OPTION(*SRCSTMT: *NODEBUGIO: *NOSHOWCPY)
FBBOSINS4 IP E K DISK
FBSHIPINS UF A E K DISK
D txtFields S Like(INST1) DIM(5)
*
D recstat S...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.