I'm trying to write a very small CL program to send my workstation a break message -- with the output being the text I would use for a SAV command. The problem is that in the SAV command some PARMs need to have the apostrophe included, i.e. '/QSYS.LIB/TAP01.DEVD'. How do I put the apostrophe into a CHAR variable without the program thinking that it is the end of the string?
You will need to put double-single quotes around your quotes.
DCL VAR(&TEST) TYPE(*CHAR) LEN(5)
CHGVAR VAR(&TEST) VALUE('''abc''')
This will produce a quoted value in the variable test 'abc'
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
Dig Deeper on iSeries ILE programming
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.