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
 

 

Execute ICETOOL operators conditionally?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Fri Apr 11, 2008 6:28 am    Post subject: Execute ICETOOL operators conditionally?
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Fri Apr 11, 2008 6:44 am    Post subject:
Reply with quote

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
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Fri Apr 11, 2008 11:56 am    Post subject:
Reply with quote

>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
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Fri Apr 11, 2008 3:50 pm    Post subject:
Reply with quote

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..! icon_lol.gif
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Fri Apr 11, 2008 3:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Fri Apr 11, 2008 7:03 pm    Post subject: Reply to: Execute ICETOOL operators conditionally?
Reply with quote

>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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Apr 11, 2008 9:23 pm    Post subject:
Reply with quote

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:

http://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
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Fri Apr 11, 2008 9:29 pm    Post subject: Reply to: Execute ICETOOL operators conditionally?
Reply with quote

>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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts execute APP if they are not ADDRESS T... italo_pm CLIST & REXX 3 Fri Aug 12, 2016 2:15 am
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm


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