Generic evoke request (ability to call batch program on remote system) via SNA
CLP Source
$$EVOKETCL: PGM
OVRICFF FILE(QICDMF) ACQPGMDEV(QSNADS)
OVRICFDEVE PGMDEV(QSNADS) RMTLOCNAME(SNIC03ND)
CALL PGM($$EVOKET) PARM('PROGRAM' 'PSWD' +
'USER' 'LIBRARY')
ENDPGM
RPG Source
FQICDMF O F 80 WORKSTN
C *ENTRY PLIST
C PARM $PGM 8
C PARM $PSWD 8
C PARM $USER 8
C PARM $LIB 8
C EXCPTEVOKE
C MOVE '1' *INLR
OQICDMF E EVOKE
O K8 '$$EVOKET'
O $PGM 8
O $PSWD 16
O $USER 24
O $LIB 32
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.
2/27/08 How to call batch program on remote system.
2/28/08 Replicating the active OS/400 History Log
If you use a high availability solution and you need to do an emergency switchover, the active history log that is contained in system storage (accessed via DSPLOG) can be replicated to a backup system in order for the history log to be reviewed during an unplanned switch. Using the following CL code*, you can actively poll this storage and store it in an OS/400 DB2 table.
DMPLOG: PGM
DCL VAR(&QTIME) TYPE(*CHAR) LEN(6)
DCL VAR(&QDATE) TYPE(*CHAR) LEN(6)
DCL VAR(&STIME) TYPE(*CHAR) LEN(6)
DCL VAR(&SDATE) TYPE(*CHAR) LEN(6)
CRTPF FILE(QTEMPDB/QHSTLOG) RCDLEN(220)
OVRDBF FILE(QPDSPLOG) TOFILE(QTEMPDB/QHSTLOG) +
LVLCHK(*NO)
DSPLOG OUTPUT(*PRINT)
RTVSYSVAL SYSVAL(QDATE) RTNVAR(&SDATE)
RTVSYSVAL SYSVAL(QTIME) RTNVAR(&STIME)
LOOP: DLYJOB DLY(15)
RTVSYSVAL SYSVAL(QDATE) RTNVAR(&QDATE)
RTVSYSVAL SYSVAL(QTIME) RTNVAR(&QTIME)
DSPLOG PERIOD((&STIME &SDATE) (&QTIME &QDATE)) OUTPUT(*PRINT)
MONMSG MSGID(CPF2447)
CHGVAR VAR(&SDATE) VALUE(&QDATE)
CHGVAR VAR(&STIME) VALUE(&QTIME)
GOTO CMDLBL(LOOP)
ENDPGM
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.
2/29/08 Clear false lock on OS/400 Printer Devices.
Occasionally, OS/400 Printer device (AFP capable) will have an "orphaned" lock left on the printer device by an abnormally ended writer job, which prevents successful start of the associated print writer. Key the following on an OS/400 command line to clear the lock:
CALL QSPENDWA PARM('printer device name')
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.