Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to use a class test

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to use a class test
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: 2150
Location: At my coffee table

PostPosted: Tue Mar 03, 2009 7:30 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Mar 04, 2009 10:18 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts COOLGEN - TSO TEST FACILITY indianrajput CA Products 4 Wed Nov 02, 2016 9:28 pm
This topic is locked: you cannot edit posts or make replies. How to supply called sub-program from... dchristensen JCL & VSAM 25 Wed Sep 14, 2016 11:36 pm
No new posts XFACILIT class setting for Fault Anal... egrove IBM Tools 2 Thu Aug 11, 2016 8:02 pm
No new posts Missing Java main class akg Java & MQSeries 3 Wed May 25, 2016 4:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us