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

Insead of STRING STATMENT


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Mon Aug 04, 2008 5:46 pm
Reply with quote

I need to tune below line. Which statement it will give performance ( I need to reduce CPU time)

STRING WS-FIRST-NAME DELIMITED BY SPACE
INTO FIRST-NAME

Now its taking more so I need solution
Instead of STRING STATMENT.. I need convert to INSPECT statement same logic..
How need to do?

Then I want which statement will give performance for reduce CPU time

Please advise on this
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Aug 04, 2008 6:11 pm
Reply with quote

First, how do you know this statement is your problem statement? Unless you use a tool like STROBE you're merely guessing and not likely to be guessing right.

Second, unless you're executing this statement many millions of times it's no more likely than any other statement to be your problem.

Third, INSPECT or reference modification are not likely to be significantly faster than STRING.

Finally, "reduce CPU time" is an odd goal. Generally you want to get the job done faster, and elapsed time depends on so many factors other than CPU time that the exact same job, running twice on the same day, can vary by 50 ... 100 ... 5000% in elapsed time.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Aug 04, 2008 6:14 pm
Reply with quote

Why not just move ws-first-name to first-name? Using string to move a single field seems a little strange.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 04, 2008 7:23 pm
Reply with quote

because he is moving a 30 char field to a 20 char field and he wants to remove all trailing spaces.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Aug 04, 2008 7:25 pm
Reply with quote

dbzTHEdinosauer wrote:
because he is moving a 30 char field to a 20 char field and he wants to remove all trailing spaces.


No comment.
Back to top
View user's profile Send private message
vicky10001
Warnings : 1

Active User


Joined: 13 Jul 2005
Posts: 136

PostPosted: Tue Aug 05, 2008 9:56 am
Reply with quote

Thanks for reply... I found statement from Strobe tool only..
The above statement we can modify to Inspect meant How?
Thanks in advance
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Aug 05, 2008 7:19 pm
Reply with quote

Hello,

Quote:
The above statement we can modify to Inspect meant How?
I do not understand. . .

Neither INSPECT nor STRING are a good choice if you want to reduce cpu usage. Both use cpu heavily.

As was asked earlier, why not use a simple move (or at least a reference modified move)?

If you post your "from" variable definition and your "to" variable definition, some sample data, and what you want in the receiving field after the "move", it may help us help you.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 05, 2008 7:26 pm
Reply with quote

I have a very close friend with a two part first name, she gets very upset when it is cut off at the first space.
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 Copy only TEXT or String from a record SYNCSORT 4
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts sort to find out the char which repea... Mainframe Interview Questions 10
No new posts Help with C character vs C string All Other Mainframe Topics 3
Search our Forums:

Back to Top