column_id_spec 

Syntax

<column_id_spec> ::= <column_id> <field_pos> <format_spec> <null_assign>

Use

This is a syntax rule for describing columns.

Use this rule in a command for unloading data to assign the data fields of the target file to the columns of the source table. You specify the external data types and the conditions for unloading the data.

Note the following rules:

Decide whether you want your column descriptions to contain field_pos field descriptions.

However, you must specify position descriptions for all or none of the described columns. If you do not, the Replication Manager generates an error and terminates the command.

Output Format COMPRESSED

If you enter position descriptions with start and end positions for single columns or all columns, the Replication Manager generates and error and terminates the command.

DATAEXTRACT * from customer
OUTFIELDS
  cno       1
  last name 2
  zip       3
  place     4-31
OUTFILE 'customer.data' COMPRESSED

DATAEXTRACT * from customer
OUTFIELDS
  cno       1
  last name 2
  street    3
  zip       3     ERROR
  place     5     ERROR
OUTFILE 'customer.data' COMPRESSED

DATAEXTRACT * from customer
OUTFIELDS
  cno       1
  last name 2
  zip       3
  place     4
  last name 5
OUTFILE 'customer.data' COMPRESSED

Output Format FORMATTED

DATAEXTRACT * from customer
OUTFIELDS
  cno        01-04
  last name  06-12
  zip        14-18
  place      16-31
OUTFILE 'customer.data' FORMATTED