SVHEAD

The optional keyword SVHEAD is used to describe the field layout of the separated value data.

Inbound

The SVHEAD keyword has different roles for inbound separated value data and outbound separated value data.

When the SVHEAD keyword is used on the RECEIVE or READ command for processing inbound data, the following rules apply.

If the SVHEAD keyword is not present and the SVMODE keyword is *NONE or *IGNORE then the inbound data is inserted directly in the working list, so the field count and data types must match the list definition.

If the SVHEAD keyword is present, then a look up on the service properties resource is done using the sv.head.{value} to determine the header record that describes the column layout of the inbound data.

This header record is used to map column value to working list field for each record as its being added to the list.

Example

READ SVHEAD(ORDER)

 

RECEIVE SVHEAD(ORDER)

 

SVFileServer.properties file

sv.head.order=LINENUM,PARTNUM,PARTDSC,PARTAMT,PARTQTY

Outbound

To add a header record to outbound separated value data, the SVHEAD keyword can be used on the SEND or WRITE command.

The keyword value is used to locate the header record using the sv.head.{value} lookup on the service properties resource.

A keyword value of *LIST will cause the service to use the working list fields.

A keyword value of *COLUMN will cause the service to use the fields from the SVCOLUMN lookup.

Example

WRITE SVHEAD(*LIST)

 

SEND SVHEAD(*LIST)