× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Trigger program input buffer layout
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Fri, 07 Jan 2000 14:20:15 -0800
  • Organization: Conex Global Logistics Services, Inc.

I'm writing my first trigger program and am basing it on
the sample from the Infoseeker Bookshelf for V3R7M0.

When this program runs, I am expecting the file I am opening,
APUNIONBNK, to contain a new record that is an exact
copy of the record added to my file.  But it is blank.  Here is the
code it it's entirety.

Also, the example shows the data structure being set up with the
OldRecordBuffer, OldRecordMap, NewRecordBuffer and
NewRecordMaps laid out.  This is somewhat difficult to do.
Mostly, because I don't know the size of the Null Byte Map
before hand.  What I wound up doing in this case was setting
their size to the same as in the example (something like 4 bytes)
and running it, and getting an error on my SubSt because the
pointer was running off into la-la land.  So I ran it in Debug,
and displayed the value of the Null Byte Map Size, then went
into the program and changed the DDS to reflect this.

This seems an awfully cumbersome way to do it though, is there
a better way?

     FAPUNIONBNKUF A F  150        DISK

     D Parm1           DS
     D  FileName               1     10
     D  LibName               11     20
     D  MemName               21     30
     D  TrigEvent             31     31
     D  TrigTime              32     32
     D  CommLockLvl           33     33
     D  Reserved01            34     36
     D  CCSID                 37     40B 0
     D  Reserved02            41     48
     D  OldOffset             49     52B 0
     D  OldLength             53     56B 0
     D  OldByteMapOff         57     60B 0
     D  OldByteMapLen         61     64B 0
     D  NewOffset             65     68B 0
     D  NewLength             69     72B 0
     D  NewByteMapOff         73     76B 0
     D  NewByteMapLen         77     80B 0
     D  Reserved03            81     96
     D*********
     D  OldRecord             97    246
     D  OldByteMap           247    276
     D  NewRecord            277    426
     D  NewByteMap           427    556
     D*********
     D
     D Parm2           DS
     D  Length                 1      4B 0
     D
     D NewBuffer       DS           150
     D
     D Offset          S              5  0

     IAPUNIONBNKNS
     I                                  1  150  NewRecord

     C     *Entry        PList
     C     Parm1         Parm                    Parm1
     C     Parm2         Parm                    Parm2
     C
     C                   Eval      Offset = NewOffset + 1
     C
     C                   Eval      NewRecord = %SubSt(Parm1:Offset:150)
     C                   Write     APUnionBnk    NewBuffer
     C                   Eval      *INLR = *ON

Thanks in advance,

Regards,

Jim Langston


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.