Hi
the problem that you are facing is that in essence you are missing a ton of
quotes
Let me elucidate (new word for today - these word a day calendars are
great)
In your first example
STRQSH CMD('DB2 "UPDATE MYFILE SET +
MYDATE = "0305" WHERE MYDATE = '' '' "')
the piece MYDATE = "0305" WHERE is part of the whole string
the problem with the second example MYDATE = *CAT &PPDATE *CAT WHERE
is ALSO part of the string
you need to manipulate quotes in there (somewhere) so that *CAT &PPDATE
*CAT is OUTSIDE of the string so that CL recognizes it and can manipulate
the data accordingly
Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
VP
<vlittlepp@gmail.
com> To
Sent by: rpg400-l@xxxxxxxxxxxx
rpg400-l-bounces@ cc
midrange.com
Subject
SQL Issue in CL Pgm
03/05/2009 04:56
PM
Please respond to
RPG programming
on the IBM i /
System i
<rpg400-l@midrang
e.com>
Hi
Would anyone help me on how to pass a *variable *in *Set* when I try to do
*SQL
Update* in a CL program, the detailed as:
I need to set the date in myfile, when I did the following it works fine:
STRQSH CMD('DB2 "UPDATE MYFILE SET +
MYDATE = "0305" WHERE MYDATE = '' '' "')
But IF the Date is the input parameter of this CL program, it will NOT
update:
PGM PARM(&PPDATE)
DCL VAR(&PPDATE) TYPE(*CHAR) LEN(04)
STRQSH CMD('DB2 "UPDATE MYFILE SET +
MYDATE = *CAT &PPDATE *CAT WHERE MYDATE = '' '' "')
Would anybody helps... thanks a lot!
J
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l..
As an Amazon Associate we earn from qualifying purchases.