Product Documentation

FairCom RTG COBOL Edition User's Guide

Previous Topic

Next Topic

-unload

Exports data from a COBOL data file to a sequential or ASCII file. If the COBOL file is encrypted, ctutil returns error 33: Operation not allowed. File is encrypted.

Usage

ctutil -unload file_name seq_file [-b|t|p] [-v[2|4|8][n|x]] [-k=index][-f]

where:

  • file_name - File name without extension.
  • seq_file - Path to the destination file.
  • -b - Indicates a binary sequential format is used.
  • -t - Indicates a line sequential format (records separated by new-line character).
  • -p - Indicates an ASCII file to be used by the BTRV BUTIL -load command.
  • -v - Destination file has variable-length records

    [2|4|8] - record data is preceded by record length and is optionally followed by a 2 or 4 or 8 that indicates record length is stored in 2 or 4 (default) or 8 bytes

    [n|x] - record length is stored in native COMP-N (default) or big-endian COMP-X format

  • -k=index - Reads and writes records in specified index order (-k=1 for the primary key)
  • -f - Open the file even if it is corrupted (i.e., file open returns c-tree error 14 FCRP_ERR). (Deprecates the generic ctutil option -s that was doing the same thing and was used only by -info and -unload commands.)

See Also:

TOCIndex