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: 10457
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: 10457
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 Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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