Almost there, Rick. Add another apostrophe to each set you have now, that
you have 4 together. The outside ones make it a string, the inside pair is
doubled, so that a single apostrophe is passed.
All replacement variables are character type. As you discovered, putting
the apostrophes in the SQL statement means that the parser thinks they
delimit a string.
If you hard-coded the string in CL, it'd be '''12345678''' (that's 3
apostrophes at each end).
Details are in the Query Management Programming manual, Appendix C. The
manual is listed in the Database section of InfoCenter. Here's the Acrobat
form <
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/info/qmp/rbaromst.pdf>
Regards
Vern
At 01:24 PM 1/17/03 -0500, you wrote:
Eric,
do you have this backwards? i.e. you don't put the quotes and +'s in the
sql statement, but you build the variable in the CL like this:
DCL &orgout *char (8)
chgvar &orgout ('"' *TCAT &ORGIN *TCAT '"') ?
so that the value of the &orgout is "CSR301"
12345678
?
I tried that with single quotes, but it didn't work. i'll try with doubles
next.
thanks,
Rick