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

Choose the answer: Cobol Question


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subramanianup
Warnings : 1

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Thu Feb 02, 2006 12:40 pm
Reply with quote

For what values of WS-VAR , the below code doesn?t display INDIA
IF WS-VAR NOT= 68 OR NOT=78 DISPLAY ? INDIA?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 05, 2006 10:07 am
Reply with quote

It always displays INDIA because when WS-VAR is 68 it NOT 78, so it displays.

Similarly, when WS-VAR is 78 it NOT 68, so it displays.

When it isn't both it displays.

To have it NOT display when it's either 68 or 78, change the OR to an AND.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top