I have a CSV file that contains parameter names and tolerances. I have another text file that contains raw data. I am trying to write a script in JSL to read both CSV and text files and then apply the screening criteria in CSV file to the data in text file.
CSV file format is liek below:
# Parameter Tolerance
1 Height 30
2 Diameter 50
TXT file format is
ID Height Diameter
1AA 50 20
1BB 20 30
I want to create a text file with ID that failed the screening criteria.
For example in the above case 1AA fails Height screening as the value 50 is greater than tolerance 30. I want a text file created with 1AA written in it.
Any guidance will be highly appreciated.
So far I only know how to open a CSV or text file but not able to figure out how to save tolerances in a variable and apply the screening condition to data.
txt_path = Pick File( "Pick a file" );
dt_screen = Open(
txt_path,
Column Names are on line( 1 ),
End of Field( "Comma" ),
Data Starts on Line( 2 ),
End Of Line( "CRLF" )
);