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
 
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: 1243
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: 2504
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
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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