Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Variable

Index

Constructors

constructor

  • new Variable(raw: Buffer, fmt: string): Variable
  • Member (dataset) within the XPORT file.

    Parameters

    • raw: Buffer

      Raw description of a varilable.

    • fmt: string

      Struct format used to parse the binary data.

    Returns Variable

Properties

formatD

formatD: string

formatJ

formatJ: string

formatName

formatName: string

formatW

formatW: string

informatD

informatD: string

informatName

informatName: string

informatW

informatW: string

label

label: string

length

length: number

name

name: string

type

type: string

varNum

varNum: number

Methods

parseRaw

  • parseRaw(raw: Buffer, fmt: string): void
  • Parse Member information from XPORT file. Here is the C structure definition for the namestr record:

    struct NAMESTR {
    short ntype; / VARIABLE TYPE: 1=NUMERIC, 2=CHAR /
    short nhfun; / HASH OF NNAME (always 0) /
    short nlng; / LENGTH OF VARIABLE IN OBSERVATION /
    short nvar0; / VARNUM /
    char8 nname; / NAME OF VARIABLE /
    char40 nlabel; / LABEL OF VARIABLE /
    char8 nform; / NAME OF FORMAT /
    short nfl; / FORMAT FIELD LENGTH OR 0 /
    short nfd; / FORMAT NUMBER OF DECIMALS /
    short nfj; / 0=LEFT JUSTIFICATION, 1=RIGHT JUST /
    char nfill[2]; / (UNUSED, FOR ALIGNMENT AND FUTURE) /
    char8 niform; / NAME OF INPUT FORMAT /
    short nifl; / INFORMAT LENGTH ATTRIBUTE /
    short nifd; / INFORMAT NUMBER OF DECIMALS /
    long npos; / POSITION OF VALUE IN OBSERVATION /
    char rest[52]; / remaining fields are irrelevant /
    };

    Note that the length given in the last 4 bytes of the member header record indicates the actual number of bytes for the NAMESTR structure. The size of the structure listed above is 140 bytes. Under VAX/VMS, the size will be 136 bytes, meaning that the 'rest' variable may be truncated.

    Parameters

    • raw: Buffer

      Raw description of a varilable.

    • fmt: string

      Struct format used to parse the binary data.

    Returns void

Generated using TypeDoc