flash_rpt

Purpose:

Use this Generic report writer to convert a template into a point-in-time report that contains variable label/value/units for each label tag found in a template file.

Enter:

flash_rpt [open_char] [close_char] [input_file] [output_file] [fmt] [+l] [+u] [+s]

Where:

open_char

Specify the variable label start delimiter. The default is {.

close_char

Specify the variable label end delimiter. The default is }.

input_file

Specify the report template. The default is stdin.

output_file

Specify the output report file. The default is stdout.

fmt

Specify the output format for label/units. The default is “%s[%s]”.

+l

Specify this flag to include ‘label=’ prior to the value.

+u

Specify this flag to include ‘[units]’ after the value.

+s

Specify this flat to use state name for logical values. The default is 0/1.

Example:

 template: my_temp  
      This is a report template:  
         The engine speed is { eng_spd } and the load is { torque }.  
 
      Run #1:  
      flash_rpt i=my_temp r=my_out1  
 
      my_out1:  
      This is a report template:  
         The engine speed is 1247 and the load is 122.  
 
      Run #2:  
      flash_rpt i=my_temp r=my_out2 +l  
 
      my_out2:  
      This is a report template:  
         The engine speed is eng_spd = 1247 and the load is torque = 122.  
 
      Run #3:  
      flash_rpt i=my_temp r=my_out3 +u  
 
      my_out3:  
         The engine speed is 1247[ rpm ] and the load is 122[ lb_ft ].  
 
—–  
    formatted template: my_tempf  
      This is a report template:  
         The engine speed is {eng_spd/%6.2f} and the load 
is {torque}.  
 
—  
      Run #4:  
      flash_rpt i=my_tempf r=my_out4f  
 
      my_out1f:  
      This is a report template:  
         The engine speed is 1247.23 and the load is 122.  
         formatted template: my_tempf  
      This is a report template:  
         The date today is { “@year_month_day()” }  
 
      Run #5:  
         flash_rpt i=my_tempf r=my_out5f  
 
      my_out5f:  
      This is a report template:  
         The date today is 100412.

Notes:

 

See Also: