0% found this document useful (0 votes)
107 views

Trigger Buffer Program

This document defines data structures and variables used in a trigger buffer program to read data from a file and send it to a data queue. It maps the trigger buffer into data structures, looks up a key in a file using chain, sends the data to a queue if the key is found, and closes the file.

Uploaded by

senthilj82
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Trigger Buffer Program

This document defines data structures and variables used in a trigger buffer program to read data from a file and send it to a data queue. It maps the trigger buffer into data structures, looks up a key in a file using chain, sends the data to a queue if the key is found, and closes the file.

Uploaded by

senthilj82
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Trigger Buffer Program FRCMBRR01 IF E K DISK //Data Structure Definitions DTrgInfo DS D TFileName 10 D TLibName 10 D TMemName 10 D TEvent 1 D TTime 1 D TCommitLock

1 D TFiller1 3 D TCCSID 10I D TRelRecNbr 10I D TFiller2 10I D Befrecoffset 10I D Befreclen 10I D Befnulloffset 10I D Befnulllen 10I D Aftrecoffset 10I D Aftreclen 10I D Aftnulloffset 10I D Aftnulllen 10I DRCMBRPnew D E DS

rename(RCMBRR01:MBRGCHK) USROPN

0 0 0 0 0 0 0 0 0 0 0 extname(RCMBRP) Based(Aftrecptr) Dtaara(RxFunction)

DSystemInfo Ds DSystem Ddataval ds D MemID1 D CarrID1 D AcctID1 D GrpID1 D* D SndDataQue1 PR D DataQueueName D LibraryName D LengthOfData D DataReceived D LngthOfKeyDta D ValueOfKey D* * Data Queue variables d queue S d lib S

8 1 19 28 43 18 27 42 57 Extpgm('QSNDDTAQ') 10A Const 10A Const 5 0 Const 256 options(*varsize) Const 3 0 Const 256 options(*varsize) Const

10 10

inz('FSADTAQ') inz('CUSTLIB')

d len d key d keyln d wait D* D Aftrecptr DRecArray DX DMBRMTCH D Main D Trgbuffer D Trgbufferlen D Main D Trgbuffer D Trgbufferlen

S S S S S S S S PR

5 30 3 5

0 inz(57) 0 0 inz(0)

* 1 DIM(2000) 5 0 inz 1 inz EXTPGM('RX46371C5') LIKEDS(Trginfo) 10I 0

PI LIKEDS(Trginfo) 10I 0

C********************************************************************* * C MBRKEY KLIST C KFLD ABABCD C KFLD ABAACD C KFLD ABACCD C KFLD ABADCD C* /Free //Map trigger buffer into data structures Aftrecptr = %ADDR(Trgbuffer) + Trgbuffer.Aftrecoffset; If Trgbuffer.TEvent = '1'; If not %open(RCMBRR01); Open RCMBRR01; EndIf; chain Mbrkey RCMBRR01; if %found(RCMBRR01); clear dataval; MemID1 = ABABCD; CarrID1 = ABAACD; AcctID1 = ABACCD; GrpID1 = ABADCD; callp SndDataQue1(queue: lib: len: dataval: keyln: key) ; Endif; Endif; If %open(RCMBRR01);

Close RCMBRR01; EndIf; Eval *inlr = *on; /End-Free

You might also like