/// this chunk is included by prefabs to read data..
//
#musthave data
//
//// read data file..
#proc getdata
#if @data = stdin
  standardinput: yes
#else
  file: @data
#endif
#ifspec delim
#ifspec header fieldnameheader
#ifspec comment commentchar
#ifspec select
#ifspec echodata showresults
#ifspec nfields

#if @context = chron 
  #include $chunk_chronfilter
#elseif @context = stack && @stackarea = yes && @y2 != ""
  #include $chunk_stackareafilter
#elseif @context = vdist
  #include $chunk_vdistfilter
#elseif @context = heatmap
  #include $chunk_heatmapfilter
#endif

#endproc

#if @NRECORDS = 0
  #exit
#endif

#write stderr
Got @NRECORDS records, @NFIELDS fields per record.  
#endwrite
