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

File read not able to identify smaller case


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue May 18, 2010 9:54 am
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
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: 206
Location: Bangalore

PostPosted: Tue May 18, 2010 11:56 am
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: 13
Location: Nuremberg, Germany

PostPosted: Tue May 18, 2010 12:03 pm
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: 1353
Location: Israel

PostPosted: Tue May 18, 2010 12:09 pm
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

Moderator Emeritus


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

PostPosted: Tue May 18, 2010 7:19 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue May 18, 2010 7:37 pm
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
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: 13
Location: Nuremberg, Germany

PostPosted: Wed May 19, 2010 10:46 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top