IBM i (AS400) Connector

Additional Info

Requires Mule Enterprise License

Yes  

Requires Entitlement

No  

Mule Version

3.6.0 or higher

Configs


AS400 Connector Configuration

<as400:config>

Connection Management

AS400 Connection Management

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

endpoint

String

IBM i (AS400) system endpoint (IP or name)

x 

userid

String

userid

x 

password

String

password

x 

IASP

String

IASP name

 

libraryList

String

comma separated list of libraries to add to the connection user's default library list

 

secureConnection

Boolean

when checked, the connector will try to establish secure SSL / TLS connection with IBM i endpoint. For more information see

false

 

Processors


Program Call

<as400:program-call-processor>

Implementation of IBM i program call. Supports all simple data types, as well as data structures (use type = STRUCTURE) and arrays. Element of data structure cannot be a data structure or an array. Element of an array cannot be an array.

XML Sample

<as400:program-call-processor config-ref="AS400_config" config-ref="AS400__AS400_Connector_Configuration" doc:name="AS400" programLibrary="MULEDEMOS" programName="POSTORDERS">
                    <as400:parameters>
                <as400:parameter name="orderID" dataType="PACKED" length="8" usage="INOUT" parmValue-ref="#[payload.orderID]" />
                <as400:parameter name="orderLines" dataType="PACKED" length="4" usage="INOUT" parmValue-ref="#[payload.orderLines]" />
                <as400:parameter name="orderLinesIn" dataType="STRUCTURE" usage="INOUT" count="10" parmValue-ref="#[payload.orderItemsIn]">
                    <as400:data-structure-elements>
                        <as400:data-structure-element name="item" dataType="STRING" length="35" />
                        <as400:data-structure-element name="qty" dataType="PACKED" length="11" decimalPositions="3" />
                        <as400:data-structure-element name="price" dataType="PACKED" length="14" decimalPositions="4" />
                    </as400:data-structure-elements>
                </as400:parameter>
                <as400:parameter name="orderLinesOut" dataType="STRUCTURE" usage="OUT" count="10">
                    <as400:data-structure-elements>
                        <as400:data-structure-element name="item" dataType="STRING" length="35" />
                        <as400:data-structure-element name="qty" dataType="PACKED" length="11" decimalPositions="3" />
                        <as400:data-structure-element name="price" dataType="PACKED" length="14" decimalPositions="4" />
                    </as400:data-structure-elements>
                </as400:parameter>
            </as400:parameters>
        </as400:program-call-processor>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

programName

String

name of the program

x 

programLibrary

String

name of the program library

x 

procedureName

String

name of service program procedure

 

procedureReturnsValue

Boolean

indicates if procedure returns Integer value (true) or no value (false)

false

 

threadSafe

Boolean

indicator if the program is thread safe

false

 

parameters

List<ProgramCallParameter>

list of ProgramCallParameter definitions and value references

 

Returns

Return Java Type Description

Map<String,Object>

outputParameters


Read Data Queue

<as400:read-data-queue-processor>

Data queue message reader - waits for specified period of time until the message arrives then times out. For keyed data queues, specify key and search type. The key will be saved into OutboundProperties parameter as400.dataqueue.key. The data queue message is saved into payload.

XML Sample

<as400:read-data-queue-processor
                        config-ref="AS400_config" doc:name="Get AS400 response"
                        dtaq="responseDQ" dtaqKey="#[message.inboundProperties.'as400.dataqueue.key']" dtaqKeySearchType="EQUAL"
                        dtaqwaittime="15" library="esblib" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

dtaq

String

the name of data queue

x 

library

String

the name of library

x 

dtaqKey

String

the name of key

 

dtaqKeySearchType

SearchType

the key search type

 

dtaqwaittime

int

the max wait time

0

 

peek

Boolean

the keep messages in queue

false

 

formatFileName

String

Format file (AS400 table) name

 

formatFileLibrary

String

Format file (AS400 table) library name

 

Returns

Return Java Type Description

Object

readMessage from data queue


Write data queue

<as400:write-data-queue>

Data queue message writer.

XML Sample

<as400:write-data-queue config-ref="AS400_config"
                        dtaq="responsedq" library="esblib" dqEntry="#[payload]"
                        doc:name="Write AS400 response" dtaqKey="#[message.inboundProperties.'as400.dataqueue.key']" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

dtaq

String

the data queue

x 

library

String

the name of library

x 

dqEntry

String

the data entry

#[payload]

 

dtaqKey

String

the key

 

formatFileName

String

Format file (AS400 table) name

 

formatFileLibrary

String

Format file (AS400 table) library name

 


Command Call

<as400:command-call>

Execute OS400 (IBM i) command

XML Sample

<as400:command-call config-ref="AS400_config" cmd="CALL MYLIB/MYPGM ('Parameter1' 'Parameter2')" doc:name="AS400 Command Call"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

cmd

String

the AS400 command

#[payload]

 

Sources


Data Queue Listener

<as400:read-data-queue>

Listens until the data queue message arrives or the end of times, whichever comes first. For keyed data queues, specify key = ' ' and key search type = Greater Than Or Equal. When receiving the message from keyed data queue, the key value will be saved into InboundProperties parameter as400.dataqueue.key. The data queue message is saved into payload as String.

XML Sample

<as400:read-data-queue config-ref="AS400_config"
                        dtaq="requestdq" library="esblib" doc:name="AS400 Listener"
                        dtaqKey="''" dtaqKeySearchType="GREATER_THAN_OR_EQUAL" />

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

callback

SourceCallback

the callback

x 

dtaq

String

the name of data queue

x 

library

String

the name of library

x 

dtaqKey

String

only for keyed data queues. If not specified, the data queue is not keyed

 

dtaqKeySearchType

SearchType

the key search type

 

peek

Boolean

keep messages in queue

false

 

formatFileName

String

Format file (AS400 table) name

 

formatFileLibrary

String

Format file (AS400 table) library name

 

Returns

Return Java Type Description

void