Is Mimix running from within our RPG/CL program?

15 pts.
Tags:
CL Program
MIMIX
RPG
How can I know that Mimix is running from within my RPG/CL program. I have written a monitor for Mimix, and I need to be able to know when Mimix is not running so I can stop the monitor. Our operations team cannot use the Portal, politics.
0

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.

Discuss This Question: 5  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.
  • bvining
    Can you define "running"? I'm not sure if you're asking is MIMIX installed, is MIMIX configured, is the MIMIX subsystem up and active,...

    As you indicate you are "monitoring" MIMIX you must have something specific in mind.

    Bruce
    7,070 pointsBadges:
    report
  • ToddN2000
    Have you looked at using the job scheduler to start and end MIMIX?
    Some time this may be the easier route to go. Other possibilities is when you start the job set a flag in a data area, when job is ended you reset the flag. We use this method when running multiple EDI sessions.
    134,780 pointsBadges:
    report
  • JonChilds
    Thanks for the suggestions. My issue is that I have a program that runs once per hour that calls the WRKDG command to an outfile. I then read thru the file looking for errors as defined by a set of rules that the users have defined. My problem is that if the mimix subsystem is down or the subsystem is up but mimix is not running, my program creates thousands of job logs because WRKDG failes.As long as Mimix is not running each hour another of my monitor program starts and creates more job logs. The operators see that the number of jobs in the jobs table gets close to the max. number of jobs allowed.
    So I need to be able to check to make sure that Mimix is running, the subsystem is up, communications is ok, etc before i submit a run of my monitor program.
    How do I know that Mimix is ok so I can run the monitor.
    15 pointsBadges:
    report
  • ToddN2000
    You could try something like this. Create a flat file for holding a spoolfile.  CRTPF FILE(MYLIB/PRINT132) RCDLEN(132).

    Then use this to check if it's running. If so do your logic if not end job.
                 PGM                                                 
                 DCLF       FILE(MYLIB/PRINT132)                     
                                                                     
                 WRKACTJOB  OUTPUT(*PRINT) SBS(SBSNAME) JOB(JOBNAME) 
                 CPYSPLF    FILE(QDSPAJB) TOFILE(MYLIB/PRINT132)     
                                                                     
    LOOP:        RCVF                                                
                 MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL(DONE))   
                                                                     
    /* LOOK FOR MIMIX JOBANAME */                                    
                 IF         COND(%SST(&PRINT132 4 13) *EQ 'MIMIX') + 
                              THEN(GOTO CMDLBL(RUNNING))             
                 ENDDO                                               
                                                                     
                 GOTO       CMDLBL(LOOP)                             
                                                                     
    /* MIMIX RUNNING LOGIC HERE */                                   
    RUNNING:                  
                                          
    /* MIMIX NOT RUNNING / END OF JOB */  
    DONE:        ENDPGM                   

    134,780 pointsBadges:
    report
  • pdraebel
    Maybe you could change your "monitor" program logic. I have seen in MIMIX the use of the command OPNMMXLST. This allows for opening a list of definitions from MiMiX.
     OPNMMXLST  TYPE(*DGDFN) LISTID(&LISTID)
    List info is retrieved by a RTVDGDFN to retrieve the DG definitions.
    Next with the DGName known use other MIMIX RTV* commands like RTVDGSTS and RTVAPYSTS to get the info you need.
    7,545 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.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: