Last active
March 31, 2016 21:03
-
-
Save phpdave/8c11db6df2a8fc33b1ce10591ccbfdc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dcl-ds PARM1_Ds Extname('FILE') Qualified End-ds; | |
| Incoming parameter definition | |
| Dcl-pr Entry Extpgm('RPGNAME'); | |
| PARM1 Char(%Len(PARM1_Ds.FIELDOFPARM1)); | |
| End-pr; | |
| * Incoming parameter definition | |
| Dcl-pi Entry; | |
| PARM1 Char(%Len(PARM1_Ds.PARM1)); | |
| End-pi; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $parm1 = " "; | |
| $dbh = new PDO('odbc:MYIBMI', 'user', 'pass'); | |
| $sth = $dbh->prepare("CALL SPROCNAME1(:PARM1INOUT)"); | |
| //must be length 9 or you get a null '0000067�' instead of '10000067' | |
| $sth->bindParam(":PARM1INOUT", $parm2inout, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 9); | |
| $sth->execute(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE OR REPLACE PROCEDURE LIB.SPROCNAME1 ( | |
| INOUT PARM1 CHAR(8) ) | |
| LANGUAGE RPGLE | |
| SPECIFIC LIB.SPROCNAME1 | |
| NOT DETERMINISTIC | |
| NO SQL | |
| CALLED ON NULL INPUT | |
| EXTERNAL NAME 'LIB/RPGNAME' | |
| PARAMETER STYLE GENERAL ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment