If you need to run a as400 job, say a database query or report on a regular schedule, heres and example of how to do this. Lets say you needed to run a query every 10 mins...
You could submit a CL program, MYJOB to do this, to batch, with a 10 minute delay and a data area to terminate the job externally...
MYJOB:
Loop:
Run database query
Print Report
FTP data
etc
dlyjob 10 minutes
check kill dataarea and exit if set
goto loop
The problem here is that the job will could run for almost 10 minutes after, if the kill data area is set just after its checked. If you operator needs to shut down the system in a hurry you dont want him waiting an extra 10 minutes for a DLYJOB.
A better way to do the is to replace the read of a data area with a read of a data queue. The CL can then wait the required time for a kill entry to appear on the data queue. If it does you end processing runs immediately, if not you core processing runs again, then the check again. The most you will have to wait is the length of time it takes to run your core processing! So no DLYJOB required, just a QRCVDTAQ (and a QSNDDTAQ to set it of course)
MYJOB:
Loop:
Run database query
Print Report
FTP data
etc
check and wait on kill dataqueue for 10 mins and exit if set
goto loop
Showing posts with label housekeeping. Show all posts
Showing posts with label housekeeping. Show all posts
Friday, September 18, 2009
Trying to find out as400 library size
To find out your as400 library sizes run
DSPLIB LIB(*All) OUTPUT(*PRINT)
in a batch job.
This will show you the size of all objects in the as400 libraries and the total library size including the objects at the bottom of each library in the report.
DSPLIB LIB(*All) OUTPUT(*PRINT)
in a batch job.
This will show you the size of all objects in the as400 libraries and the total library size including the objects at the bottom of each library in the report.
Subscribe to:
Posts (Atom)
Popular Posts
- Common Gateway Interface (CGI) on the as400 / iSeries
- Why Crunch Mode (Long Hours) Doesn't Work
- AS400 APIs
- About Me
- About Us
- AS400 API - QCMDEXC - Execute Command
- Using as400 QRCVDTAQ api to retrieve a message / entry from a dataqueue
- as400 Client Access and iSeries Navigator
- Lawson Software acquired Intentia International for $480 million last week.
- What is QZHQSSRV job?