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: 6967
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


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