[Stackoverflow] [Progress OpenEdge ABL] A program that outputs a report, as a CSV

Status
Not open for further replies.
D

Duke578

Guest
Ho do I write code for a program that can accept three input parameters: x , y, and the filename to write to?

I should be able to call the program like this: run prog.p (input “1”, input 5, input “filename1.csv”).

so far my I have written the code below and not sure how to go around it.

OUTPUT TO xxxxxx\filename1.csv".

DEFINE VARIABLE Profit AS DECIMAL FORMAT "->>,>>9.99":U INITIAL 0 NO-UNDO.

EXPORT DELIMITER "," "Amount" "Customer Number" "Invoice Date" "Invoice Number" "Total_Paid" "Profit".

FOR EACH Invoice WHERE Invoice.Ship-charge > 5.00
AND Invoice.Total-Paid > 0.01
AND Invoice.Invoice-Date GE 01/31/93 /* this is between also can use < >*/
AND Invoice.Invoice-Date LE TODAY NO-LOCK:

Profit = (Invoice.Invoice-Num / Invoice.Total-Paid) * 100.

EXPORT DELIMITER "," Amount Cust-Num Invoice-Date Invoice-Num Total-Paid Profit.
END.

OUTPUT CLOSE.


Thank you.

Continue reading...
 
Status
Not open for further replies.
Top