View previous topic :: View next topic
|
Author |
Message |
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
Hi Dick,
The solution that I had provided would find out the number of occurances of two consecutive ' (single code). This is the requirement right!!!! Correct me if Iam wrong. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Krishna,
Please use BBCode to preserve accurate spacing. See FAQ. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
what is wrong with definining a variable PIC X(02) value ''''. ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
This is the requirement right!!!! |
Yup, sure is
The "string" of quotes did not equate to one pair of consecutive single-quotes to my (easily confused) mind
When i've needed to use one or more quotes as a data value, i've put something in ws (like dbz recommended or with the value QUOTE), or i've used the hex value inline. |
|
Back to top |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
Hi Dick,
It was a mistake from my side. Actually I moved the string of quotes into STR-2 which was defined as X(02). Thats the reason why my code was working. As suggested by Dick B, we can move " '' " into a string and use in inspect.
Ex:
Code: |
STR-2 PIC X(02) VALUE "''".
INSPECT STR-1 TALLYING W-CNT FOR ALL STR-2
|
or we can use
Code: |
INSPECT STR-1 TALLYING W-CNT FOR ALL ''''''
|
Hope this helps. Corrections are welcome. |
|
Back to top |
|
|
|