View previous topic :: View next topic |
Author |
Message |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Thu Apr 23, 2009 11:50 pm Post subject: Improving performance of my JCL |
|
|
I am having a job which runs a proc containing 22 steps.
First step sorts the input file IN-FILE and gives output file OUT-FILE1.
Second step runs one generic program PROGRAMA which processes OUT-FILE1 and prepares OUT-FILE2.
Remaining 22 steps execute different programs PROGRAM1 TO PROGRAM20 with same input file OUT-FILE2.
Each program generates output file based on value in the input file OUT-FILE2 in positions 72-73.
At a time only one value will be present in my input file among 01 to 20.
Each program PROGRAM1 TO PROGRAM20 requires different values 01 to 20 respectively to generate output.
Means if it is 01 PROGRAM1 does specific processing and generates output file.
And all remainings programs are also running and checking for required value and not generating output.
In this way output will be generated only from one program but all programs getting executed.
Due to this overall completion of job is taking more time and performance of the job is decreasing.
I have a thought of including one step before the first step and extracting the value in positions 72-73.
And based on that value my required program runs rather executing all programs.
But I am not getting how to do this.
Can anybody please help me. _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Apr 24, 2009 4:02 am Post subject: |
|
|
well you could redesign your process, which seems to be the problem.
make programs 1 thru 20 dynamically called submodules from a control module.
based on the value in the input the control module will call the appropriate submodule to process the data.
yes, will take a little modification of programs 1 thru 20
-like taking out the I/O and having the input record (read by control module) passed to the sub-module.
this also enables you to add new submodule (for new values),
and you don't have to change your jcl.
and yes, I imagine someone will post a method whereby the jcl can attempt to
make up for a poor program design. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Fri Apr 24, 2009 4:25 am Post subject: |
|
|
Thanks for your reply Dick.
I understood your suggestions.
But all my programs are in production which can't be changed so easily as they are designed long time back. Only thing in my hand is that I can change JCL or PROC to perform the task in efficient manner. _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
RonB Beginner
Joined: 02 Dec 2002 Posts: 93 Topics: 0 Location: Orlando, FL
|
Posted: Fri Apr 24, 2009 7:51 am Post subject: |
|
|
Perhaps this would help?
Run a SORT step like this right after creating OUT-FILE2
Code: | //SPLITTER EXEC SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD out-file2,disp=shr
//SORTOF01 DD DSN=select01,UNIT=,DISP=,SPACE=,etc
//SORTOF02 DD DSN=select02,UNIT=,DISP=,SPACE=,etc
. . .repeat for SORTOF03 thru SORTOF20
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(72,2,CH,EQ,C'01')
OUTFIL FILES=02,INCLUDE=(72,2,CH,EQ,C'02')
. . .repeat for OUTFIL FILES=03 thru FILES=20
/* |
Then, change the input to the remaining steps from OUT-FILE2 to the respective select**, where ** represents the record type that that program step would process. All but ONE of the select** files will be empty. _________________ A computer once beat me at chess, but it was no match for me at kick boxing. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Apr 24, 2009 8:26 am Post subject: |
|
|
PROGRAMA can set RETURN-CODE special register - which in essence would be the magic record code of your outputfile.
add to your exec proc statements COND parms to check the return code of the step - program A;
then you would invoke only the program you need.
also, if you put the COND on the exec proc, you only have to modify your basic JCL and not the procs.
you could also use IF/THEN/ELSE if you don't like COND.
It maybe that you need to set a return code base on a multiple of 4.
you will also have to coordinate with your scheduler, since the job will now end with a maxx cc > 0. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Sun Apr 26, 2009 11:01 pm Post subject: |
|
|
Thanks Dick for your solution. I will try to work on your suggested solution. _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Mon Apr 27, 2009 1:38 am Post subject: |
|
|
Is it possible to set different RC for each value of input file through a SORT step, so that I will override the COND parameter of each step through JCL and run the step only when specific RC is set in the SORT step. _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
|
|