ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Sbmjob

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

  • Sbmjob

    Hi ,

    I want to replace CALL PGM(mypgm) PARM(&p1 &p2 &p3) with SBMJOB CMD(CALL PGM(mypgm) PARM(&p1 &p2 &p3).
    But,its not working,im not getting any error messages for this.
    Im not able to get the output.
    Do i need to add any extra statements,inorder to make it work??

    Can any one help out with this??

    Thanks,
    Nancy.

  • #2
    Re: Sbmjob

    Originally posted by Nancy View Post
    Hi ,

    I want to replace
    Code:
    CALL PGM(mypgm) PARM(&p1 &p2 &p3)
    with
    Code:
    SBMJOB CMD(CALL PGM(mypgm) PARM(&p1 &p2 &p3)
    But,its not working, i'm not getting any error messages for this.
    Im not able to get the output.
    Do i need to add any extra statements in order to make it work??

    Can any one help out with this??

    Thanks,
    Nancy.
    Try an extra ")" on the end.
    Code:
    SBMJOB CMD(CALL PGM(mypgm) PARM(&p1 &p2 &p3))
    But if that obvious one was not the case then try WRKSBMJOB *JOB to see if the job was submitted on hold and is waiting to be released ?

    Or Try specifying the JOBQ etc.
    Code:
    SBMJOB CMD(CALL PGM(mypgm) PARM(&p1 &p2 &p3)) 
    JOB(MyJob) HOLD(*YES) JOBQ(QBATCH) LOG(4 0 *SECLVL) LOGCLPGM(*YES)
    HLDJOBQ(QBATCH) and RLSJOBQ(QBATCH) will allow you to "catch" the job before it is releaseed if you don't use the HOLD(*YES) option.

    GC
    Greg Craill: "Life's hard - Get a helmet !!"

    Comment


    • #3
      Re: Sbmjob

      There is 1 main aspect to be considered while coverting an interative job to submit job, the scope of the OVRDBF and OPNQRY.

      Also if the job is submitted properly do a WRKUSRJOB and and check the joblog as to what has happened in the job. This should give you an idea of what exactly is heppening in the submitted job.
      Last edited by ReachKrishna; April 14, 2008, 03:37 AM.
      Regards,
      KR

      Comment


      • #4
        Re: Sbmjob

        Originally posted by gcraill View Post
        Try an extra ")" on the end.
        Code:
        SBMJOB CMD(CALL PGM(mypgm) PARM(&p1 &p2 &p3))
        But if that obvious one was not the case then try WRKSBMJOB *JOB to see if the job was submitted on hold and is waiting to be released ?

        Or Try specifying the JOBQ etc.
        Code:
        SBMJOB CMD(CALL PGM(mypgm) PARM(&p1 &p2 &p3)) 
        JOB(MyJob) HOLD(*YES) JOBQ(QBATCH) LOG(4 0 *SECLVL) LOGCLPGM(*YES)
        HLDJOBQ(QBATCH) and RLSJOBQ(QBATCH) will allow you to "catch" the job before it is releaseed if you don't use the HOLD(*YES) option.

        GC




        Hi Gcraill,
        thanks for ur reply..
        but when i tried givin HOLD(*YES) JOBQ(QBATCH).... and see the status in WRKSBMJOB ..it was in held state.
        As i was not familiar with Batch jobs,im not able to poiny out the problem?

        Comment


        • #5
          Re: Sbmjob

          Originally posted by Nancy View Post
          Hi Gcraill,
          thanks for ur reply..
          but when i tried givin HOLD(*YES) JOBQ(QBATCH).... and see the status in WRKSBMJOB ..it was in held state.
          As i was not familiar with Batch jobs,im not able to poiny out the problem?
          Ok so if the job is in batch and held status, option 6 will release it. The the log options of LOG(4 0 *SECLVL) LOGCLPGM(*YES) will give you the most detailed joblog options, and hopefully in the joblog there will be a message saying why the job is not working.

          GC
          Greg Craill: "Life's hard - Get a helmet !!"

          Comment


          • #6
            Re: Sbmjob

            Originally posted by gcraill View Post
            Ok so if the job is in batch and held status, option 6 will release it. The the log options of LOG(4 0 *SECLVL) LOGCLPGM(*YES) will give you the most detailed joblog options, and hopefully in the joblog there will be a message saying why the job is not working.

            GC
            Thanks,,

            Wil work with that....

            Comment

            Working...
            X