ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Monitoring a job queue and process

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

  • Monitoring a job queue and process

    Has anyone run into this issue. You receive a file from another system and that file kicks off your end of day process. Here is the problem. How do I monitor when that process starts and if it doesn't start until 9:00 then a text message would go out to my pager.

    Any suggestions?

    Thanks,

    DAC

  • #2
    Re: Monitoring a job queue and process

    Have the EOD process set a flag in a file to say that it was started. When the job ends have it set the end of job flag.

    Have a job that wakes up at the time you want and look at this file and see if the flag was set, if not send email.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Monitoring a job queue and process

      I can send emails with SNDDST, but how do I send pager messages or SMS from the 400 ?

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

      Comment


      • #4
        Re: Monitoring a job queue and process

        I don't know if the 400 can do it itself. We use 3rd party software to send our SMS. Ours is called MPS but its like 10 years old and is kinda buggy at times.
        Your future President
        Bryce

        ---------------------------------------------
        http://www.bravobryce.com

        Comment


        • #5
          Re: Monitoring a job queue and process

          this is from search 400

          I recently read a tip regarding using the iSeries modem to send messages to your pager. If your pager or cell phone has an e-mail address for text messages, and your iSeries is configured for SMTP, a simpler method is to send the messages using the SNDDST command.

          SNDDST TYPE(*LMSG) TOINTNET(&ADDR) DSTD(&SUBJ) LONGMSG(&MSG)

          Where:
          &ADDR is the email address of your pager or cell phone (such as 7145551234@mobile.att.net)
          &SUBJ is any subject text
          &MSG is the message text

          plus i know there is a freeware tool out there I downloaded it once but
          have no idea where I put it

          here is more:

          There are situations when you are running an unattended job on your iSeries and would like to be informed
          in case of a problem. A lot of expensive products are available in the market that can alert you by sending a
          message to your pager. Here is a technical solution that will cost nothing, and still your iSeries can call a pager
          in case of a problem. It is assumed that IBM ECS link is installed at your site and you have a modem connected.

          The paging software uses three CL programs: PAGER, PAGON and PAGOFF. PAGER is the main program. It first
          submits the program PAGON to vary on the configuration objects. Then it allocates the device description PAGDEV.
          Display file QDSIGNON is overridden to the device. Then the program sends the file that dials out the pager number
          specified in the controller description and subsequently enters the predefined code digits. At the end, the device is
          de-allocated and program MSGOFF is called to reset the configuration objects. This is a very simple CL program.
          It can be called in your programs by monitoring those error messages where you want to page someone.

          In order to implement this utility, create the following configuration objects and CL programs:

          PHP Code:

          CRTLINSDLC  LIND
          (PAGLIN)  RSRCNAME(LIN011)  CNN(*SWTPP)  +
          AUTODIAL(*YES)  DIALCMD(*V25BIS)  +
          STNADR(01)  TEXT('PAGER LINE')

          CRTCTLRWS   CTLD(PAGCTL)  TYPE(5394MODEL(1)  +
          LINKTYPE(*SDLCONLINE(*NO)  +
          SWITCHED(*YESSWTLINLST(PAGLIB)  +
          EXCHID(05F00004CNNNBR('SST9:nnnnnnn===9999')  +
          STNADR(04)  TEXT('PAGER  CONTROLLER'
          In the above command, "nnnnnnn" is the pager number; "===" is three seconds delay before keying in
          pager message that could be adjusted according to different pager requirements; and "9999" is the
          predefined message code that will appear on your pager. Pager number and message code can be
          changed in your CL program using CHGCTLD command to send different message codes to various
          pager holders. If your modem does not support the CNNNBR string, you should check the modem user
          guide for more details. If you want to call a cellular phone, you just have to enter the phone number
          in this parameter.

          PHP Code:
          CRTDEVDSP   DEVD(PAGDEV)  DEVCLS(*RMT)  TYPE(5291)  +
          MODEL(1)  LOCADR(01)  ONLINE(*YES)  +
          CTL(PAGCTL)  DROP(*NO)  TEXT('PAGER DEVICE'
          PROGRAM PAGON:
          PHP Code:
          PGM
          VRYCFG     CFGOBJ
          (PAGCTLCFGTYPE(*CTLSTATUS(*OFF)
          MONMSG     MSGID(CPF0000)
          VRYCFG     CFGOBJ(PAGLINCFGTYPE(*LINSTATUS(*OFF)
          MONMSG     MSGID(CPF0000)
          RYCFG     CFGOBJ(QESLINECFGTYPE(*LINSTATUS(*OFF)
          MONMSG     MSGID(CPF0000)
          VRYCFG     CFGOBJ(PAGLINCFGTYPE(*CTLSTATUS(*ON)
          MONMSG     MSGID(CPF0000)
          VRYCFG     CFGOBJ(PAGCTLCFGTYPE(*LINSTATUS(*ON)
          MONMSG     MSGID(CPF0000)
          ENDPGM 
          PROGRAM PAGOFF:

          PHP Code:
          PGM
          VRYCFG     CFGOBJ
          (PAGCTLCFGTYPE(*CTLSTATUS(*OFF)
          MONMSG     MSGID(CPF0000)
          VRYCFG     CFGOBJ(PAGLINCFGTYPE(*LINSTATUS(*OFF)
          MONMSG     MSGID(CPF0000)
          VRYCFG     CFGOBJ(QESLINECFGTYPE(*LINSTATUS(*ON)
          MONMSG     MSGID(CPF0000)
          ENDPGM 
          PROGRAM PAGER:

          PHP Code:
          PGM
          DCLF       FILE
          (QSYS/QDSIGNON)
          SBMJOB     CMD(CALL PGM(PAGON)) JOB(PAGONJOBQ(QINTER)
          DLYJOB     DLY(30)
          ALCOBJ     OBJ((PAGDEV *DEVD *EXCLRD)) WAIT(10)
          OVRDSPF    FILE(QDSIGNONDEV(PAGDEV)
          SNDF
          MONMSG     MSGID
          (CPF4128)
          DLCOBJ     OBJ((PAGDEV *DEVD *EXCLRD))
          CALL       PGM(PAGOFF)
          ENDPGM 
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment

          Working...
          X