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
 

 

Insead of STRING STATMENT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Insead of STRING STATMENT
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: 7997
Location: Bellevue, IA

PostPosted: Mon Aug 04, 2008 6:11 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Aug 05, 2008 7:19 pm    Post subject:
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    Post subject:
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    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 Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm


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