Toolkit Sample Scripts
This topics details the PHP XMLSER
| Name | Code |
|
Display Library (DSPLIBL) |
<pre>This program runs following CL commands:- ADDLIBLE ZENDPHP7- DSPLIBL</pre><?phpinclude_once 'authorization.php';include_once 'ToolkitService.php'; |
|
Program Call (Two Parameters) |
<?php/*RPG program parameters definitionPLISTPARM CODE 10PARM NAME 10*/include_once 'authorization.php';include_once 'ToolkitService.php';include_once 'helpshow.php';//The ToolkitService connection method/function uses either IBM_DB2(default)or ODBC extensions to connect//to IBM i server. In order to switch to ODBC connection assign an "odbc' value to the $extension varibale//and make sure that the ODBC extension is enabled in the PHP.INI file.//The ODBC extension usage in ToolkitService is preferable in 2 tier environment: Zend Server running in Windows/Linux//and accessing database and/or programs in IBM i server$extension='ibm_db2'; |
|
Program Call (Data Structure Parameters) |
<?php/*RPG program parameters definitionINCHARA S 1aINCHARB S 1aINDEC1 S 7p 4INDEC2 S 12p 2INDS1 DSDSCHARA 1aDSCHARB 1aDSDEC1 7p 4DSDEC2 12p 2*/include_once 'authorization.php';include_once 'ToolkitService.php';include_once 'helpshow.php'; |
|
Service Program Call that Returns Function Value |
<?php/* This program is calling a service program (*SRVPGM) function which retrieves QCCSID system value*/include_once 'authorization.php';include_once 'ToolkitService.php'; |