Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Contains only function (CO) - Finding single quote in string

Former Member
0 Likes
418

I want to use the CO function to dertermine valid characters, including a single quote.

i.e if x CO 'ABCD''.

What is the proper syntax?

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
363

Its a little funny, two (') represents one ('). See the example below

REPORT ZRICH_0004 .

parameters: p_check(10) type c.

* Contains a space, A, B, C D, or an "'".
if p_check co ' ABCD'''.
write:/ p_check.
endif.

Regards,

Rich Heilman

1 REPLY 1
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
364

Its a little funny, two (') represents one ('). See the example below

REPORT ZRICH_0004 .

parameters: p_check(10) type c.

* Contains a space, A, B, C D, or an "'".
if p_check co ' ABCD'''.
write:/ p_check.
endif.

Regards,

Rich Heilman