MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Performance when converting uppercase to lowercase

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
powerhawk
Beginner


Joined: 08 Nov 2004
Posts: 28
Topics: 4
Location: Stockholm

PostPosted: Fri Jan 13, 2006 4:21 am    Post subject: Performance when converting uppercase to lowercase Reply with quote

We have a frequently used function for translating uppercase to lowercase. The Cobol code we use is:
INSPECT TEST-DATA3CONVERTING 'ABCDEFGHIJKLMNOPQRSTUVWXY
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jan 13, 2006 5:25 am    Post subject: Reply with quote

powerhawk,

Add the following statement before the ID division
Code:

CBL LIST

The above parameter will produce a listing of the assembler-language expansion of your source code. Now take a look at the compiler listing after successful compilation. The process which generates least instructions will be the optimal one

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sun Jan 15, 2006 2:26 am    Post subject: Reply with quote

Powerhawk, I have used the same technique that you used after testing. Notice that if you use literal strings in you INSPECT statement it will generate inline code. If you use variable names then it will generate a call to a library routine. Even though the call to the library routine generates less ASSEMBLER code it is not as efficient as the inline code.

Try it and see... I did and that's what I found.

Chuck Haatvedt
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Sun Jan 15, 2006 3:38 am    Post subject: Reply with quote

You can use the intrinsic function "LOWER-CASE".

O.
________
HELP IN LOVE
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group