MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inspecting a Variable.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
saravanan80
Beginner


Joined: 25 Dec 2006
Posts: 14
Topics: 6

PostPosted: Thu Feb 08, 2007 10:42 am    Post subject: Inspecting a Variable. Reply with quote

I'm having a viriable WS-A X(21) ,
we are having a string of data in it with a String DUMMY in it

"12345DUMMY6789" , how we can use the inspect command to check the presence of the value DUMMY alone in the stream of the entire data,
Please reply...
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Feb 08, 2007 11:13 am    Post subject: Reply with quote

saravanan80,

try this

Code:

01 WS-A                 PIC X(21) VALUE '12345DUMMY6789'.
01 WS-TALLY             PIC S9(04) COMP VALUE 0.         

INSPECT WS-A TALLYING WS-TALLY FOR all 'DUMMY'
                                             
IF WS-TALLY > 0                               
   DISPLAY 'THE STRING HAS DUMMY'             
END-IF                                       


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Thu Feb 08, 2007 11:17 am    Post subject: Reply with quote

INSPECT WS-A TALLYING WS-COUNT FOR ALL 'DUMMY'.

IF WS-COUNT > 0 DISPLAY 'STRING FOUND' END-IF.
_________________
Regards,
Programmer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group