User Tools

Site Tools


jvs:cigal:manual:chapter2:dmread

CIGAL Reference Manual, Chapter 2 (Commands): dmread

usage: dmread filename datavarb recflg [hdrtxt hdrflag]

DMREAD reads data written by DMWRITE from the named data management (DM) archive file. This file format is described in DM Format. Records read by DMREAD can be displayed on the screen (if they are text records) or stored in a CIGAL data variable. Records in a DM file are accessed either by record number or by record type, using the RECFLG argument.

FILENAME must be the name of a data file in archive format.
If the archive file is the only argument, DMREAD will display a list of all records in the file.

RECFLG can be:

  • > 0 - The record type, defined when the record was written (see DMWRITE(6))
  • < 0 - The negative record number (Recnum = -RECFLG) (the first record is 1)
  • = 0 - This displays the complete file header; this also returns the number of records in the file in register r0

DATAVARB

If a character string argument is specified for HDRTXT it will receive the comment text associated with the retrieved record. If HDRFLAG is 1, DMREAD returns header information for the specified record by loading DATAVARB with a 9 element LONG array containing the following information:

       RECNUM       Record number
       RECSIZE      Size of record in bytes
       RECOFFSET    Byte offset of data
       RECTYPE      Record type
       WTYPE        PIXTYPE for data
       NX           # of data elements if 1 dimensional, otherwise length of the first dimension
       NY           # of elements in the second dimension
       NZ           # of elements in the third dimension
       NT           # of elements in the fourth dimension
       

See Also:
DMWRITE(6)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/dmread.txt · Last modified: 2014/08/04 16:03 (external edit)