View previous topic :: View next topic
|
Author |
Message |
David Eisenberg
New User
Joined: 15 Nov 2007 Posts: 39 Location: New York
|
|
|
|
Anyone,
I have an ICETOOL job step with several operators (some SORTs, some COPYs, and a SPLICE). The job step takes about 30 minutes of elapsed time to run.
The first SORT operator in the ICETOOL step sorts an input file of variable-length records consisting of several logical record types, where the first character (in column 5) indicates the type. In this application, it so happens that if a particular record type (let's call it "X") is not present at all in the input file, then some of the remaining ICETOOL operators are unnecessary, and I could simplify the entire process.
Suppose I were to use an INCLUDE COND and an OUTFIL to produce an output file consisting only of type "X" records as the first thing I do. Is there any way that I could then perform a different set of ICETOOL operations if that file were empty? That would dramatically cut down on the execution time of the job.
I know that ICETOOL isn't a programming language with branches, etc, but I would appreciate any suggestions for the best way to approach this.
Thanks so much.
David |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello David and welcome to the forums,
It will help us help you if you post the jcl and control statements for your process. If there is an issue with using "real" dataset names, just make up fake dsns.
Also, please post the recfm and lrecl of the input/output files and a guestimate of file sizes. |
|
Back to top |
|
|
David Eisenberg
New User
Joined: 15 Nov 2007 Posts: 39 Location: New York
|
|
|
|
>It will help us help you if you post the jcl and control statements for your process.<
Actually, before I post all the gory details, I think I now see an approach I can take that will almost work... but maybe not quite...
I've just been reading about the NULLOFL option on the OUTFIL statement. Using that, I could theoretically split up my ICETOOL job into parts. I could start my job with an ICETOOL step that SORTs my input file and generates two OUTFILs: one with only the "X" records and the NULLOFL=RC4 option set, and the other OUTFIL would be the remaining records. Then I could use COND= logic in the JCL to execute one of two different ICETOOL steps, depending upon whether or not I get an RC=4 from the first step.
The problem, of course, is that I could presumably get an RC=4 out of the first ICETOOL step for some other reason than NULLOFL getting set. Is there something else I can check for or do that would indicate conclusively that there were no "X" records in the input file, and therefore know what to do next?
For example, I see that right now, I'm getting an ICE174I message because there are no "X" records in the OUTFIL. Can I somehow test specifically for that message, and take the necessary action?
David |
|
Back to top |
|
|
Claes Norreen
Active User
Joined: 20 Dec 2005 Posts: 137 Location: Denmark
|
|
|
|
As far as I know, you can only execute JCL conditionary based on condition codes. So no matter what you do you'll always end up not knowing if that CC was set due to "no records" or an actual error.
If there's a way to work around this, I'd be very interested to know it as well..! |
|
Back to top |
|
|
Claes Norreen
Active User
Joined: 20 Dec 2005 Posts: 137 Location: Denmark
|
|
|
|
By the way... What you CAN do is to have an application program (eg. REXX or COBOL etc) build your ICETOOL control statements based on the input, and the use these datasets as input to ICETOOL, like this:
//TOOLIN DD DSN=control cards generated by app. program
//CTLxCNTL DD DSN=control cards generated by app. program
/Claes |
|
Back to top |
|
|
David Eisenberg
New User
Joined: 15 Nov 2007 Posts: 39 Location: New York
|
|
|
|
>What you CAN do is to have an application program (eg. REXX or COBOL etc) build your ICETOOL control statements based on the input<
That's an excellent idea. I might even call ICETOOL directly from the application.
Thank you!
David |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Is there any way that I could then perform a different set of ICETOOL operations if that file were empty? |
ICETOOL's MODE operator can control the flow of ICETOOL operators to some extent but not to do what you're asking about. It can let you stop or continue executing operators in case of an error, but it can't perform different operations for different conditions.
Quote: |
The problem, of course, is that I could presumably get an RC=4 out of the first ICETOOL step for some other reason than NULLOFL getting set. |
The list of reasons for RC=4 is short and is controlled by various parameters. See:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CM20/2.4.1?DT=20060721170811
You could, in fact, ensure that you'd only get RC=4 for an empty OUTFIL data set by using these parameters:
Code: |
//DFSPARM DD *
OPTION NULLOFL=RC4,OVFLO=RC0,PAD=RC0,TRUNC=RC0,SPANINC=RC0
|
I agree that REXX might be a better solution in this case. |
|
Back to top |
|
|
David Eisenberg
New User
Joined: 15 Nov 2007 Posts: 39 Location: New York
|
|
|
|
>I agree that REXX might be a better solution in this case.<
That settles it, then! That's what I'll do. Thanks so much!
David |
|
Back to top |
|
|
|