View previous topic :: View next topic
|
Author |
Message |
Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
In Checking for Alphanumeric data
ashokm wrote: |
Hi Aaru,
Like this we can check what ever the char under JUNK
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
CLASS JUNK IS
'A' THRU 'Z'
'a'THRU 'z ‘
','
'+'
'.'
' '.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 WS-ALPHANUMERIC PIC X(10) VALUE 'B14’.
PROCEDURE DIVISION.
IF WS-ALPHANUMERIC IS JUNK
DISPLAY'JUNK'
ELSE
DISPLAY'NOT JUNK' .
STOP RUN.
Thanks & Reagrds
Ashok M |
I am unable to do that . Please suggest. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Unable to do what?
What is the error? |
|
Back to top |
|
|
Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
I got it now..
The test condition should not be like
IF WS-ALPHANUMERIC IS JUNK
as suggested in the previous thread.
It should be something like
IF WS-ALPHANUMERIC(index) IS JUNK for every character of the String WS-ALPHANUMERIC.
Thanks for the quick response . |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Next time please continue with the same thread instead of starting a new one for the same question. |
|
Back to top |
|
|
Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
Terry Heinze wrote: |
Next time please continue with the same thread instead of starting a new one for the same question. |
I'm sorry but I have continued in the same thread. The topic was moved from there to a new one. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Next time please continue with the same thread instead of starting a new one for the same question. |
Please look above - this was split from another topic. . .
Quote: |
I'm sorry but I have continued in the same thread. The topic was moved from there to a new one. |
No worries
Good to hear it is working - thanks for the update.
d |
|
Back to top |
|
|
|