5 4 5 SET

LANSA Integrator

5.4.5 SET

The SET command allows the program to include HTTP head properties in the HTTP request or response protocol.

The HTTP property name value pairs are passed as entries in a two-column working list.

The SET command can be called anytime before the last SEND command that creates the HTTP request or response.

The LIST and FRAGMENT keywords are only available if the InboundXMLBind, OutboundXMLBind, InboundJSONBind or OutboundJSONBind handlers are being used.

The INSTRUCTION and DATA keywords are only available if the InboundXMLBind and OutboundXMLBind handlers are being used.

 

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

SET

PROPERTY

*LIST

Set HTTP head properties.

LIST

Value

Conditional. XML or JSON Bind list.

FRAGMENT

Value

Conditional. XML or JSON Bind fragment.

INSTRUCTION

Value

Conditional. XML processing instruction.

DATA

Value

Conditional. XML processing instruction data.

 

Example

 

DEFINE     FIELD(#PNME) TYPE(*CHAR) LENGTH(20)

DEFINE     FIELD(#PVAL) TYPE(*CHAR) LENGTH(20)

DEF_LIST   NAME(#PLST) FIELDS((#PNME) (#PVAL)) TYPE(*WORKING)

 

CHANGE     FIELD(#PNME) TO('''X-Invoice''')

CHANGE     FIELD(#PVAL) TO(T9300)

ADD_ENTRY  TO_LIST(#PLST)

 

USE        BUILTIN(JSM_COMMAND) WITH_ARGS('SET PROPERTY(*LIST) SERVICE_LIST(PNME,PVAL)') TO_GET(#JSMSTS #JSMMSG #PLST)