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

Comparison Query


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sibi Yohannan

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Thu Jan 21, 2010 5:42 pm
Reply with quote

HI,

Please advice me on the below query,

In database we have some data in Capital Letters , Lets say ABC.
But we get some data as "abc" from other systems, AND when we compare these two, it will not match.

As per our requirement, it differes only in Capital Letters and Small Letters. What can be done to match them?

Thanks
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Jan 21, 2010 5:52 pm
Reply with quote

Check This.
Back to top
View user's profile Send private message
mftrigger

New User


Joined: 18 Feb 2006
Posts: 23
Location: chennai

PostPosted: Thu Jan 21, 2010 5:56 pm
Reply with quote

Sibi,

Be clear while providing the requirements. Do tell us the following:
- what technique you have used to compare
- what do u mean by database - is it DB2.. or file processing in cobol ?

Soln. : There are many ways to compare this case. One way is convert the data to upper case or lower case and then compare..

Note:
===
As the Q, so the Answer. If your Question is vague, the solution you would recieve will also be vague icon_smile.gif
Back to top
View user's profile Send private message
sibi Yohannan

New User


Joined: 15 Apr 2009
Posts: 47
Location: Bangalore

PostPosted: Thu Jan 21, 2010 6:05 pm
Reply with quote

The data in Upper case is in DB2.
The lower case data comes from an another system in a file.

I am simply using a euqal comparison by the two variables in a COBOL program.


Please advice
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 21, 2010 6:22 pm
Reply with quote

IF FUNCTION UPPERCASE (VAR1) = FUNCTION UPPERCASE (VAR2)
Back to top
View user's profile Send private message
mftrigger

New User


Joined: 18 Feb 2006
Posts: 23
Location: chennai

PostPosted: Thu Jan 21, 2010 6:28 pm
Reply with quote

LC to UC in Cobol

In this you cud either use INSPECT or LOWER-CASE function.
The soln. is already in forum. Please chk b4 posting Qs.
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top