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



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



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.