View previous topic :: View next topic
|
Author |
Message |
fazilbe
New User
Joined: 03 Dec 2008 Posts: 25 Location: INDIA
|
|
|
|
Hi
I am trying to performance tune a job and tried the below code changes. I used three different ways to make the job run faster, But i ended up with no improvements, All the three methods showed similar run time and cpu time .Could anybody let me know if there is any other possiblity i can try on this ?
Requirement is to process more than 40 million records, In which a particular field WS-AUTHCD-ALPHA-15 (pic x(15) ) need to be unstringed.
example
Say WS-AUTHCD-ALPHA-15 = Main frame , I want only the Main to be stored in another variable WS-AUTHCD-ALPHA-15-JR, So that should be WS-AUTHCD-ALPHA-15-JR = Main
I used below three methods to do the same and almost the job ran for 30 mins.
1 .I used unstring
UNSTRING WS-AUTHCD-ALPHA-15
DELIMITED BY SPACE
INTO WS-AUTHCD-ALPHA-15-JR.
2. I Used Perform
PERFORM
VARYING SUB FROM 1 BY 1
UNTIL SUB > LENGTH OF WS-AUTHCD-ALPHA-15
OR WS-AUTHCD-ALPHA-15(SUB:1) = SPACE
CONTINUE
END-PERFORM
IF SUB GREATER THAN 1
SUBTRACT 1 FROM SUB
END-IF
MOVE WS-AUTHCD-ALPHA-15(1:SUB) TO WS-AUTHCD-ALPHA-15-JR
3. I Used Inspect
MOVE ZEROS TO SUB
INSPECT WS-AUTHCD-ALPHA-15 TALLYING SUB FOR CHARACTERS
BEFORE INITIAL SPACE
MOVE WS-AUTHCD-ALPHA-15(1:SUB) TO WS-AUTHCD-ALPHA-15-JR
Could anyboy please help me with a different innovative solution to make it run faster.
Thanks a lot in advance |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
While working on alternatives, i'd suggest changing your code so that the file is simply read and some constant action is taken on the data. This will not address the tuning issue, but will give an idea of how much wall time, cpu time amd i/o are needed to simply read the input into the program (do not use any utility, but use a stripped down version of this program). If this program writes an output file, that should also be done.
The goal is to see how the code runs with no attempt at manipulating the authcd. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
And what does your JCL currently look like? |
|
Back to top |
|
|
|