Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
jackal
Currently Banned

New User

Joined: 21 Jan 2006
Posts: 48
Location: india

 Posted: Fri Feb 01, 2008 1:11 pm    Post subject: Regarding Compare, how 65 > 55 Hi All, I i have one element a pic x(30) and second also b pic x(30) and i am comparing both as if a < b display 'Y' Else display 'N' In my case a = 0000000000650000 and b = 55 but compare is passing and displaying 'Y', could anyone let me know how as 65 > 55 so it should display 'N'.

enrico-sorichetti

Global Moderator

Joined: 14 Mar 2007
Posts: 10326
Location: italy

 Posted: Fri Feb 01, 2008 1:14 pm    Post subject: Reply to: Regarding Compare. read the considerations for the comparison of chars the content of the two filds might be left aligned, so ... "00......" is certianly less than "55....."
jackal
Currently Banned

New User

Joined: 21 Jan 2006
Posts: 48
Location: india

 Posted: Fri Feb 01, 2008 1:21 pm    Post subject: Reply to: Regarding Compare. Thanks enrico... so either of two.... 1)0000000000650000 and 0000000000550000 or 2)65 and 55 right???
enrico-sorichetti

Global Moderator

Joined: 14 Mar 2007
Posts: 10326
Location: italy

 Posted: Fri Feb 01, 2008 1:23 pm    Post subject: Reply to: Regarding Compare. Yes ! for char variables it is Your responibility to provide the proper alignement and format consistency
mnnarayankar

New User

Joined: 21 Jan 2008
Posts: 24
Location: bangalore

 Posted: Mon Feb 04, 2008 1:19 pm    Post subject: Hi Jackal, If u consider as a Alphabetic and Alphanumeric, then both are the left justified field. and Numeric is the Right justified. As per your doubt a pic x(30) a = 0000000000650000 b pic x(30) b = 55 if a < b display 'Y' Else display 'N' ya its true B > A because A=55 and A=00 means A < B Ans is 'Y'.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us