rngdbdump - Dump Database File Range

rngdbdump [-cstnd] [-i index] dataarea|dataID filename [-f fieldname...][-k rangekey...][-v fieldvalue...] [-w FilterFieldValue...]

Dump a selection of records from one database file to standard output. Based on the primary index of the file or an index you specify, you can extract all the fields in a record, or any combination of fields. You can control the range of records selected by specifying values for the various keys in the index or by specifying a value or range of values for one field.

The default format of the extracted data is columns separated by spaces. Data in this format can be routed to a printer or to lashow and easily read. The extracted data can be formatted as a comma-separated-value (CSV) file for use in another program, such as a spreadsheet. If the data is to be loaded into another file, it can be formatted so that the Lawson dbload command can accept the extracted records. You can also choose whether to include the field headers in the output.

Note: Unless you use the -d or -c option, the utility truncates fields larger than 80 columns.
Program Option Description
c

Put the output in a comma-separated value format. You can also use this option to dump files containing fields larger than 80 columns.

n Dump output without the field headers.
d Dump to flat file. Creates a file that the dbload utility can import. You can also use this option to dump files containing fields larger than 80 columns.
t Terse mode. Does not show record count. If you use this option, specify one or more field names in the fieldname(s) field.
s

Specify the delimiter of the returned result other than comma. Not valid with either -c or -d option.

Requires the delimiter to be in a two-digit hexadecimal ASCII value. For example, if the user used semicolon as delimiter, the syntax would be -s3B.

i index Dumps the database using the index you specify instead of the primary index of the file (for example, -iGLMSET2).
f fieldname Dump the data only for the specified fields. If you use this option, specify one or more field names in the fieldname(s) field.
k rangekey Limit the output based on the values for the index keys of the file. This option dumps records only when the specified keys are matched.
v fieldvalue Dumps data for a specified field.
w fieldvalue Filter field value. Enhances the filtering feature to avoid changing the behavior of the v option. Cannot be used with the v option.
z Creates a log with timestamps in LAWDIR/system/joblog/rngdbdump.<pid>.log.

At the command line, specify the information above.

- or -

  1. From the Database Administration menu, choose Data Export/Import.

  2. From the Data Export/Import menu, choose Dump Database File Range.

  3. Specify or select the following data.

    Options
    See the above program, index, field, and range options.
    Data Area/Data ID

    Data area or data ID containing the database file you want to dump.

    File Name
    File you want to dump.
    Field Name(s)
    Names of up to 250 fields (the limit on a file record) you want to dump data for.
    Range Key(s)
    Values for each key in the index for the file you want to dump data from.
    Specify a value for up to 13 keys, each separated by a space. If the value has spaces in it, enclose that value in apostrophes or insert a hyphen where the space or spaces would be.
    Field Value Option
    Dumps data for specified field.
    I/O Options

    Optional. Display the output or redirect it to a file.

  4. Press Enter.

    Note: Date, time, username, type, utility name and key field activities of this utility are logged in the $LAWDIR/system/secadmin.log file.