CHGVAR VAR(&NEEDLE) VALUE('''') Example: If you had BOB'S BIKE, you need to double up that single quote to become BOB''S BIKE so CL can handle it. And since it's a string, you add single quotes around it like 'BOB''S BIKE' . And if you then strip out everything but the quotes, you get '''' . Chris
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Single quote problem in CL
Collapse
X
-
Single quote problem in CL
Using X'7D' is not a good idea. Depending on the environment the program is running in, it might not always translate to a single quote. You can take my advice and code a single quote as Inz('''') or Value('''') or learn the hard way someday. Chris
Comment
-
Single quote problem in CL
Hi Chris.. Oh.. Okey.. Points taken... Was actually using it to pass in string that may have single quote and replace it with a blank. Because will pass the string to an SQL statement. Previously caused error. Try to search the net for an examples. Never found one. Luckily you've help. Thanks very much Chris Araman
Comment
-
Single quote problem in CL
Greetings friends Below program shows example of QCLSCAN capabilities. But what happened when I try to search for single quote (')? Can anybody change the code to show the QCLSCAN can detect a single quote ('). (Because I haven't been successful on that!!) Anybody.. Please help... Rgds Araman.
Code
Comment
Comment