Skip to main content Skip to complementary content
Close announcements banner

Call external program

 

CALL – Call external program with standard parameters

 

AS/400 IBMi platform

Call Program 

This parameter is used to call an AS/400 IBMi program (*PGM) regardless of whether its type is EPM or ILE. This program can be CLP, RPG, COBOL, C, PASCAL, or others.

The name of the library in which the program is located cannot be specified. It must therefore be located in one of the libraries included in the list of libraries. The DD_USRDATA library is always present in the list of libraries.

The program will receive four required parameters which are as follows:

Parameters Description
1 Buffer I
2 Buffer B
3 Buffer O
4 Buffer W

You can modify the contents of these parameters. 

You can enrich the content of O with external data.

 

Example of a CLP program call:

CALL MYPGM
TRACE W.Field_1 

Trace ‘1’

Source CLP

PGM PARM(&I &B &O &W)
             DCL        VAR(&I) TYPE(*CHAR) LEN(100)
             DCL        VAR(&B) TYPE(*CHAR) LEN(100)
             DCL        VAR(&O) TYPE(*CHAR) LEN(100)
             DCL        VAR(&W) TYPE(*CHAR) LEN(1)
             CHGVAR     VAR(&W) VALUE('1')
             RETURN

 

Windows platform

CALL ActiveX.class     

This parameter is used to call an ActiveX dll class.

The class receives five required parameters that are as follows:

Parameters Description
1 Buffer I
2 Buffer B
3 Buffer O
4 Buffer W
5 Error Message

You can modify the contents of these parameters. 

You can enrich the content of O with external data.

You will find samples on directory "NT Samples\Transformation\Call - VB6".

 

CALLX – Program call with custom parameters

 

AS/400 IBMi platform

CallX Program [b.Field1/Constant] [b.Field2/Constant] [b.zone3/Constant]

 

This parameter is used to call an AS/400 IBMi program (*PGM) regardless of whether its type is EPM or ILE. 

This program may be CLP, RPG, COBOL, C, PASCAL, and so forth, for which you can specify one to three parameters of your choice. 

These parameters can be constants, BASED fields or fields that are not BASED.

 

Windows platform

CallX DllName.Function [b.Field1/Constant] [I.Field2/Constant] [b.Field3/Constant]

This parameter calls a function from a DLL 

You will find samples on directory "NT Samples\Transformation\CallX – C"

 

CallDotNetX – Call DotNet Class from Method call (only windows platform)

CallDotNetX MyDll.MyNameSpace.MyClass.MyFunction [b.Field1/Constant]
            [b.Field2/Constant] [b.Field3/Constant]

This parameter calls a DotNet Function.

You will find samples on directory "NT Samples\Transformation\CallDotNetX – Csharp". 

You will find a sample of WebService call.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!