5 6 4 SET

LANSA Integrator

5.6.4 SET

The SET command is used set the title and caption for a HTML table result.

Also the SET command can be used to set the SQL query and the result set content type.

The SET command can also be used to include HTTP head properties in the HTTP 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 SEND command that creates the HTTP response.

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

SET

TITLE

value

Optional. HTML page title.

*NONE

Default.

CAPTION

value

Optional. HTML table caption.

*NONE

Default.

HEAD

*NONE

Optional. Show column header.

*LONG

Use long names.

*SHORT

Default. Use short names.

QUERY

*LIST

Optional. SQL query.
The list argument contains a large SQL statement. An SQL statement is created by concatenating the list entries and replaces the current query.

*NONE

 

CONTENT

*HTML

Default. text/html.

*CSV

 

*XML

 

*TEXTXML

 

PROPERTY

*LIST

Conditional. Set HTTP head properties.

 

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)