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

Converting data from capital letter to small


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
honestsoul

New User


Joined: 05 Nov 2008
Posts: 23
Location: delhi

PostPosted: Wed Nov 12, 2008 11:19 am
Reply with quote

Hi,

i want to convert a variable which is in capslock by default to small letter

for example : EDBIKRT
out should be :edbikrt

ANY REXX FUNCTION for it???
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Nov 12, 2008 11:27 am
Reply with quote

No, you need to write your own:

Code:

/* REXX CVTLOWER */
Parse Arg string
upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
lower = 'abcdefghijklmnopqrstuvwxyz'
low_string = Translate(string, lower, upper)
Return low_string
Back to top
View user's profile Send private message
honestsoul

New User


Joined: 05 Nov 2008
Posts: 23
Location: delhi

PostPosted: Wed Nov 12, 2008 11:59 am
Reply with quote

thanks superk

actually i am passing the value through a variable its a big program...
just before the output i need to change the capital letter value to small letter...

The below code just calling the variable. and i just want the &CFIL variable to b in small letter its comming in capital.

locsite pri=5 cy sec=1 cy u=prodda rec=fb lr=300 blocksi=0
get &CFIL..txt 'WGTP.NONX.WGT0&CN.R.&CS..GRPTAPE(+1)'
rename &CFIL..txt &CFIL..old
Back to top
View user's profile Send private message
honestsoul

New User


Joined: 05 Nov 2008
Posts: 23
Location: delhi

PostPosted: Wed Nov 12, 2008 12:21 pm
Reply with quote

Hi,
also,i want to write 8 length value starting from 73 column and ending in column 80.

the ouput should be:
73 80
MOPK 00010000


Note:73 and 80 are the column position. not the output value.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Nov 13, 2008 2:25 am
Reply with quote

Kevin provide a function to convert to lower case. Just add it to the bottom of your larger exec, but add a label:
Code:

/* REXX CVTLOWER */
CVTLOWER:
Parse Arg string
upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
lower = 'abcdefghijklmnopqrstuvwxyz'
low_string = Translate(string, lower, upper)
Return low_string


And just when you need to change case, do something like this:
Code:

CFIL = cvtlower(CFIL)


although, your example looks suspiciously like CLIST rather than rexx. The solution Kevin provide is REXX.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 13, 2008 4:02 am
Reply with quote

Quote:
like CLIST rather than rexx


looks more like FTPese to me icon_biggrin.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 3
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top