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
 

 

File read not able to identify smaller case

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jdeeponline

New User


Joined: 08 Sep 2009
Posts: 27
Location: Charlotte

PostPosted: Tue May 18, 2010 9:50 am    Post subject: File read not able to identify smaller case
Reply with quote

Hi,

I am trying to check for certain strings in my input request file. But it is not able to identify smaller case characters. Is it that while processing files, only upper cases can be identified? If so, is there a way I can copy smaller case to upper case in a sort card?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 18, 2010 9:54 am    Post subject:
Reply with quote

Hello,

COBOL code surely can identify and work with lower-case characters. . .

What do you "have" and what is the problem with it?

How have you verified lower case data exists?

Why is the sort mentioned fro yopur cobol question?
Back to top
View user's profile Send private message
jdeeponline

New User


Joined: 08 Sep 2009
Posts: 27
Location: Charlotte

PostPosted: Tue May 18, 2010 10:03 am    Post subject: Reply to: File read not able to identify smaller case
Reply with quote

When I try to Exped a program with input file containing lower case characters, these are displayed as special characters. For example,

NameChange is being read as N...C..... while NAMECHANGE is being read as NAMECHANGE
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Tue May 18, 2010 11:56 am    Post subject:
Reply with quote

You can use Inspect to identify and chagne lowercase to upper case:

INSPECT ws-text converting 'abcdefghijklmnopqrstuvwxyz' TO 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

Or you can use Class condition check like below:
IF STRING1 IS ALPHABETIC-LOWER PERFORM UPSHIFT
Back to top
View user's profile Send private message
icetigerfan

New User


Joined: 08 Mar 2010
Posts: 11
Location: Nuremberg, Germany

PostPosted: Tue May 18, 2010 12:03 pm    Post subject:
Reply with quote

Just a question: why do you want to use a sort? - It's much easier to work with UPPER-CASE
Code:
       MOVE FUNCTION UPPER-CASE ( expression_mixed ) TO expression_uppercase


This is for working without national characters. With national characters you will need two lines of code more.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1232
Location: Israel

PostPosted: Tue May 18, 2010 12:09 pm    Post subject:
Reply with quote

If you read the file using other tools (ISPF Browse or FileAid for example), can you see the lower-case characters ?

You can use cobol FUNCTION UPPER-CASE too.

Ajay Baghel wrote:
Or you can use Class condition check like below:
IF STRING1 IS ALPHABETIC-LOWER PERFORM UPSHIFT
Ajay, this will work only if there are only lower case chars or spaces.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue May 18, 2010 7:19 pm    Post subject:
Reply with quote

Hello,

Quote:
When I try to Exped a program with input file containing lower case characters, these are displayed as special characters.
I suspect this is nothing to do with cobol but rather Xped or the terminal emulator. . .
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue May 18, 2010 7:37 pm    Post subject: Reply to: File read not able to identify smaller case
Reply with quote

If the records contain (for example) a lower-case 'a' (X'81') make sure it's not part of a COMP or COMP-3 field.

If you translate lower-case to upper-case, you're going to have a big-time data mismatch as well as a very real potential of a SOC7 of a X'81' to a X'C1' (upper-case 'A') in a COMP-3 field.

Bill
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Wed May 19, 2010 1:06 am    Post subject:
Reply with quote

CICS screens maps by default lower case letters to their upper case equivalent, which can be rather annoying in Xpediter/CICS sessions.
Back to top
View user's profile Send private message
icetigerfan

New User


Joined: 08 Mar 2010
Posts: 11
Location: Nuremberg, Germany

PostPosted: Wed May 19, 2010 10:46 am    Post subject:
Reply with quote

Please give some more information to us:

    - what is your tool for debugging?
    - has the file you are scanning a defined structure?
    - or is it a special file (for example XML)?
    - have you listed the content of one sentence in hex-format?
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Could we identify the called modules ... elixir1986 COBOL Programming 5 Fri Jul 14, 2017 1:53 am
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts RFE: DB2 support for mixed case names. Pedro DB2 0 Tue Jul 04, 2017 1:32 am


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