× 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.



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
I use this for a program named MPGCSPCM which is the trigger on file CSPCM
and it works:

D MPGCSPCM        PR
D  BfrRcd                    32767    Options(*VarSize)
D  BufferLength                 10i 0

D MPGCSPCM        PI
D  BfrRcd                    32767    Options(*VarSize)
D  BufferLength                 10i 0

.............

D BfrDS           DS
D  FileName                     10
D  Library                      10
D  MbrName                      10
D  TrigEvent                     1
D  TrigTime                      1
D  CmtLckLvl                     1
D                                3
D  CCSID                        10i 0
D                                8
D  BfrOffset                    10i 0
D  BfrLength                    10i 0
D  BfrNullOff                   10i 0
D  BfrNullMap                   10i 0
D  AftOffset                    10i 0
D  AftLength                    10i 0
D  AftNullOff                   10i 0
D  AftNullMap                   10i 0
D                               16
D  BufferChr                 32767    Overlay(BfrDS)
D   BufferAry                    1    Overlay(BufferChr)
D                                     Dim(%size(BufferChr))

............

D bfr_CSPCM     E DS                  ExtName(CSPCM) Prefix(bfr_)
D                                     Based(BfrPtr)

D aft_CSPCM     E DS                  ExtName(CSPCM) Prefix(aft_)
D                                     Based(AftPtr)
............

D BufferSize      c                   Const(%size(BufferChr))
D BufferLen       s             10i 0
D BfrPtr          s               *
D AftPtr          s               *

............

C                   Eval      Bfrds = %subst(BfrRcd:1:BufferLength)
C                   Eval      BfrPtr = %addr(BufferAry(BfrOffset + 1))
C                   Eval      AftPtr = %addr(BufferAry(AftOffset + 1))



-----Original Message-----
From: Smith, Nelson [mailto:NSmith@lincare.com]
Sent: Tuesday, February 19, 2002 2:32 PM
To: rpg400-l@midrange.com
Subject: Trigger parameter prototypes


I'm having trouble converting my trigger programs over to using prototypes
rather than a PLIST.

How do you specify the first parameter for a trigger in a prototype?  If I
use an asterisk for a pointer,  how do I define the datastructure to start
at that pointer location?   Since the second parameter gives us the size of
the first parameter, can that be used to declare the size of the first
parameter?

Given D-specs of:

D Buffer        DS
D BufferLength  S                       10I 0


a PLIST of:

C       *ENTRY  PLIST
C                       PARM            Buffer
C                       PARM            BufferLength

works just fine, but a prototype and interface of:

D TriggerPgm            PR              EXTPGM('MyTrig')
D                                  *    CONST
D                               10I O   CONST

D TriggerPgm            PI
D  Buffer                          *    CONST
D  BufferLength                 10I O   CONST

doesn't.   Do I have to declare the buffer at the maximum size it could be
(32,767 bytes) or is there some way to declare it based on the second
parameter?


Nelson Smith, CDP, CCP
IBM Certified Specialist
AS400 RPG IV Programmer
(727) 431-8243
(800) 284-2006



****************************************************************************
****************************************************************************
****************************************************
This message originates from Lincare Holdings Inc. It contains information
which maybe confidential or privileged and is intended only for the
individual or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use the
contents of this message.
All personal messages express views solely of the sender, which are not to
be attributed to Lincare Holdings Inc., and may not be copied or distributed
without this disclaimer.
If you received this message in error, please notify us immediately at
MailAdmin@lincare.com or (800) 284-2006.
****************************************************************************
****************************************************************************
****************************************************

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.