ok, I'm new but trying hard here. I have a job that becomes active once a person logs in. This job will sit in sbs qusrwrk and its status is deqw. I am trying to make a clp to end this job. I will show you what I have then tell you my problem with what i got so far.
I would like to see job (myjob1) inside my dtaara, but it doesnt show up, i am assuming its because the job status is deqw?? Also noticed that my little program here only pulls one job and its from me inside of sbs qpgmr. i know im doing a lot wrong so be kind please.
Also noticed that my little program here only pulls one job and its from me inside of sbs qpgmr.
First, MYJOB1 will only show up in the data area if the RTVJOBA command runs inside of a job named MYJOB1. That's what RTVJOBA does -- it retrieves attributes of the job that it runs within. It tells a program the attributes of the job that runs the program.
Are you wanting to find a job of that name? If so, RTVJOBA won't help you. It won't be relevant at all.
I'm not clear what your intended purpose is. What is the business problem that you are trying to solve?
Do you want to cancel (end) a user's interactive job for some reason?
Tom
Wouldn't it be better to address the activity levels and possibly reduce (or potentially eliminate) the dequeue waits? DEQW status is pretty normal and common in a multi-user system.
A single processor can really handle just program instruction stream at a time (ignoring multiple instruction pipelines, etc.) While one program actually runs, every other job/program waits in the queue until time-slice end or some kind of wait arises. Displaying active jobs gives a more or less instantaneous snapshot. The number of jobs showing something other than some kind of a wait state should be small. Most times that you look at a given program, there can be a high chance of catching it doing nothing.
What model system? What OS version? How much memory? How many active jobs?
Tom
Tom, these jobs become active when I user signs into a certain as400 application. When a user logs out the job will stay active for that certain application and user till another user signs into that app. Then that job ends and a new job begains for that user. This is something from what I'm told has to remain 'as is'. But when performing another certain function to the server itself, these jobs will prevent a successful completion of this task. Sorry so vage but I'm bound by details. But I'm sure with your expereince you know about what I am talking about.
Thanks for all your help.
...when performing another certain function to the server itself...
That sounds like you're referring to 'server' instances -- a networking application using ODBC (or JDBC, OLE DB or whatever) to perform remote database transactions. When a user leaves the application at the client (the PC probably), the server part of the connection is still there.
Files that were opened by the application still have locks held against them. The server instances don't know when the next request will come across the network, so they hold on to the files, keeping them available more closely to an instantaneous basis. Without the locks, some other process might make the files unavailable for transactions, and the server instances are in the business of keeping network connections happy.
Unfortunately, there are circumstances where the files need to be allocated for other work. A common example would be for backups, but there are application processes that can require strong locks.
Is your situation a server locking problem?
...another certain function...
What kind of process gets blocked? Are locks preventing a specific individual update or is it a general update across many rows in a table?
Can you recognize the locking jobs by name?
Commands to manipulate server instances might help better than a command like ENDJOB. Best would be to have the application control the locking, but that might be out of your control.
Tom
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 6  Replies