AS400/iSeries Queries on a schedule

100 pts.
Tags:
AS/400 import/export
Microsoft Access
Microsoft Excel
I have several queries that I run daily manually, I will like to know step by step how can I have my queries to run on a schedule using the SBMSCHJOB command, then I will like to export them to Excel or Access.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

You can use the WRKJOBSCDE to add scheduled jobs to run each of your queries.

I would suggest however, (especially in view of your exporting requirements) that you write a small CL program to run your queries and schedule the program.

In the CL program you can simpy use RUNQRY to run all your queries. Assuming that your queries create output files you can then use CPYTOIMPF or CPYTOSTMF to create files that you can use to import into Excel or Access.

Example :-

PGM

RUNQRY QUERY01
RUNQRY QUERY02

CPYTOIMPF ….

ENDPGM

Regards,

Martin Gilbert.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following