Argument Description
dwcontrol A reference to a DataWindow control or DataStore
filename A string whose value is the name of the file in which to save the contents
separatorcharacter (optional) A string whose value is the character to be used to delimit values. If you omit separatorcharacter, the default is a tab character
quotecharacter (optional) A string whose value is the character to be used to wrap values. If you omit quotecharacter, the default is double quote
lineending
(optional) A string whose value is placed at the end of each line. If you omit lineending, the default is a carriage return plus a newline character (~r~n)
Return value
Returns 1 if it succeeds and -1 if an error occurs.
Usage
SaveAsAscii is a cross between the SaveAs (Text!) function and the SaveAs (HTMLTable!) function with additional arguments. It mirrors more closely what the user sees on the screen. Arguments allow the user to control how contents are separated and delimited in the ASCII file.
PowerBuilder assigns a cell for each DataWindow object (which can include computed columns and group totals). If a cell is empty, PowerBuilder puts the quotecharacter between the separatorcharacter in the output file.