Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AS/400 Query Scheduling!

747 views
Skip to first unread message

Doug Porteous

unread,
Feb 11, 1998, 3:00:00 AM2/11/98
to

I'm working on a project that - in its current state - uses SQL Pass-Through
(Rumba ODBC driver) from within Microsoft Access to submit some 30 or so
queries. The queries do not run in parallel, since the Access application
must submit a single query and wait for the query to complete before
submitting the next query.

We are running into some issues with the total time required to run all of
the queries, and are looking at recreating the queries on the AS/400 so that
we can benefit from queued, concurrent query execution.

I'm aware that it is possible to schedule a query to run at a specific time
via the "built-in" Query facility on the AS/400, but is there any way to
schedule a query to execute, say, EVERY day at 6 p.m., or every Saturday and
Sunday at 3 p.m.?

Thanks in advance.
--Doug


Kent Milligan

unread,
Feb 11, 1998, 3:00:00 AM2/11/98
to

The AS/400 has a couple of job schedulers that let you call
a program at a scheduled time. No reason that this program
couldn't call Stored Procedures or another program to jump
start your queries.


--
Kent Milligan, DB2/400 Solutions Team
AS/400 Partners In Development
km...@us.ibm.com
GO HAWKEYES!!
(opinions stated are not necessarily those of my employer)

tho...@inorbit.com

unread,
Feb 12, 1998, 3:00:00 AM2/12/98
to

Doug:

The standard interface to the default job scheduler is via:

===> wrkjobscde

From there, you can add new entries and change or remove existing entries.

By entering:

===> go cmdscde

you can see a menu of all scheduler commands. Most of these, of course, can
be coded into CL programs for automating control of the scheduler.

You can check out how it works easily enough by adding entries to send
messages to yourself via the SNDMSG command on different schedules. There are
bits to learn about how the various options work together, but that's a
harmless way to learn.

For queries, you'll eventually want to schedule either 'call' commands to run
programs that execute the queries or 'runqry' commands directly. Depends on
the details of what you're up to.

Jump in and try it out.

Tom Liotta

In article <6bs6ua$d...@news.inforamp.net>,


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

Bradley V. Stone

unread,
Feb 12, 1998, 3:00:00 AM2/12/98
to

On 11 Feb 1998 12:52:26 GMT, "Doug Porteous" <port...@inforamp.net>
wrote:

>I'm working on a project that - in its current state - uses SQL Pass-Through
>(Rumba ODBC driver) from within Microsoft Access to submit some 30 or so
>queries. The queries do not run in parallel, since the Access application
>must submit a single query and wait for the query to complete before
>submitting the next query.
>
>We are running into some issues with the total time required to run all of
>the queries, and are looking at recreating the queries on the AS/400 so that
>we can benefit from queued, concurrent query execution.
>
>I'm aware that it is possible to schedule a query to run at a specific time
>via the "built-in" Query facility on the AS/400, but is there any way to
>schedule a query to execute, say, EVERY day at 6 p.m., or every Saturday and
>Sunday at 3 p.m.?
>
>Thanks in advance.
>--Doug
>
>

Look into job scheduled entries. WRKJOBSCDE


Bradley V. Stone
bvs...@usa.net
http://prairie.lakes.com/~bvstone/
1992 Yamaha FJ1200
1969 Suzuki T250
"Why is he sweating? I'm not sweating and I'm wearing a turtleneck! You're fired!"

George Keys

unread,
Feb 20, 1998, 3:00:00 AM2/20/98
to

Use addjobscde to create an entry to run a query see example below:-

Job name . . . . . . . . . . . . > BACKCHECK1 Name
Entry number . . . . . . . . . . > 000038 000001-999999, *ONLY
Command to run . . . . . . . . . SBMJOB CMD(RUNQRY QRY(SCDQRY/BACKCHECKS))
Frequency . . . . . . . . . . . *WEEKLY *SAME, *ONCE, *WEEKLY...
Schedule date, or . . . . . . . *NONE Date, *SAME, *CURRENT...

Schedule day . . . . . . . . . . *MON *SAME, *NONE, *ALL, *MON...
*TUE
*WED
*THU
*FRI
+ for more values *SUN
Schedule time . . . . . . . . . '22:00:00' Time, *SAME, *CURRENT

The baove example runs at 10pm every mon tue wed thu fri and sun.

Hope this Helps.

geo...@fone-logistics.co.uk

Osvaldo de Almeida

unread,
Mar 31, 2023, 2:27:17 PM3/31/23
to
Em sexta-feira, 20 de fevereiro de 1998 às 09:00:00 UTC+1, George Keys escreveu:
Hello Guys,

I need your support.

I want to create auto scheduled query. Which commands or tools can I use ?

Regards

Osvaldo de Almeida

saitology9

unread,
Mar 31, 2023, 2:40:05 PM3/31/23
to
On 3/31/2023 2:27 PM, Osvaldo de Almeida wrote:
> Hello Guys,
>
> I need your support.
>
> I want to create auto scheduled query. Which commands or tools can I use ?
>
> Regards
>
> Osvaldo de Almeida
>

Hello,
Saitology.com has tools that do this nicely on AS/400, iSeries, IBMi.
0 new messages