The EXPORT statement sends data to a specified output destination, formatting it in a way that can be easily used by another ABL procedure. For example, i-export.p writes customer information to a file.
i-export.p
OUTPUT TO i-datfl6.d.
FOR EACH Customer NO-LOCK:
EXPORT Customer.CustNum Customer.Name Customer.SalesRep.
END.
OUTPUT CLOSE.
The output from i-export.p is written to i-datfl6.d.
Now this file is ready to be used as an input source by another ABL procedure. There is no need to process it through QUOTER.
By default, the EXPORT statement uses the space character as a delimiter between fields. You can use the DELIMITER option of the EXPORT statement to specify a different delimiter.
For example, i-exprt2.p writes to a file in which field values are separated by commas.
i-exprt2.p
OUTPUT TO i-datfl7.d.
FOR EACH Customer NO-LOCK:
EXPORT DELIMITER "," Customer.CustNum Customer.Name Customer.SalesRep.
END.
OUTPUT CLOSE.
The output from i-exprt2.p is written to i-datfl7.d.
i-datf17.d
1,"Lift Line Skiing","HXM"
2,"Urpon Frisbee","DKP"
3,"Hoops Croquet Comp","HXM"
4,"Go Fishing Ltd","SLS"
5,"Match Point Tennis","JAL"
.
.
.
You can read this file by using the DELIMITER option of the IMPORT statement. More likely, you would prepare a file like this to be read by another application.
For more information on the EXPORT statement, see OpenEdge Development: ABL Reference.