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
 

 

Inspect verb to convert LowerCase to UpperCase

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vinit_infy
Warnings : 1

New User


Joined: 07 Apr 2005
Posts: 56

PostPosted: Tue Nov 28, 2006 7:11 pm    Post subject: Inspect verb to convert LowerCase to UpperCase
Reply with quote

Hi,

Could anyone can help me for the below:

I have a variable having email id say example:
variable1 = abcd@xyz.co.in

I need to get the domain name in capital letters i.e.,

The output should be XYZ (letters between @ and first '.' in capital letters).
Please suggest me how can i get this result asap.
If you can do it through INSPECT verb it will be great.

Regards,
Vinit
Back to top
View user's profile Send private message

chettiyar
Currently Banned

New User


Joined: 27 Sep 2006
Posts: 6
Location: india,kerala

PostPosted: Tue Nov 28, 2006 7:21 pm    Post subject: Re: Inspect verb
Reply with quote

hi,
I will give a suggestion to u? Please try it out?
First you need to delimit the mail-id into 4 variables using UNSTRING.....
Ater that convert the xyz to XYZ using INSPECT.............. If u have any concerns send reply.......................
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Nov 28, 2006 7:22 pm    Post subject:
Reply with quote

inspect for the @ symbol, save that tally, inspect for the period, save that tally, use the tallys to execute a reference modification move.
Back to top
View user's profile Send private message
Farooq

New User


Joined: 24 Nov 2006
Posts: 15
Location: Chennai

PostPosted: Tue Nov 28, 2006 7:26 pm    Post subject: capital letters
Reply with quote

INSPECT variable1 REPLACING ALL "x" BY "X"
"y" BY "Y"
Etc......
BEFORE INTIAL "." AFTER INTIAL "@"
Back to top
View user's profile Send private message
chettiyar
Currently Banned

New User


Joined: 27 Sep 2006
Posts: 6
Location: india,kerala

PostPosted: Tue Nov 28, 2006 7:35 pm    Post subject: Re: Inspect verb
Reply with quote

yes farooq...............................................
I think u are right........................................
i think this is the most suitable answer...........................
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2238
Location: @my desk

PostPosted: Wed Nov 29, 2006 10:14 am    Post subject:
Reply with quote

Hi

We can use the INSPECT CONVERTING also...

Code:
INSPECT variable1 CONVERTING 'abcd....xyz' TO 'ABCD....XYZ' AFTER INITIAL '@' BEFORE INITIAL '.'.



To get the domian name separate William has already given the solution
Quote:
inspect for the @ symbol, save that tally, inspect for the period, save that tally, use the tallys to execute a reference modification move.





Thanks
Arun
Back to top
View user's profile Send private message
SSR
Warnings : 1

New User


Joined: 26 Feb 2006
Posts: 38

PostPosted: Wed Nov 29, 2006 2:38 pm    Post subject: Re: Inspect verb to convert LowerCase to UpperCase
Reply with quote

Hi Vinit,

Better solution is unstring the values in to four different variables delimited by '@' first and then by '.'. Then using Uppercase function convert the second variable to upper case.

Regards
SSR
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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