Problem:
I need constants in my code for an apostrophe and a quote. I've got an apostrophe ("'"), how do I define a nonnumeric literal that is a quote (") character?
Resolution:
1) When you need to embed a quote character within a nonumeric literal that is delimited by quote characters, use two consecutive quote characters.
77 aQuote pic x value """".
2) Both quotes and apostrophes can be used within the same source text to delimit nonumeric literals, but the delimiters for any individual literal must match.
77 anApostrophe pic x value "'".
77 aQuote pic x value '"'.
3) There is a figrative constant avialable (QUOTE) that can be used to initialize variables and analyze values.
77 aQuote pic x.
procedure division.
move QUOTE to aQuote
if aQuote = QUOTE
display 'It''s a Quote!'.