Thanks, Scott. I stand corrected. I always thought I always thought
open, read, write etc. were C API's. My confusion comes from having to
bind to QC2LE in order to use strerror, which I left out of this sample
but always use with the Unix-type API's.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, August 01, 2007 5:32 PM
To: Midrange Systems Technical Discussion
Subject: Re: perl and sendmail on iSeries
Hi Griz,
Your solution works, through, strictly speaking you should have the
QIBM_USE_DESCRIPTOR_STDIO envvar set to Y if you want to do that.
(Though, it may not matter when called via QShell or PASE?)
Your code doesn't need BNDDIR('QC2LE'). QC2LE is for when you call
routines in the ILE C runtime library. The only routine you're calling
is read(), which is not part of that library (it's a Unix-type API, and
requires no special binding directory.)
There are a few other ways to get STDIN as well:
a) You could use the ILE C fgets() or fread() APIs (these, by contrast,
WOULD require QC2LE)
b) You could call the QtmhRdStin() API. (This API is provided with the
HTTP server, but all it does is read standard input, so it works for any
application that requires you to read standard input.)
All of these methods really do the exact same thing, they read stdin...
I am still hoping for a PASE version of sendmail.... My part of this
project
is to take html & perl from a 3rd party and config Apache to make it
work
(and no more). I could easily build my own web form with rpg/cgi and
use
the QtmmSendMail or other mail options I've implemented - but I am not
the coder or maintainer of this site - only acting as the server
manager...
I do fear telling the customer of a roadblock with the iSeries will
have
repercussions.
jim franz