Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Zux995 Absent Member.
Absent Member.
800 views

Converting lower case to upper case in ACUCOBOL

Jump to solution

Hi All community,

 

Can you please provide me with an example of a function in procedure division where you apply conversion from lower case to upper.

i need the Syntax whether it is in form of example, i've been reading the book but can't get how it makes please

 

best regards 

Zux

0 Likes
1 Solution

Accepted Solutions
davide_stfc Absent Member.
Absent Member.

RE: Converting lower case to upper case in ACUCOBOL

Jump to solution

Hi Zux.

We simply use a call to "c$toupper" primitive, giving to it the pic X and its length:

Simple example:


77 wks-string pic x(60) value spaces

......

move "lower test" to wks-string.

call "c$toupper" using wks-string
                 value length of wks-string.



--
Davide Giudici

View solution in original post

4 Replies
davide_stfc Absent Member.
Absent Member.

RE: Converting lower case to upper case in ACUCOBOL

Jump to solution

Hi Zux.

We simply use a call to "c$toupper" primitive, giving to it the pic X and its length:

Simple example:


77 wks-string pic x(60) value spaces

......

move "lower test" to wks-string.

call "c$toupper" using wks-string
                 value length of wks-string.



--
Davide Giudici

View solution in original post

buggabill Absent Member.
Absent Member.

RE: Converting lower case to upper case in ACUCOBOL

Jump to solution

There are a couple ways to do this.   I use the intrinsic function UPPER-CASE pretty often.  You can also use "C$TOUPPER" as indicated above.

 

MOVE FUNCTION UPPER-CASE(WS-VALUE) TO WS-VALUE.
0 Likes
GeorgeK Absent Member.
Absent Member.

RE: Converting lower case to upper case in ACUCOBOL

Jump to solution
C$TOUPPER, C$TOLOWER, C$JUSTIFY, C$COPY, etc very useful utilities.
0 Likes
GeorgeK Absent Member.
Absent Member.

RE: Converting lower case to upper case in ACUCOBOL

Jump to solution
I'm looking for work again. World of opportunities out there for me. Feel like I'm free as a bird after leaving my other job. I tried convincing them compiling back to Acucobol 3.2 compatibility was not necessary and not advisable. I'm looking forward to being in a more up to date job.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.