Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
comparison between comp-3 and comp variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sunny_io

New User


Joined: 11 Jul 2007
Posts: 68
Location: noida

PostPosted: Mon May 18, 2009 4:42 pm    Post subject: comparison between comp-3 and comp variable
Reply with quote

Hi All..

I don't have teh resources as of now to test this so asking you all..

Can i compare 2 variables which are Comp-3 and comp by pic clause and expect a correct comparison always ..

here's there def.

A PIC S9(4) COMP-3.
B PIC S9(4) COMP.

If A equal B
###
end-if.
Back to top
View user's profile Send private message

Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Mon May 18, 2009 5:29 pm    Post subject: Reply to: comparison between comp-3 and comp variable
Reply with quote

If A and B have same values, then your IF condition will be true.

What is the problem in it?
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: Mon May 18, 2009 8:46 pm    Post subject:
Reply with quote

See the following for your answer: Language Reference Manual, Conditional Expressions, General Relation Conditions.
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us