Salesforce

AS400Call Function (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

AS400Call Function (Magic xpa 3.x)

This function lets you call any IBM i (AS400) program with multiple parameters.

The syntax used to call an IBM i (AS400) program with more than one parameter is described below:

  • Argument 1 is the argument type string.

  • Argument 2 is the IBM i system name.

  • Argument 3 is the IBM i program name.

  • Argument 4 is the number of parameters.

  • Argument 5 represents the parameter description, such as data type (A=alpha, N=numeric (packed) Z=Numeric (zoned) B=binary, S=structure, H=no conversion), size, and I/O type (O: output parameter).

  • Arguments 6 to 9 are the actual parameters.

  • Argument 10 is the parameter result.

For example:

Invoke UDP('@MGEAC32.AS400Call','AA4AAAV','10.1.4.201','MAGIC400/ TEST',2,'N5, O:A10', ‘11111’, ‘‘)

This example displays:

  • The evocation of an IBM i program TEST in the MAGIC400 library.

  • The program’s two parameters are described below:

The first parameter type is NUMERIC, size 5, and I/O type INPUT.

The second parameter type is ALPHA, size 10, and I/O type INPUT/OUTPUT (O: represents output parameter).

Note: if the type is S=structure then make sure to separate the structure parameters by a semicolon (;) .
For example:

Invoke UDP ('@MGEAC32.AS400Call','AA4AAAV','10.1.4.201','MAGIC400/TEST',2,'SN5,Z5.2;, SO:A10;', ‘11111’ ‘003.11’, ' ')

Reference
Attachment 
Attachment