*=============================================================== * MIT License * Copyright (c) 2016 TEMBO Technology Labs (Pty) Ltd. * Author: Tommy Atkins - Chief Development Officer * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies * or substantial portions of the Software. * ================================================================================== * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. *=============================================================== h dftactgrp(*no) actgrp(*caller) usrprf(*owner) aut(*use) h bnddir('SERVICES') option(*nodebugio) debug *=============================================================== fAOFCC3F o e disk usropn infds(SDS) *=============================================================== d AOFCC3F_A0 pr d P likeds(P1) options(*varsize) d PL 10i 0 const *=============================================================== d AOFCC3F_A0 pi d P likeds(P1) options(*varsize) d PL 10i 0 const *=============================================================== d PP s * *=============================================================== d P1 ds template d PFName 1 10 d LibName 11 20 d MbrName 21 30 d Event 31 31 d Time 32 32 d CmtLock 33 33 d Resvd1 34 36 d CCSID 37 40b 0 d RRN 41 44b 0 d Resvd2 45 48 d OldOS 49 52b 0 d OldLen 53 56b 0 d OldNMOS 57 60b 0 d OldNMLen 61 64b 0 d NewOS 65 68b 0 d NewLen 69 72b 0 d NewNMOS 73 76b 0 d NewNMLen 77 80b 0 d Resvd3 81 96 *=============================================================== d OP s * d O ds 4096 based(OP) D NP s * d N ds 4096 based(NP) *=============================================================== d ERH03 pr d MT 1 const options(*nopass) *=============================================================== d SDS ds d MsgId 46 52 *=============================================================== d User s 10 inz(*USER) *=============================================================== /free monitor; //================================================ PP = %addr(P); //================================================ if not %open(AOFCC3F); open AOFCC3F; endif; //================================================ NP = PP + P.NewOS; OP = PP + P.OldOS; //================================================ ACTDTS = %timestamp; RECSTS = *blanks; FILENM = P.PFName; ACTION = P.Event; USERID = User; //================================================ select; when P.Event='1'; // Insert clear BEFORE; AFTER = N; %len(AFTER) = P.NewLen; when P.Event='2'; // Delete BEFORE = O; %len(BEFORE) = P.OldLen; clear AFTER; when P.Event='3'; // Update BEFORE = O; %len(BEFORE) = P.OldLen; AFTER = N; %len(AFTER) = P.NewLen; endsl; //================================================ monitor; write AOFCC3FR; on-error; dow MsgID = 'CPF5026'; // Duplicate // clear MsgID; ACTDTS = %timestamp; monitor; write AOFCC3FR; on-error; endmon; enddo; endmon; //================================================ on-error; ERH03(); endmon; //=================================================== return; //=================================================== /end-free *===============================================================