midrange.com code scratchpad |
Name:
Example PCML call
|
Scriptlanguage:
Java
|
Tabwidth:
4
|
Date:
09/25/2018 08:15:53 pm
|
IP:
Logged
|
|
Description:
The user was to lazy to give a description
|
Code:
- import com.ibm.as400.access.AS400;
- import com.ibm.as400.data.PcmlException;
- import com.ibm.as400.data.ProgramCallDocument;
-
- public class PcmlExample {
-
- public static void main(String[] args) {
- AS400 as400;
- ProgramCallDocument pcd;
- String path = "/QSYS.LIB/MYLIB.LIB/MYSRVPGM.SRVPGM";
- as400 = new AS400 ();
- try {
- pcd = new ProgramCallDocument (as400, "myModule");
- pcd.setPath ("MYFUNCTION", path);
- pcd.setValue ("MYFUNCTION.PARM1", "abc");
- boolean rc = pcd.callProgram("MYFUNCTION");
- System.out.println("rc = " + rc);
- } catch (PcmlException e) {
- e.printStackTrace();
- }
- }
-
- }
-
|
|
|