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

Comparing signed var with unsigned variable


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

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Thu Dec 28, 2006 5:48 pm
Reply with quote

hi,
Can we compare a s9(07) var with a 9(03) var....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 6:00 pm
Reply with quote

From the FM:
Comparing numeric operands When the algebraic values of numeric operands are compared:
v The length (number of digits) of the operands is not significant.
v Unsigned numeric operands are considered positive.
v Zero is considered to be a unique value regardless of sign.
v Comparison of numeric operands is permitted regardless of the type of USAGE specified for each.
Back to top
View user's profile Send private message
garv_fundu
Warnings : 1

New User


Joined: 02 Nov 2006
Posts: 22

PostPosted: Thu Dec 28, 2006 6:10 pm
Reply with quote

also can we compare a comp-3 and a normal numeric var...
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 6:26 pm
Reply with quote

Quote:
Comparison of numeric operands is permitted regardless of the type of USAGE specified for each.
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top