AS400PGMCALL Function (Magic xpa 3.x)
The syntax used for calling an IBM i program from Magic xpa is:
UDF(‘MGEAC32.AS400PGMCALL’, A,B,C,D)
Where:
-
A represents IBM i System Name; character variable
-
B represents Program Library/Program Name; character variable
-
C represents Parameter; character variable (any length)
-
D represents Parameter length; numeric variable
-
The function returns data received from the IBM i program.
The parameters passed and received must be in alphanumeric format only. The maximum length for the return string is 2048.
When called as a user-defined procedure, the passed parameter is updated upon return to its full length. For more information, see the section on the Invoke UDP operation in the Magic xpa Help.
Example:
The following is an example of using the UDF function to call the AS400PGMCall program:
Result field = UDF(‘MGEAC32.AS400PGMCALL’,’MAGICLNX’,’TEST/CHGDTAARA’,A,40)
The AS400PGMCall command activates the CL program that changes the Data Area content in IBM i, as shown below.
