How do dcl a job that is in deqw status?

205 pts.
Tags:
AS/400 Job Queue
AS/400 jobs
AS400 Job Status
DCL command
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.

  PGM                                                                                                                                                                                                                                                      DCL VAR(&JOB) TYPE(*CHAR) LEN(10)                               DCL VAR(&USER) TYPE(*CHAR) LEN(10)                              DCL VAR(&NBR) TYPE(*CHAR) LEN(6)                                                                                                                   RTVJOBA JOB(&JOB) USER(&USER) NBR(&NBR)                                                                                                                CHGDTAARA DTAARA(mylib/myDTAARA (1 10)) VALUE(&JOB)                 CHGDTAARA DTAARA(mylib/myDTAARA (13 10)) VALUE(&USER) CHGDTAARA DTAARA(mylib/myDTAARA (25 6)) VALUE(&NBR)                                                                                                                                                 RTVDTAARA DTAARA(mylib/myDTAARA (1 10)) RTNVAR(&JOB)  RTVDTAARA DTAARA(mylib/myDTAARA (13 10)) RTNVAR(&USER) RTVDTAARA DTAARA(mylib/myDTAARA (25 6)) RTNVAR(&NBR)                                                                                      ENDJOB JOB(&NBR/&USER/&JOB)                                                                                                                                  ENDPGM 

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.

thanks.

 



Software/Hardware used:
as400
ASKED: October 22, 2010  11:41 AM
UPDATED: October 29, 2010  3:55 AM

Answer Wiki

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

Discuss This Question: 6  Replies

 
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
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • TomLiotta
    Just out of curiosity, is there a problem with jobs waiting for dequeue? Tom
    125,585 pointsBadges:
    report
  • lotofbad
    tempory Locks
    205 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • lotofbad
    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.
    205 pointsBadges:
    report
  • TomLiotta
    ...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
    125,585 pointsBadges:
    report

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