Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Regarding Capital letters and Small letters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Regarding Capital letters and Small letters
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    Post subject: Re: Regarding Capital letters and Small letters
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    Post subject:
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    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 How to display lowercase letters whil... Raghu navaikulam JCL & VSAM 6 Thu Feb 12, 2015 5:53 pm
No new posts PL/I small integer? John Poulakos PL/I & Assembler 3 Wed Dec 24, 2014 2:22 am
No new posts Create a small subset of MAN dataset vasanthz All Other Mainframe Topics 5 Fri Nov 15, 2013 2:16 am
No new posts A small request again Pandora-Box General Talk & Fun Stuff 0 Wed Mar 13, 2013 12:24 pm
No new posts Split file into 10 small files with H... purbasha JCL & VSAM 2 Thu Feb 14, 2013 6:17 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us