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

Inspect verb to convert LowerCase to UpperCase


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 3156
Location: Tucson AZ

PostPosted: Tue Nov 28, 2006 7:22 pm
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
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
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: 2481
Location: @my desk

PostPosted: Wed Nov 29, 2006 10:14 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top