Determines the number and location of defined variables in an HP VEE Container by scanning the file.
start_records A long array containing the starting position of each variable within the Container file. This information can be used as input to the DC_READ_CONTAINER function to extract a given variable.
end_records A long array containing the ending position of each variable within the Container file. This information can be used as input to DC_READ_CONTAINER to extract a given variable.
0 | Indicates an error, such as an invalid filename or incorrect file format. |
0 | Indicates a successful read. |
The Container file format is a proprietary HP ASCII file format which contains a header description of the enclosed data. PV-WAVE reads this header information and creates a PV-WAVE variable of the appropriate type and dimension to hold the enclosed data.
DC_SCAN_CONTAINER enables you to determine the number of variables described within an HP VEE Container file. The returned parameter arrays start_records and end_records can be used as inputs to the DC_READ_CONTAINER function to extract individual variables.
An HP VEE Container file is created in HP VEE by using the Write Container transaction in the To File object. Please refer to your HP VEE documentation for more details.
status = DC_SCAN_CONTAINER(!Data_dir+'hpvee_multi.con', $ num_vars, start_recs, end_recs)
FOR I=0, num_vars-1 DO BEGIN
var = 'var'+STRCOMPRESS(STRING(I), /Remove_All) rc= EXECUTE("status = $ DC_READ_CONTAINER(!Data_dir+'hpvee_multi.con', " + $ var+ ",Start_Record=start_recs(I), End_Record=end_recs(I))" ) ENDFOR
INFO
VAR0 FLOAT = 18.0000
VAR1 COMPLEX = Array(4)
VAR2 FLOAT = Array(10)