DATALIST
Jump to navigation
Jump to search
lists data elements of a Midas, Text, or binary file
<FILE> Midas data, Text, or binary file to list <START> Offset of first element or line to list (0..n) A negative number indicates a position relative to the end of the file. A fractional number will be converted to the floor of the fraction when not in Abscissa mode. <NELEM> Number of elements to list. [DEF=32; if START<0 DEF=list to EOF] <ABSC> Index or Abscissa mode for <START> and <NELEM> parameters [DEF=INDEX] <FORM> Override the format in the file This routine lists the specified range of a Midas data file, Text file, binary file to the terminal. If the file handler supports advanced listing of the file by implementing the ListFile interface, it's data can also be listed based on the file handler's implementation (e.g. CSV, DBF, JAR, TAR, ZIP are supported). The /NC=n or number of columns switch can be used to set the number of columns of data in the output display. By default, the number of columns is set to the maximum number of elements of the particular data type that can be displayed in an 80 character window. Since NeXtMidas 2.7.0, unknown file types or files with the FG=RAW qualifier will be printed in a hexdump-compatible format with HEX and ASCII values shown. This feature is only enabled if <FORM> is not specified. Since NeXtMidas 2.9.0, a negative number can be given for the START. This will indicate that the user wishes to show the 'tail end' of the data (i.e. all the data from (EOF-START) to EOF, unless NELEM is specified). Since NeXtMidas 2.9.0, an abscissa can be given for the START. Abscissa is indicated by either using the tilde ('~') at the beginning of the number given in START or by using ABSC=true. Examples: 1. List data of a Type 1000 file (CF) starting from the 10th element and using one column per data element. nM> datalist nxm.sys.dat.sinewave.prm 9 /nc=1 2. List first ten (10) data elements (frames) of a Type 2000 file: nM> datalist nxm.sys.dat.apenny.prm 0 10 3. List data records of a Type 3000 file nM> datalist nxm.sys.dat.test3000.prm 4. List data records of a Type 5000 file nM> datalist nxm.sys.dat.sv1.prm 5. List data records of a Type 6000 file nM> datalist nxm.sys.dat.test6000.prm 6. Show the first two (2) lines of a text file: nM> datalist nxm.sys.dat.cities.txt 0 2 7. Show the last fifty lines in a text file nM> data nxm.sys.dat.cities.txt -50 8. Show the last 20 lines of a text file (starting 50 from the EOF). nM> data nxm.sys.dat.cities.txt -50 20 9. Show the last 5 elements (bytes) in an image (binary) file: nM> data nxm.sys.dat.Sunset.jpg -5 10. Show the first four data records in an DBF (database) file: nM> data nxm.sys.dat.world.dbf ,, 4 11. Show the data records in an CSV (text database) file: nM> data nxm.sys.dat.airports.csv 12. Show the value of the third piece of data in a Type 1000 file (with a start of 100.0 and a delta of .1) nM> data junk1000 ~100.2 nelem=1 -or - nM> data junk1000 START=100.2 NELEM=1 ABSC=ABSC Switches: All Files: /L - Show data element positions of data in file (0..n). [DEFAULT=TRUE] For text file this is the line number. /SW= - TBD - screen width Data Files ONLY: /ABS - TBD - show abscissa value for each line /BIN - display data file in binary format /H - display data file header as well /HEX - display data files in hexadecimal format /K - display data file keywords as well /NC= - number of columns (1000/2000 only) /NW= - DEPRECATED - Use /SW /P - display data file packet headers /SW= - limit the screen width [DEF=computed internally]