Finding the As400 Job completion time

20 pts.
Tags:
AS/400 Job Prioritization
AS/400 Job Queue
AS/400 jobs
Can anyone please tell, how to find the Job completion time in AS/400

Answer Wiki

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

There are several ways to find a job completion time so can you be more specific?
In the interim, here are a few:

If you know the name of the user that sbm the job, enter dspmsg userid
Wrkjob if you know the job name (user and number info for the exact job), F11 to view the time the joblog was generated.
Dsplog, f4, f10 then enter the job name, etc.
To view all completion time, dsplog, f4, f10 and enter CPF1164.

=====================================================

In addition to those, if you <b>need</b> to track job start/end times, you should enable job accounting. (See system value QACGLVL.) The system accounting journal will track start and end times for jobs.

Retrieve the journal entries of Code ‘A’ and type ‘JB’ for the specific job name that you’re interested in. The JODATE and JOTIME fields of the journal entry will record when the entry was created, which will be at the time that that job segment completed. Start dates/times are recorded within the entry-specific data.

Tom

Discuss This Question: 10  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
  • Jagadisan
    Thanks for replying my query, can you please provide screenshots, if possible
    20 pointsBadges:
    report
  • TomLiotta
    can you please provide screenshots Screenshots of what? Tom
    125,585 pointsBadges:
    report
  • NullFields
    One quick way is to use the DSPLOG command filtering on the job name, start job message id (CPF1124 ) and end job message id (CPF1164). So... DSPLOG JOB(QZDASOINIT) MSGID(CPF1124 CPF1164) will provide a list of the start and end message of all QZDASOINIT jobs still avilable on the system log. There are other parameters that allow further filtering. The TAATOOLS product also offers tools that place this data into a database table that can easily be queried and graphed when exported to excel.
    880 pointsBadges:
    report
  • Kaisersosa
    One way would be to create your own log file with a timestamp field and a long text field in it. When Jobs A,B,C or D are called/inzed, write a record to the log file. When Jobs A,B,C or D are exited/return, write a record to the log file. Add a program name field to the log file too, that way you can 'SQueaL' out just the program your are interested in. John B
    275 pointsBadges:
    report
  • HMSSL2K
    If you are using the IBM Job Scheduler, you can use option 8, then option 4 for the job log. If using Robot Scheduler, you can look in the history log for time.
    3,175 pointsBadges:
    report
  • iiiiiiiiiiiii
    Hi I have same question to asked ,i have three jobs which has been scheduled under my user profile daily at 4:00 am and all the three jobs completes by 5:00 Am.I just want to track this job name ,start time and end time in one PF So that i can send the daily report through the email to the users.How can i achieve this.Can anybody suggest me on this through sample code. Thanks
    335 pointsBadges:
    report
  • TomLiotta
    I just want to track this job name ,start time and end time in one PF So that i can send the daily report through the email to the users.   Why do you need a PF if you're going to send completion times to users?   Can anybody suggest me on this through sample code.   Did you create the jobs? Are you a programmer?   The simplest is already mentioned above. Here's the total programming to add job start and ending times for a job named ACGJOB2 into a file named MYACGDTA for a job starting at or after 3:59 AM on Dec 20, 2012 and ending sometime before 5:30 AM on that day:   DSPJRN JRN( QACGJRN )       RCVRNG( *CURCHAIN )       FROMTIME( 12202012 0359 )       TOTIME( 12202012 0530 )         ENTTYP( JB )       JOB( ACGJOB2 )       OUTPUT( *OUTFILE )       OUTFILFMT( *TYPE4 )       OUTFILE( MYACGDTA )       OUTMBR(*FIRST *ADD)   If you have three different jobs that you want to track, you will have three DSPJRN commands, one for each job.   The MYACGDTA file was created with this:   CRTDUPOBJ OBJ( QAJBACG4 )          FROMLIB( QSYS )          OBJTYPE( *FILE )          TOLIB( QTEMP )          NEWOBJ( MYACGDTA )   In that case, the file was created in QTEMP. If it's going to be a permanent file, though, you'd create it in a permanent library. The end time of the job is in field JATSTP which is a TIMESTAMP. Job start date and start time are in JASDTE and JASTIM, both are simple CHAR (6) fields. Of course, once you have the values, you can format them any way you choose.   In order to make it work, enable job accounting. If you want to do it some other way using your own method instead of using what the system already can do, you might need to write the programming. Nobody else will know how you want it to work. It won't be easy doing better than a single DSPJRN command for each job.   Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    This editor formats code unpredictably. Sometimes it seems to work great (even though I usually have to do it manually by editing the source), and other times it does it its own random ways.   Tom
    125,585 pointsBadges:
    report
  • abcd645
    how do i check if how many number of  jobs are running with the same job name?
    10 pointsBadges:
    report
  • TomLiotta

    how do i check if how many number of  jobs are running with the same job name?

    Run DSPJOB JOB(jobname). All jobs that you are authorized to and that have that name will be listed.

    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