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 <>



At 01:24 PM 1/17/03 -0500, you wrote:


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"


I tried that with single quotes, but it didn't work.  i'll try with doubles



This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page