DocManager Automation

Sign on as QSECOFR

First duplicate the SPYGLSMON job description to a new job description in QGPL.

CALL QCMD

CRTDUPOBJ OBJ(SPYGLSARC) FROMLIB(DOCMGRDTA) OBJTYPE(*JOBD) TOLIB(QUSRSYS) NEWOBJ(SPYJOBD)

Now add the Spy libraries to this JOBD’s initial library list.

CHGJOBD JOBD(QUSRSYS/SPYJOBD) JOBQ(QGPL/QINTER) INLLIBL(QTEMP QGPL DOCMGROBJ DOCMGRDTA)

Now add OS/400 scheduled jobs to be run under the profile QSECOFR in QBATCH using the new JOBD every day at set times.

Start the monitor:

ADDJOBSCDE JOB(SPYMONSTR) CMD(DOCMGROBJ/STRMON STRMON(IMMED) POLLS(NOMAX) SPLCDT(CRTDT) SPLCTM(CRTTM)) FRQ(WEEKLY) SCDDATE(NONE) SCDDAY(ALL) SCDTIME(’06:00:00′) JOBD(QUSRSYS/SPYJOBD) JOBQ(JOBD) USER(QSECOFR) MSGQ(QSYS/QSYSOPR) TEXT(‘AUTOSTART MONITOR’)

Stop the monitor:

ADDJOBSCDE JOB(SPYENDMON) CMD(DOCMGROBJ/ENDMON) FRQ(WEEKLY) SCDDATE(NONE) SCDDAY(*ALL) SCDTIME(’23:00:00′) JOBD(QUSRSYS/SPYJOBD) USER(QSECOFR) MSGQ(QSYS/QSYSOPR) TEXT (‘Auto Stop DOCMGROBJ Monitor’)

Start the TCP/IP Listener:

ADDJOBSCDE JOB(SPYLISSTR) CMD(DOCMGROBJ/STRLIS LISTENER(DOCVIEW)) FRQ(WEEKLY) SCDDATE(NONE) SCDDAY(ALL) SCDTIME(’06:00:00′) JOBD(QUSRSYS/SPYJOBD) JOBQ (*JOBD) USER(QSECOFR)

Stop the TCP/IP Listener:

ADDJOBSCDE JOB(SPYENDTCP) CMD(DOCMGROBJ/ENDLIS) FRQ(WEEKLY) SCDDATE(NONE) SCDDAY(*ALL) SCDTIME(’23:00:00′) JOBD(QUSRSYS/SPYJOBD) USER(QSECOFR) MSGQ(QSYS/QSYSOPR) TEXT (‘Auto Stop DOCMGROBJ TCPIP Listener’)

To view or edit the scheduled job, use WRKJOBSCDE

Note: Start / Stop times that are specified above are examples only. Please ensure you set times to avoid any conflict with your normal back-up i.e. monitor/listener should be stopped before back-up and not re-started until the back-up has finished.