how to write data to csv in jmeter using beanshell scripting
<p>I am new to jmeter,and in my company we are doing webservices testing using jmeter.My requirement is i am using csv data config file for web services testing and here i want to update each row of csv file with test results and i am using beanshell postprocessor,please help</p>

<p>Ex:
csv contains: </p>

<pre><code>Test Case,Dates,Numbers,Results
Total test cases are 16 and i want to update as below for each test case
TC_001,9-03-2016,001,PASS
TC_002,9-03-2016,0002,FAIL
</code></pre>

<p>and so one...</p>

<pre><code>Result = "FAIL";
Response = prev.Get....();
If(Response.Contains("Valid"));
Results="PASS";
f = new FileOutputStream("/tmp/oders.csv", true);
p = new PrintStream(f); 
this.interpreter.setOut(p); 
print(Results + "," + Result);
f.close();
P.Close();
</code></pre>