Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Converting data from capital letter to small

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Converting data from capital letter to small
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

Moderator Team Head


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

PostPosted: Wed Nov 12, 2008 11:27 am    Post subject: Reply to: Converting data from capital letter to small
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Nov 13, 2008 2:25 am    Post subject: Reply to: Converting data from capital letter to small
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 13, 2008 4:02 am    Post subject: Reply to: Converting data from capital letter to small
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us