b = setoutput(alpha-exp);
The setoutput function redirects the output cases of a batch application to the data file specified in the alpha-exp. All data will be appended to (added to the end of) the file. If the file exists prior to the application run, you may, depending on the circumstances, want to use the filedelete function to remove the file. This function can not be used in data entry applications.
Alpha-exp is an alphanumeric expression containing the folder and file name of the file to be attached to the batch output.
The function returns a logical value of 1 (true) if the physical file is successfully assigned and 0 (false) otherwise. If the new file cannot be created or opened, the batch application will terminate.