FSLETTER Procedure Windows |
The FSLETTER procedure provides two ways to print documents:
noninteractively. When you use the DATA= option in the PROC FSLETTER statement, or the ALL or DATA= options in the SEND command, the procedure prints copies of a document for each observation in a SAS data set. In this case, no windows are opened.
interactively. When you use the SEND command without the ALL or DATA= options, the procedure opens the FSLETTER SEND window. In this case, you can enter and edit field values manually, and you can make final editing changes before the document is printed.
Printing documents from the FSLETTER SEND window is a two-step process:
Fill in the fields in the document.
Perform final editing and release the document.
The rest of this section explains how the FSLETTER SEND window is used to prepare documents for printing.
Step 1: Filling Fields |
Note: If your document does not contain fields, go directly to step 2.
During this step, you can enter text only in the fields; all other text is protected. As you fill in each field, press the ENTER key to position the cursor at the beginning of the next field. If you fill a field, the cursor moves automatically to the next field.
Note: You cannot enter an underscore as part of the field value, because the FSLETTER procedure uses underscores as field pad characters. If you type an underscore as part of the field value, it is removed when the FSLETTER procedure processes the field value (when you press the ENTER key). This restriction is not applicable to fields that are filled noninteractively (from a SAS data set).
If a data set is open when you open the FSLETTER SEND window, the fields in the document are automatically filled using the values from the data set. If the data set was opened by the DATA command, the values come from the first observation in the data set. If the data set is open because the FSLETTER session was invoked from the FSBROWSE or FSEDIT windows, then the values come from the observation that was displayed in the FSBROWSE or FSEDIT window when you entered the FSLETTER session.
The FSLETTER SEND window uses the SAS text editor. In the first step of sending a document, you can use any of the text editor commands described in the online Help for Base SAS software as well as the global commands described in SAS/FSP Software Global Commands, plus the following commands:
closes the FSLETTER SEND window without printing the document and returns you to the previous FSLETTER window, or to the Explorer window if no other FSLETTER windows are open. Use the CANCEL command if you decide after opening the FSLETTER SEND window that you do not want to print the document.
enters the final editing step of the printing process.
Step 2: Final Editing |
At the beginning of this step, any field attributes that you assigned earlier take effect. For example, fields that have the attributes LASTNAME and DEAR are rearranged, any flowing that you specified is done, and unused underscores are deleted from fields. All text in the FSLETTER SEND window is unprotected; you can type over any part of the document--field values as well as text.
In this step you can make any final editing changes that are required for the document. Changes that you make in the FSLETTER SEND window are not recorded in the stored copy of the document.
When you are ready to print the document, issue the END command again. The document is sent, and you return to the previous FSLETTER window, or to the Explorer window if no other FSLETTER windows are open.
By default, the document is sent to the destination that is specified in the form associated with the document. To route the output to an external file, use the PRTFILE= option in the PROC FSLETTER statement, the PRTFILE command in the FSLETTER window, or the FILE= option in the SEND command.
Note: If you want to route output to an external file, you must select the output file before you enter the FSLETTER SEND window. Once you open the FSLETTER SEND window, you cannot use the PRTFILE command to change the output destination for the current document.
In the second step of sending a document, you can use any of the commands described in step 1. However, in step 2 the END command performs different actions:
closes the FSLETTER SEND window, sends the document to the specified printer or file, and returns to the previous FSLETTER window, or to the Explorer window if no other FSLETTER windows are open.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.