InboundSeparatedValue

The InboundSeparatedValue handler is used to receive posted separated values and to send separated values as a reply.

Syntax:

Command

Keyword

Value

Developer notes

RECEIVE

HANDLER

InboundSeparatedValue

 

ARCHIVE

 

Optional. See ARCHIVE.

SVROW

 

Optional. See SVROW.

SVROWLIMIT

 

Optional. See SVROWLIMIT.

SVMODE

 

Optional. See  SVMODE.

SVHEAD

 

Optional. See SVHEAD.

ENCODING

 

Optional. See ENCODING.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

CONTENT

 

Optional. See CONTENT.

SEPARATOR

 

Optional. See SEPARATOR.

 

When the RECEIVE command of this content handler is executed the following steps occur:

1.  If there is no content or list argument, then an OK status is returned.

2.  The handler checks that the content type belongs to the separated values group of content types, if it does not support the content type, then an error is returned to the program. Use the CONTENT keyword to override this check and to allow the handler to receive the data, it is assumed the data is CSV.

3.  The handler determines the encoding to apply to the receive byte stream to convert it to Unicode.

4.  The handler determines if this Unicode data needs to be archived.

5.  The handler reads the separated values into the working list.

Example

RECEIVE HANDLER(InboundSeparatedValue) SVHEAD(ORDER) #WRKLST

 

When the SEND command of this content handler is executed the following steps occur:

1.  The handler uses the value of the CONTENT keyword to determine the type of separated values to create:

2.  If no content value is available, the handler defaults to application/comma-separated-values

3.  If the content value is *CSV, then content type will be application/comma-separated-values

4.  If the content value is *TEXTCSV, then content type will be text/comma-separated-values

5.  If the content value is *TSV, then content type will be application/tab-separated-values

6.  If the content value is *TEXTTSV, then content type will be text/tab-separated-values

7.  If the content value is not a valid separated value content type then CSV data is created, but the specified content type is sent.

8.  The optional SVHEAD keyword allows a header record to be inserted at the beginning of the data.

9.  The handler creates Unicode data using all entries in the list, if there is no list argument then zero length content is created.

10. The handler determines if this Unicode data needs to be archived.

11. The handler creates a HTTP response to return to the remote client.

The optional UAFILE and UAPATH keywords are available to inform the remote client program of a recommended path and filename for the content. LANSA Integrator UserAgent will add these file and path names to the save popup menu on the response panel.

Syntax:

Command

Keyword

Value

Developer notes

SEND

HANDLER

InboundSeparatedValue

 

STATUS

value

Optional: HTTP status number.
Default: 200.

MESSAGE

value

Optional: HTTP status message.
Default: OK.

UAPATH

value

Optional. User agent save response path.

UAFILE

value

Optional. User agent save response file name.

UACACHE

value

Optional. Cache-Control max-age.
Default is 0.

UADISPOSITION

value

Optional. Content-Disposition filename.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

CONTENT

*CSV

Default. Create CSV content.

*TSV

Create TSV content.

ENCODING

 

Optional. See ENCODING

SVHEAD

 

Optional. See SVHEAD

SVEXCLUDE

 

Optional. See SVEXCLUDE.

ARCHIVE

 

Optional. See ARCHIVE.

CHARSET

*YES

Optional. Include charset attribute.

*NO

Do not include charset attribute.

*TEXT

Default. Include charset attribute if content is text.

SEPARATOR

value

Optional. See SEPARATOR.

 

Example

SEND HANDLER(InboundSeparatedValue) CONTENT(*CSV) UAFILE(order.csv) #WRKLST