AS400 Mid Range/CL Program

Advertisement


Question
I am relatively new at programing so I wasn't really sure how to accomplish
this.  Where I work, we have a job that runs that ends other jobs in a
particulay subsystem in a controlled manner.  So after the end jobs runs, the
other job take a few minutes to come down. After these jobs end, we manually
bring down the subsystem and check for objeck locks on a particulay file.  Any
locks and we end the users.  This has to be done before another job run after
it.  This next job has a pause message that hold the job from running until we
are sure there are no locks on the file and the sub-system is down.  Now that I
have given a back ground, here is my question. Using a CL program, is there
some thing I could write to A) end the jobs *cntrld  B) end the sub-system  C)
look for object locks on a file and end any users  D)  elimiate the need for a
pause message so the next job can run.   Any help would be greatly appreciated.  

Answer
The main reason you can't write a program to handle the cancellation of your jobs is because IBM does not include an option on the WRKOBJLCK command to create an outfile with information about which jobs need to be cancelled. Otherwise, you would be right - you could write a program to execute the process.

AS400 Mid Range

All Answers


Answers by Expert:


Ask Experts

Volunteer


Concise Systems/Laird Scranton

Expertise

General AS/400, RPG/400, SDA and CL programming questions. AS/400 performance tuning.

Experience


Past/Present clients
CB Sportswear
Coca-Cola of New York
Encore Paper Company
Golub Corporation
HBO Home Video
Imperial Pools
Kaiser Permanente of NE New York
Mallinckrodt Medical
Marigold Foods
Manpower & Associates
National Datacomputers
New York State Easter Seals Society
New York State Food Merchants Association
Pepsi-Cola Allied Bottlers
Petricca Construction
Taconic Telephone Corporation
TOMRA Recycling
Unistress Corporation

©2012 About.com, a part of The New York Times Company. All rights reserved.