quick "check for data" query before other queries run?

Greetings, long-time lurker, first time asker.

I'm using:
OpenText Analytics Designer
Version: 4.6.0
Build id: v20160406

I am working on a report that runs some complex queries against a few tables in a DB2 Z/OS dbase. These queries can take a long time to run, which is fine if the user gets the data they need at the end. However I am finding that they also take a long time to run even if there is no data returned for the user-entered parameters.

I am wondering if there is a way to run a quick little query to find out if the user parameters are going to return anything, and then either stop everything if there's no data, or keep going if there is. I imagine I would do this in something like an "initialize" or "beforeFactory" script, but I don't know how to work up an SQL query against one of my data sources in Javascript. If I could do this and then set a "check for data" report parameter to Y or N based on the results, I can figure out the rest...

Any thoughts? Is this a terrible idea? Do I just need to ask my enterprise architect to get this database off a mainframe and onto linux servers where it belongs?

Sign In or Register to comment.