Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Comparison Query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Comparison Query
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    Post subject:
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    Post subject: re: Comparison Query
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    Post subject: Comparison Query
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    Post subject:
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    Post subject:
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    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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us