Page 1 of 1

Query selection criteria

Posted: Fri Sep 27, 2013 2:18 pm
by cbalint
I have several IBM Queries that are scheduled to run in Linoma that utilize date selection criteria. Most run on the first of the month with record selection of new records added to the file from the previous month. I have three Queries that run on Monday morning that select the newly added records from the prior week.

I'm currently manually updating the selection criteria on each query. Is there a way of automating selection criteria using Go Anywhere?

Re: Query selection criteria

Posted: Fri Sep 27, 2013 2:59 pm
by Support_Rick
If you're asking can GoAnywhere generate the dates you need (Date of 7 days ago) .. or, (Month - 1), etc ..

Then, the answer is yes. And, these values can be passed into your IBMi Queries.

This can be accomplished by creating variables like this:

<timestamp version="1.0">
<format outputVariable="DTE_yyyyMMdd" pattern="yyyyMMdd" month="-1" />
<format outputVariable="lastweek" pattern="yyyy-MM-dd" dayOfMonth="-7" />
</timestamp>