Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
Location: East Dubuque, Illinois, USA

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: 6968
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us