Code pour envoyer des fichiers spoule
/* This example sends a spool file to an AS/400 called REMOTE */
/* and an output queue called REMOTEQ.
*/
PGM PARM(&SPOOL +
&JOB +
&JUSER +
&JNUMBER +
&NUMBER)
DCL VAR(&SPOOL) TYPE(*CHAR) LEN(10)
DCL VAR(&JOB) TYPE(*CHAR) LEN(10)
DCL VAR(&JUSER) TYPE(*CHAR) LEN(10)
DCL
VAR(&JNUMBER) TYPE(*CHAR) LEN(6)
DCL VAR(&NUMBER) TYPE(*DEC) LEN(5 0)
/* LPR
*/
/*
*/
/* Note that I have hard-coded a remote system and
*/
/* the output queue name. The parameter RMTSYS should reflect */
/* the host table entry name in CFGTCP. The output queue */
/* should exist on the remote system.
*/
/*
*/
/* If you were to use SNADS instead, the SNDNETSPLF command */
/* would replace the SNDTCPSPLF statement below.
*/
SNDTCPSPLF RMTSYS(REMOTE) PRTQ(REMOTEQ)
+
FILE(&SPOOL) JOB(&JNUMBER/&JUSER/&JOB)
SPLNBR(&SPOOL) DESTTYP(*AS400)
+
TRANSFORM(*NO)
/* Monitor for Send errors
*/
MONMSG MSGID(TCP3701 TCP3702 TCP3703 TCP3704 +
TCP3705 TCP3706) EXEC(SNDMSG MSG(‘Spool
+
Distribution failed’) TOUSR(*SYSOPR))
ENDPGM
Téléchargez cette ressource
SIEM & PME : Comment construire la boîte noire de votre SI ?
Passez à la cybersécurité proactive, transformez la collecte et l’analyse des logs en un bouclier dynamique contre les cybermenaces. Découvrez comment mettre en place une approche SIEM modulaire, évolutive et accessible, pour anticiper, détecter et réagir efficacement aux attaques.