R PMASTER
A CUSTID 8 COLHDG(‘Customer’ ‘ID’)
A NAME 40 COLHDG(‘Customer’ ‘Name’)
A EMAIL 40 COLHDG(‘E-mail Address’)
A BEGBAL 13 2 COLHDG(‘Account’ ‘Balance’)
A K CUSTID
FIGURE 3
Fichier de transactions client (Customer)
A R PTRANS
A CUSTID 8 COLHDG(‘Customer’ ‘ID’)
A TRANDATE L COLHDG(‘TRANSACTION’ ‘DATE’)
A TRANDESC 40 COLHDG(‘DESCRIPTION’)
A TRANAMOUNT 13 2 COLHDG(‘AMOUNT’)
A K CUSTID
A K TRANDATEFIGURE 4
Programme ARCSNDEMAL/* Program ARCSNDEMAL */ /* */ /* Program receives as input a customer ID, beginning date, and */ /* ending date. Then calls ARREMAIL, which will format a file in */ /* HTML code containing the monthly A/R statement for the customer. */ /* If the customer ID is invalid, an error message will be returned. */ /* Otherwise, the document created is sent as an e-mail */ /* attachment to the customer. */ PGM PARM(&CUSTID &DATBEG &DATEND &ERRMSG) DCL VAR(&DATEND) TYPE(*CHAR) LEN(10) DCL VAR(&DATBEG) TYPE(*CHAR) LEN(10) DCL VAR(&CUSTID) TYPE(*CHAR) LEN(8) DCL VAR(&ERRMSG) TYPE(*CHAR) LEN(20) DCL VAR(&EMAIL) TYPE(*CHAR) LEN(40) DCL VAR(&ATC) TYPE(*CHAR) LEN(40) CLRPFM HTMLDATA CALL PGM(ARREMAIL) PARM(&CUSTID &DATBEG &DATEND + &ERRMSG &EMAIL) IF COND(&ERRMSG = ' ') THEN(DO) CHGVAR VAR(&ATC) VALUE('/QDLS/AREMAIL/' *CAT &CUSTID) /* Copy the formatted file to QDLS file system */ CPYTOPCD FROMFILE(HTMLDATA) TOFLR(AREMAIL) + TODOC(&CUSTID) REPLACE(*YES) CCCSNDMAIL RECIPADDR(&EMAIL) + SENDERADDR(ARCLERK@MYCOMPANY.COM) + SENDERNAME('A/R CLERK') ATTACHMENT(&ATC) + SUBJECT('A/R MONTHLY STATEMENT') + MESSAGE('This email contains an attached + file with your monthly statement.') ENDDO ENDPGMFIGURE 5
Commande CCCSNDMAIL/****************************************************************/ /* To create this command, issue the following: */ /* CRTCMD lib/CCCSNDMAIL SRCFILE(srclib/srcfile) PGM(lib/CCRSNDMAIL) */ /* NEWS/400, September 1998 */ /* Copyright (c) 1998 Duke Communications International */ /* ALL RIGHTS RESERVED */ /****************************************************************/ CMD PROMPT('Send an E-mail Message') PARM KWD(FILENAME) TYPE(*PNAME) LEN(256) + RTNVAL (*NO) DFT('/tmp/mimehdr.txt') + MIN(0) EXPR(*YES) PROMPT('MIME header + file name' 1) PARM KWD(RECIPADDR) TYPE(*PNAME) LEN(256) MIN(1) + EXPR(*YES) PROMPT('E-mail address of + recipient' 2) PARM KWD(SENDERADDR) TYPE(*PNAME) LEN(256) MIN(1) + EXPR(*YES) PROMPT('E-mail address of + sender' 4) PARM KWD(RECIPNAME) TYPE(*CHAR) LEN(256) + DFT(*NONE) SPCVAL((*NONE '')) EXPR(*YES) + PROMPT('Name of e-mail recipient' 3) PARM KWD(SENDERNAME) TYPE(*CHAR) LEN(256) + DFT(*NONE) SPCVAL((*NONE '')) EXPR(*YES) + PROMPT('Name of e-mail sender' 5) PARM KWD(ATTACHMENT) TYPE(*PNAME) LEN(256) + DFT(*NONE) SNGVAL((*NONE)) MAX(30) + EXPR(*YES) PROMPT('File attachment') PARM KWD(SUBJECT) TYPE(*CHAR) LEN(256) DFT(*NONE) + SPCVAL((*NONE '')) EXPR(*YES) + PROMPT('Subject') PARM KWD(MESSAGE) TYPE(*CHAR) LEN(32767) + DFT(*NONE) SPCVAL((*NONE '')) EXPR(*YES) + PROMPT('Message') PARM KWD(MIMETYPE) TYPE(*CHAR) LEN(5) + DFT('plain') SPCVAL((*NONE '')) EXPR(*NO) + PROMPT('Mime-type')
Cloud souverain, intelligence artificielle, cybersécurité, gouvernance des données, outils collaboratifs… Face aux enjeux de maîtrise technologique et de résilience numérique, l’open source s’impose comme un levier stratégique pour les organisations.
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…