MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Lower Case to Upper CAse

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Sun May 25, 2003 8:19 am    Post subject: Lower Case to Upper CAse Reply with quote

Please help me with converting a record from lower case to upper case.Any functions in COBOL-II or EZT or any other utilities is OK.

Thanks,
Vijay
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Sun May 25, 2003 9:23 am    Post subject: Reply with quote

vijay,

This topic had been discussed already. Please search before posting.Check the following link for DFSORT'S solution to convert lowercase characters to uppercase characters, or uppercase characters to lowercase characters, in a field or an entire record

http://www.mvsforums.com/helpboards/viewtopic.php?t=60

Check the following link for FILE-AID solution

http://www.mvsforums.com/helpboards/viewtopic.php?t=341

In VS-COBOl II you need to use the special-names paragraph for conversion. check this link for example.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGYA1101/3.1.2.1.5?SHELF=&DT=19930312141355

The latest versions of cobol have intrinsic functions UPPER-CASE & LOWER-CASE which will convert lowercase characters to uppercase characters, or uppercase characters to lowercase characters. check this link for an example

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/1.6.6.1?DT=20020923143836

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Mon May 26, 2003 2:03 pm    Post subject: Reply with quote

Thanks for the reply.I used EZT to do this

S1 = 1
DO WHILE S1 LE 300
IF WS-OUTREC-B(S1) GE 129 +
AND WS-OUTREC-B(S1) LE 169
WS-OUTREC-B(S1) = WS-OUTREC-B(S1) + 64
END-IF
S1 = S1 + 1
END-DO
Back to top
View user's profile Send private message
petluri
Beginner


Joined: 05 Dec 2002
Posts: 19
Topics: 5
Location: Virginia, USA

PostPosted: Wed Sep 10, 2003 2:38 pm    Post subject: Reply with quote

I think in COBOL we have something like FUNCTION UPPER-CASE(input).
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
krk123
Beginner


Joined: 03 Jun 2003
Posts: 58
Topics: 19

PostPosted: Wed Sep 10, 2003 2:47 pm    Post subject: Reply with quote

Hi Vijay,
If you are trying to convert in the program, you can do something like this.

INSPECT (Your record here )
CONVERTING
'abcdefghijklmnopqrstuvwxyz' TO
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

regards,
KRK123
Back to top
View user's profile Send private message
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Tue Sep 16, 2003 7:47 am    Post subject: Reply with quote

vijay said:
Quote:

Thanks for the reply.I used EZT to do this

S1 = 1
DO WHILE S1 LE 300
IF WS-OUTREC-B(S1) GE 129 +
AND WS-OUTREC-B(S1) LE 169
WS-OUTREC-B(S1) = WS-OUTREC-B(S1) + 64
END-IF
S1 = S1 + 1
END-DO


This code is not entirely correct. In addition to converting lower case a-z to upper case A-Z, it will also alter the values of characters with hex values 8A-90 and 9A-A1. Although some of these characters are not valid display characters, some of them are. For example, the '~' or tilde character has hex value A1 and will be altered by this code to hex value E1 which is non-display.
It may be that you data can't contain the values 8A-90 or 9A-A1 but can you guarantee this for all data now and in the future?

Also, your upper limit for the loop should be 255, not 300.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group