ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Jobs to be listed in WRKJOB, and to produce a job log

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jobs to be listed in WRKJOB, and to produce a job log

    Hi all,

    We have a program that schedule jobs to a job queue.
    The problem is after the job is completed, I cannot work with the job anymore using WRKJOB.
    I checked IBM site command WRKJOB lists the jobs either active, on a job queue or on a output queue.
    Thus I guess if a job does not produce any spool file, it will not listed by WRKJOB. Am I right?

    Further to this, I tried SBMJOB on behalf of that ID using the "User" field in SBMJOB and a job log is created.
    What is the user profile parameters or system value I need to look at to see why the job log is not created for the scheduled job?

    Thanks in advance.

  • #2
    Re: Jobs to be listed in WRKJOB, and to produce a job log

    most likely the 2 user profiles are using different JOBDs and one is set to not produce a job log
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Jobs to be listed in WRKJOB, and to produce a job log

      Originally posted by tomholden View Post
      most likely the 2 user profiles are using different JOBDs and one is set to not produce a job log
      Hi,

      No. I means I had tried SBMJOB using that particular ID which submit the scheduled job, and my test do produce a job log.

      Other than that I also want to know is it job that without spool file generated will not be listed by WRKJOB?

      Thanks

      Comment


      • #4
        Re: Jobs to be listed in WRKJOB, and to produce a job log

        Hey,

        Code:
                                       Submit Job (SBMJOB)                         
                                                                                   
         Type choices, press Enter.                                                
                                                                                   
         Command to run . . . . . . . . .                                          
                                                                             ...   
         Job name . . . . . . . . . . . .   *JOBD         Name, *JOBD              
         Job description  . . . . . . . .   *USRPRF       Name, *USRPRF            
           Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB     
         Job queue  . . . . . . . . . . .   *JOBD         Name, *JOBD              
           Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB     
         Job priority (on JOBQ) . . . . .   *JOBD         1-9, *JOBD               
         Output priority (on OUTQ)  . . .   *JOBD         1-9, *JOBD               
         Print device . . . . . . . . . .   *CURRENT      Name, *CURRENT, *USRPRF..
        Notice that the Job description on the command defaults to *USRPRF. So when you submit the job, it goes to your user profile and uses its jobd. If you submit the job for another user, i think it will still use your user profile JobD.
        Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

        Comment


        • #5
          Re: Jobs to be listed in WRKJOB, and to produce a job log

          And that's what Tommy was saying. It's not necessarily the user that determines the joblog; it's the LOG() parameters of the SBMJOB command plus the JOBD() parameters of both SBMJOB and ADDJOBSCDE. By default, the LOG() parameter values come from the *JOBD that is used, not necessarily from the user. (And note that IBM defaults might not be the same as the defaults on your system.)

          What *JOBD is used in the job scheduler entry? What *JOBD is used when you run SBMJOB? Then, if you can show those to be the same, look at the defaults for the SBMJOB LOG() parameter to see if it specifies '*JOB' or a specific logging level.

          Next, even if all settings are the same for those, a job may run sometimes and produce a joblog without producing a joblog for other runs. If no messages are in the job's external message queue when the job ends, some logging levels will not produce a spooled joblog. You need to ensure that the given logging levels are what is needed to guarantee a spooled joblog.

          And finally (unless other things are thought of), you need to determine if a joblog was created but subsequently deleted. If that was the only spooled output and was deleted (or even if it was attached to a different user), then the system entry for the job will be removed. The job will no longer appear in places like WRKJOB.

          Possibly you could temporarily hold the *JOBQ that the job scheduler job is sent to. Then do an immediate submission from the scheduler and hold the job on the queue. Release the *JOBQ, and you'll have a sample of the job scheduler job to examine.
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            Re: Jobs to be listed in WRKJOB, and to produce a job log

            If a job is submitted for a different job user, SBMJOB will default to the *JOBD of the job user rather than the *JOBD of the submitting user.
            Tom

            There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

            Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

            Comment


            • #7
              Re: Jobs to be listed in WRKJOB, and to produce a job log

              I see. sorry for misunderstand what Tom said.
              Understood now and I will check the jobd.
              Thank you for all the replies.

              Comment

              Working...
              X