IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to use a class test


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Tue Mar 03, 2009 7:00 pm
Reply with quote

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 icon_sad.gif. Please suggest.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Mar 03, 2009 7:30 pm
Reply with quote

Unable to do what?
What is the error?
Back to top
View user's profile Send private message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Tue Mar 03, 2009 7:34 pm
Reply with quote

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 icon_biggrin.gif.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Mar 04, 2009 7:20 am
Reply with quote

Next time please continue with the same thread instead of starting a new one for the same question.
Back to top
View user's profile Send private message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Wed Mar 04, 2009 9:36 am
Reply with quote

Terry Heinze wrote:
Next time please continue with the same thread instead of starting a new one for the same question.

I'm sorry icon_eek.gif but I have continued in the same thread. The topic was moved icon_question.gif from there to a new one.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 04, 2009 10:18 am
Reply with quote

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 icon_smile.gif

Good to hear it is working - thanks for the update.

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts building java class with zip4j.jar on... Java & MQSeries 0
No new posts Zunit Test case editor error Testing & Performance 4
No new posts Assembler class assignment: stuck on ... PL/I & Assembler 12
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts REXX Test under Mask??? CLIST & REXX 3
Search our Forums:

Back to Top