Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Field name (string)
  2. Config (object)
  3. Buffer (Buffer) - optional
Config object

A config object is required when defining all fields. It what gives your field attributes, like length, decimal places, dimensions, etc. Available means the element is optional.

Element nameElement typeDescription
typeString

There are the following types available in Profound.js

  • packed decimal
  • decimal
  • integer
  • unsigned integer
  • char
  • boolean
  • date
  • time
  • timestamp
  • pointer
  • data-structure

Some config elements only apply to certain types.

lengthNumber

Required on all types other than

  • date
  • time
  • timestamp
  • pointer
decimalsNumber

Required on types

  • Packed decimal
  • Decimal
varyingBooleanAvailable to char type.
initValueString/Number/BooleanAvailable to all data types.
dimNumberAvailable to all data types. Using dim makes your field into an array. Arrays are 1-indexed.
orderbyString

Available to all types when dim element is used. Either of these values are required:

  • "ASCEND"
  • "DESCEND"
elementsObjectRequired when using data-structure type. Read about data-structures below.
qualifiedBooleanAvailable when using data-structure type.
specialString???

Available to data-structures named. Acceptable values are:

PSDS

  • "*status"
  • "*proc"
  • "*parm"
  • "*routine"

INFDS

  • "*file"
  • "*record"
  • "*opcode"
  • "*status"
  •  "*routine" 
Examples
Example 1: packed decimal

...