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

Regarding Capital letters and Small letters


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

New User


Joined: 05 Sep 2006
Posts: 18

PostPosted: Fri Jan 12, 2007 7:23 pm
Reply with quote

Hi All,

In a file, I have 'AAAA' which processing through Cobol program. Here I have to change it to 'aaaa' to find the value in DB2 tables

Help needed,

Thanks in Advance,
Shah
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jan 12, 2007 8:42 pm
Reply with quote

Shaik


There are a few ways of handling this:

Case 1:
Code:

SELECT --   
  FROM DB2.?
 WHERE UCASE(DB2_COLUMN) = :WS-COBOL-VARIABLE


CASE 2:
Code:

SELECT ?
  FROM DB2.?
 WHERE DB2_COLUMN = LCASE(:WS-COBOL-VARIABLE)


Or you can convert WS-COBOL-VARIABLE to lower case and then use it in the SQL. There are several post that address how to convert case.
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Mon Jan 15, 2007 5:04 pm
Reply with quote

hi ,
You can use a the below logic

Working storage.

WS-LOWER-CASE PIC X(26)
value 'abcdefghijklmnopqrstuvwxyz'.
WS-UPPER-CASE PIC X(26)
VALUE 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
Procedure division.
INSPECT UR-Upper-case
CONVERTING WS-UPPER-CASE TO WS-LOWER-CASE.

select * from table where data=UR-Upper-case
Please move ur uper case value to variable UR-Upper-case and after inspect it will convert to lower case. Now with this varible UR-Upper-case u can put query against Database.

Please let me know if u stuck somewher in the above logic.
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 Split large FB file based on Key coun... DFSORT/ICETOOL 4
No new posts How to display lowercase letters whil... JCL & VSAM 6
No new posts PL/I small integer? PL/I & Assembler 3
No new posts Create a small subset of MAN dataset All Other Mainframe Topics 5
No new posts A small request again General Talk & Fun Stuff 0
Search our Forums:

Back to Top