|
I am building a trigger mediator and recursion is the issue. As a side
note Charles Wilt's note '...at v5r4 RPG programs aren't reentrant...'
surprised me. At what release are they reentrant?
Anyway, I looked at Alan Campin's code. It seems really convoluted.
Wouldn't a pass thru C program calling a SRVPGM proc do the same thing?
John, what do you mean by 'direct'?
On Tue, Oct 28, 2014 at 5:23 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx>
wrote:
Yup - I was going to suggest the same thing if he needed flexibility. Or
just do it “direct” if not.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Oct 28, 2014, at 4:44 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
Not being funny Tony - but if you are calling an RPG program to do thework then why bother with the C at all?
triggers.*
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Oct 28, 2014, at 4:02 PM, Tony Cate <tonyc@xxxxxxxxxxxxxxx> wrote:
First the code:
*#include <stdio.h>*
*#include <string.h>*
*#include <decimal.h>
#include <stdlib.h>
typedef void RGTRIGCNTL(char[80], decimal(10,0));
#pragma linkage(RGTRIGCNTL,fetchable)
int main(int argc, char *argv[])
{
char *triggerInfo;
decimal (10,0) triggerLen;
triggerInfo = argv[1];
triggerLen = argv[2];
RGTRIGCNTL(triggerInfo, &triggerLen);
}*
*What's going on: trying to write a small C program to attach to file
mailing list
Problems:
pragma linkage won't allow 'OS' for a parameter. Everything I've read
indicates that's what I want. The only "ID' compiler didn't barf on is
'fetchable', which is why its there.
It compiles, but nothing happens when I try to step into RGTRIGCNTL.
The Dev box is V5R4 (long story).
The questions:
Why can't I use 'OS' in linkage? Why isn't my program getting called?
The last time I wrote a C program was in college, a looong time ago.
--
*Tony Cate* | Senior Programmer/Analyst | 704.872.2458 x 126
[image: Auction Edge, Inc.] <http://www.auctionedge.com/>
*AUCTION EDGE, INC.* | *Powering Independent Auctions*
STATESVILLE, NC | 704.872.2458
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L)
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L)
mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
*Tony Cate* | Senior Programmer/Analyst | 704.872.2458 x 126
[image: Auction Edge, Inc.] <http://www.auctionedge.com/>
*AUCTION EDGE, INC.* | *Powering Independent Auctions*
STATESVILLE, NC | 704.872.2458
As an Amazon Associate we earn from qualifying purchases.
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.