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



In this example PHP calls a RPG program that returns a parameter (already
converted to ascii).

===========

dParametri        ds                  occurs(1)
d Parametro                     10
c                   eval      Parametro = x'31323334352020202020'
c/exec sql
c+   set result sets array :Parametri for 1 rows
c/end-exec
c                   seton                                        lr
c                   return

=============

CREATE PROCEDURE PROVASP1 ()
RESULT SETS 1
LANGUAGE RPGLE
EXTERNAL NAME PROVASP1
READS SQL DATA
PARAMETER STYLE GENERAL

=============

<html>
<head>
<title>Call SP su iSeries</title>
<body>
<?PHP
include("SHconnect.inc");
$query = "CALL PROVASP1()";
$result = odbc_exec($connection, $query);
if ($result) {
  if (odbc_fetch_into($result,$row)!=FALSE)
    echo $row[0];
}
?>
</body>
</html>

============

HAVE FUN !!!!

----- Original Message ----- 
From: <lcrane@xxxxxxxxxxxxx>
To: <web400@xxxxxxxxxxxx>
Sent: Tuesday, July 19, 2005 7:51 PM
Subject: [WEB400] PHP calling RPG program


> Can anyone offer any examples, good websites or books on how to call RPG
> programs from within a PHP script running on the iSeries using PASE?
>
> I am trying to call an RPG program with parameters from within PHP.  We
> have a web site running .NET but need to access our images on the iSeries
> that have been scanned and placed into the IFS.  The images have been
> scanned in as a .TIF and we are running an RPG program to convert this
> images from a .TIF to .PDF and display on web using PHP/RPG.
>
> Thanks in advance.
>
> Lori Crane
> Trans American CHB
> 716-896-7800 x261
>
> CONFIDENTIALITY NOTICE:  This email transmission and any documents, files,
> or previous e-mail messages attached to it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you are not the intended recipient, or a person responsible for
> delivering it to the intended recipient, you are hereby notified that any
> further review, disclosure, copying dissemination, distribution, or use of
> any of the information contained in or attached to this e-mail
transmission
> is strictly prohibited.  If you have received this message in error,
please
> notify the sender immediately by e-mail, discard any paper copies, and
> delete all electronic files of the message.  The recipient should check
> this email and attachments for the presence of viruses.  We accept no
> liability for any damage caused by any virus transmitted by this email.
>
> -- 
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.