Fix damaged journals

Brad Betsworth -- fix damaged journals

  
/***********************************************************************/
/*                                                                     */
/* FIX MQ SERIES JOURNAL SYNCHRONIZATION                               */
/*                                                                     */
/***********************************************************************/
             PGM        PARM(&MQMNAME)
/*                                                                     */
             DCL        VAR(&MQMNAME)  TYPE(*CHAR) LEN(10)
             DCL        VAR(&MQMLIB)   TYPE(*CHAR) LEN(10)
             DCL        VAR(&CURCHK)   TYPE(*CHAR) LEN(60)
             DCL        VAR(&OLDCHK)   TYPE(*CHAR) LEN(60)

             /* End MQ Manager                                    */
             /*****************************************************/
             ENDMQM     MQMNAME(&MQMNAME) OPTION(*IMMED)
             MONMSG     MSGID(CPF0000)
             DLYJOB     DLY(21)

             ENDSBS     SBS(QMQM) OPTION(*CNTRLD)
             MONMSG     MSGID(CPF0000)
             DLYJOB     DLY(22)

             ENDSBS     SBS(QMQM) OPTION(*IMMED)
             MONMSG     MSGID(CPF0000)
             DLYJOB     DLY(23)

             /* Rename the MQM Checkpoint file                    */
             /*****************************************************/
             chgvar var(&oldchk) +
                    value('/QIBM/UserData/mqm/qmgrs/' +
                          *TCAT &MQMNAME *TCAT '/QMQMCHKPTX')
             chgvar var(&curchk) +
                    value('/QIBM/UserData/mqm/qmgrs/' +
                          *TCAT &MQMNAME *TCAT '/QMQMCHKPT')

             RMVLNK     OBJLNK(&OLDCHK)
             MONMSG     MSGID(CPF0000)

             RNM        OBJ(&CURCHK) NEWOBJ('QMQMCHKPTX')
             MONMSG     MSGID(CPF0000)

             /* Clear and delete the existing journals            */
             /*****************************************************/
             CHGVAR     VAR(&MQMLIB) VALUE('QM' *TCAT &MQMNAME)
             DLTJRN     JRN(&MQMLIB/AMQAJRN)
             MONMSG     MSGID(CPF0000)

             DLTJRNRCV  JRNRCV(&MQMLIB/AMQA*) DLTOPT(*IGNINQMSG)
             MONMSG     MSGID(CPF0000)

             /* Create new journals, and set authority            */
             /*****************************************************/
             CRTJRNRCV  JRNRCV(&MQMLIB/AMQA100000) THRESHOLD(16384)
             MONMSG     MSGID(CPF0000)

             CHGOBJOWN  OBJ(&MQMLIB/AMQA100000) OBJTYPE(*JRNRCV) +
                          NEWOWN(QMQM)
             MONMSG     MSGID(CPF0000)

             CRTJRN     JRN(&MQMLIB/AMQAJRN) +
                          JRNRCV(&MQMLIB/AMQA100000) +
                          MSGQ(&MQMLIB/AMQAJRNMSG) MNGRCV(*SYSTEM)
             MONMSG     MSGID(CPF0000)

             CHGOBJOWN  OBJ(&MQMLIB/AMQAJRN) OBJTYPE(*JRN) +
                          NEWOWN(QMQM)
             MONMSG     MSGID(CPF0000)


             /* Restart MQ Series                                 */
             /*****************************************************/
             STRSBS     SBSD(QMQM/QMQM)
             MONMSG     MSGID(CPF0000)

             STRMQM     MQMNAME(&MQMNAME)
             MONMSG     MSGID(CPF0000)

 END:        ENDPGM





/********************************************************************/
/*                                                                  */
/* PROGRAM NAME:      FIXMQ (CMD)                                   */
/*                                                                  */
/* RESET MQSERIES 5.1 DAMAGED OR CORRUPTED JOURNALS                 */
/********************************************************************/
             CMD        PROMPT('RESET MQSERIES JOURNALS')
/* */
             PARM       KWD(MQMNAME) TYPE(*CHAR) LEN(10) MIN(1) +
                          PROMPT('MQM MANAGER TO RESET  ')

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close