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

How to change lowercase to uppercase?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sbachina

New User


Joined: 16 Jun 2006
Posts: 4

PostPosted: Fri Jun 16, 2006 3:14 am
Reply with quote

Move Function Upper-case (Item-1) to Item-2 - compilation problem
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Fri Jun 16, 2006 3:16 pm
Reply with quote

need a tiny bit more detail of your problem please!!!!
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Fri Jun 16, 2006 7:19 pm
Reply with quote

sbachina,

Can you please explain the error in detail. Morethan that can you please mention what type of compiler you r using. Hope that may not support the fuction it seems. Even i got the error in the line
Code:
DISPLAY FUNCTION UPPER-CASE(STR1).


Quote:
10 DISPLAY "ENTER A STRING :".
11 ACCEPT STR1.
12 DISPLAY FUNCTION UPPER-CASE(STR1).
R089E line= 12 col= 20 "FUNCTION"
R089E line= 12 col= 29 "UPPER-CASE"
13 STOP RUN.
14
SOFTEK COBOL V1.003 SOURCE: UPRCASE.CBL DATE 16 Jun :6 TIME 09:43:55
PAGE: 00002

End of Compilation
2 Errors
0 Warnings
14 Source Lines
4 Symbols


Hope it varies with compilers.

If you place the error or query in detail it may help our members to solve it.
Back to top
View user's profile Send private message
sbachina

New User


Joined: 16 Jun 2006
Posts: 4

PostPosted: Mon Jun 19, 2006 6:41 pm
Reply with quote

Hi khamarutheen,

The following errors are I am getting during the compilation of the program. The type of compiler is CICS COBOL-11 with IMS. I am using IBM COBOL.

IGYPS2121-S "FUNCTION" was not defined as a data-name. The statement was discarded.
IGYPS0088-S The "MOVE" statement was invalid. Expected "TO", but found "UPPER-CASE". The statement was discarded.
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Mon Jun 19, 2006 8:15 pm
Reply with quote

Are you trying to convert Item-1 from lower to upper case, giving the result in Item-2?
if so then

INSPECT Item-1
CONVERTING
”abcdefghijklmnopqrstuvwxyz “TO
”ABCDEFGHIJKLMNOPQRSTUVWXYZ “

MOVE Item-1 to Item-2


will do the trick.
Back to top
View user's profile Send private message
sbachina

New User


Joined: 16 Jun 2006
Posts: 4

PostPosted: Mon Jun 19, 2006 8:28 pm
Reply with quote

Hi IQofaGerbil,


Item-1 is 1 char value but I don't what value in item-1. (Any character will be expected either A-Z OR a-z).

INSPECT Item-1
CONVERTING Variable-1 TO Variable-2
MOVE Item-1 to Item-2
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Mon Jun 19, 2006 8:32 pm
Reply with quote

my code will convert ANY lower case character to its upper case equivalent
if any other character is found it will be left as is.
Is that not what you want?
Back to top
View user's profile Send private message
sbachina

New User


Joined: 16 Jun 2006
Posts: 4

PostPosted: Mon Jun 19, 2006 8:57 pm
Reply with quote

Thank you IQofaGerbil,

Yes, It worked.
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 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts Trying to change copybook in online c... CICS 4
No new posts Change Default Scroll Setting TSO/ISPF 1
No new posts Change history of vsam file. JCL & VSAM 3
Search our Forums:

Back to Top