Previous Page | Next Page

FSLETTER Procedure Windows

Assigning Field Attributes

After entering the document text and defining variable fields, you can use the FSLETTER ATTR window to assign attributes to each field. Use the ATTR command in the FSLETTER window to open the FSLETTER ATTR window. Although you assign field attributes while editing the document, the attributes do not take effect until the second step of the printing process.

The FSLETTER ATTR window is partitioned into a series of frames. Each frame contains the field attributes for a particular field. The attribute frames are displayed in the order in which the fields appear in the document. If the same field name is used more than once in the document, each occurrence has a separate attribute frame. Sample Field Attribute Frame shows a sample field attribute frame.

Sample Field Attribute Frame

[Sample Field Attribute Frame]

Use the FORWARD and BACKWARD commands to move among the attribute frames for the document.

The attributes for each frame are choice groups. To turn on an attribute for a field, move the cursor to the term in the attribute frame that corresponds to the desired attribute; then press ENTER. The term is highlighted in reverse video to show that it is turned on. To turn off a currently selected attribute, move the cursor to the highlighted term and press ENTER. The highlighting is removed to show that the attribute is turned off.


Field Attribute Descriptions

The following attributes can be assigned in the FSLETTER ATTR window. All of the attributes except Right Justify take effect when you enter the second phase of printing a document (see Printing Documents). The Right Justify attribute takes effect after you enter a value into the field.

DEAR

modifies the field value by excluding all but the first and last elements of the value.

To assign this attribute, move the cursor to the DEAR item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

This attribute converts names in the form title first-name last-name into title last-name for use in the salutations of letters. For example, if the name Mr. John E. Doe is entered in a field to which the DEAR attribute is assigned, the field value is converted to Mr. Doe when the document is printed.

Note:   The DEAR attribute does not automatically provide the Dear element of the salutation. You must provide that in text:

Dear &NAME____________________:
  [cautionend]

The DEAR attribute can be used in conjunction with the LASTNAME attribute. If the LASTNAME and DEAR attributes are both assigned, the LASTNAME attribute is processed first so that the field value is in the proper order for the DEAR attribute.

DELETE

deletes the line that contains the field if the line is blank when the letter is printed.

To assign this attribute, move the cursor to the DELETE item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

Assign the DELETE attribute if it is possible that one or more observations will not have a value for the field or if the field might not be needed for a particular document. For example, some letters require more address lines than others. Suppose your document provides three fields for the address. Some letters require only two address lines, so you can assign the DELETE attribute to the last address field. If the field is blank, the FSLETTER procedure deletes the line allotted for the field when the letter is printed. If you do not assign the DELETE attribute to the field, a blank line appears in its place when the letter is printed.

FLOW AFTER

removes extra spaces beginning with the first character that follows the field and ending with the first blank line after the field. If the field ends the line and paragraph, then any following blank lines between the line that contains the field and the next nonblank line are removed.

To assign this attribute, move the cursor to the FLOW AFTER item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

FLOW BEFORE

takes out extra spaces beginning after the last nonblank character that precedes the field and ending with the first blank line after the field. If the field starts the line, then any preceding blank lines between the line that contains the field and the previous nonblank line are removed.

To assign this attribute, move the cursor to the FLOW BEFORE item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

FLOW LINE

takes out extra spaces beginning after the last nonblank character that precedes the field and ending with the end of the line that contains the field.

To assign this attribute, move the cursor to the FLOW LINE item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

LASTNAME

modifies the field value by moving the first element of the value that is followed by a comma to the end of the value.

To assign this attribute, move the cursor to the LASTNAME item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

This attribute is used with fields that contain names in the form last-name, first-name. Since records are often kept by last name, this attribute is helpful when you are using a SAS data set to fill in field values. For example, if the LASTNAME attribute is assigned to a field, and the value entered in the field is Doe, Mr. John E., then the value printed in the document is Mr. John E. Doe.

Note:   The LASTNAME attribute has no effect if the field value does not contain a comma. Thus, you can still enter values in the normal order in fields to which the LASTNAME attribute has been assigned.  [cautionend]

REQUIRED

indicates that the field must be filled in before you can leave the first step of the printing process.

To assign this attribute, move the cursor to the REQUIRED item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

You must use the CANCEL command to end the first printing step without supplying a value for a required field.

RIGHT JUSTIFY

indicates that the field value should be right-aligned in the space that is reserved for the field. By default, values for numeric variables are right-aligned. Values for character variables are left-aligned, unless the character variable has the $CHAR format or informat and the value has leading blanks (leading blanks are retained with this format).

To assign this attribute, move the cursor to the RIGHT JUSTIFY item and press ENTER. The item is highlighted in reverse video. To turn off the attribute, move the cursor to the highlighted item and press ENTER.

SAS variable aliases

specifies the name of the variable from a SAS data set that is used to fill in the field. You can assign up to two aliases for the field name. The field name is automatically assigned as the first alias (unless the field name is a SAS automatic variable).


FSLETTER ATTR Window Commands

In addition to the global commands that are described in SAS/FSP Software Global Commands, you can use the following commands in the FSLETTER ATTR window:

Scrolling

BACKWARD
BOTTOM
FORWARD
HSCROLL HALF | PAGE | n
LEFT <HALF | PAGE | MAX | n>
RIGHT <HALF | PAGE | MAX | n>
TOP

Searching

BFIND <character-string | 'character-string'>
BLOCATE <value | 'value'>
BLOCATE: <partial-value | 'partial-value'>
FIND <character-string | 'character-string'>
KEYFIELD <field-name >
LOCATE <value | 'value'>
LOCATE: <partial-value | 'partial-value'>
RFIND
RLOCATE

Closing the Window

CANCEL
END

Command Descriptions

Here are descriptions of the FSLETTER ATTR window commands:

BACKWARD

displays the attribute frame for the previous field.

BFIND <character-string | 'character-string'>

searches backward for the specified character string in the field that was identified in the KEYFIELD command. If the search string contains special characters, embedded blanks, or lowercase characters, enclose it in quotes.

Unlike the BLOCATE command, the BFIND command looks for the string anywhere in the field, not just at the beginning.

To search forward from the cursor position toward the bottom of the window rather than backward toward the top, use the FIND command.

To search backward for the character string specified in a previous BFIND or FIND command, use the BFIND command without arguments.

BLOCATE <value | 'value'>
BLOCATE: <partial-value | 'partial-value'>

searches backward for the specified value in the field that was identified in the KEYFIELD command. If the search string contains special characters, embedded blanks, or lowercase characters, enclose it in quotes.

The BLOCATE command searches only for an exact match. To specify only the first part of a value, use the BLOCATE: command. To search for a match in any part of the value instead of just at the beginning, use the BFIND command.

To find the next occurrence of the specified value, use the RLOCATE command. To search forward from the cursor position toward the bottom of the window rather than backward toward the top, use the LOCATE command.

BOTTOM

displays the attribute frame for the last field in the document.

CANCEL

closes the FSLETTER ATTR window without recording any changes to the previous field attribute settings.

END

closes the FSLETTER ATTR window and records any changes that you made to field attribute settings while the window was open.

FIND <character-string | 'character-string'>

searches for the specified character string in the field that was identified in the KEYFIELD command. If the search string contains special characters, embedded blanks, or lowercase characters, enclose it in quotes.

Unlike the LOCATE command, the FIND command looks for the string anywhere in the field, not just at the beginning.

To find the next occurrence of the specified string, use the RFIND command. To search backward from the cursor position toward the top of the window rather than forward toward the end, use the BFIND command.

FORWARD

displays the attribute frame for the next field.

HSCROLL HALF | PAGE | n

specifies the default horizontal scroll amount for the LEFT and RIGHT commands. Specify one of the following scroll amounts:

HALF

scroll by half the window width.

PAGE

scroll by the full window width.

n

scroll by the specified number of columns.

KEYFIELD <field-name>

identifies the field that is searched when you next issue a FIND, LOCATE, BFIND, or BLOCATE command. Indicate the field you want to search either by supplying the field name as an argument in the KEYFIELD command or by typing KEYFIELD on the command line, positioning the cursor on the desired field, and pressing ENTER.

For example, to search for all the entries named RENEWAL in the Name field of the Explorer window, you must first identify Name as the field you want to search. Type KEYFIELD on the command line, position the cursor anywhere on the Name field, and press ENTER. Then issue the following command to locate the first entry in the catalog that has the name RENEWAL:

locate renewal

To display the current key field value on the window's message line, use the KEYFIELD command without arguments.

LEFT <HALF | PAGE | MAX | n>

scrolls the window horizontally by the specified amount. The following scroll amounts can be specified:

HALF

scrolls by half the window width.

PAGE

scrolls by the full window width.

MAX

scrolls to the left margin of the window.

n

scrolls by the specified number of columns.

If you do not explicitly specify a scrolling increment, the default increment is the amount specified in the HSCROLL command. The default HSCROLL amount is HALF.

LOCATE <value | 'value'>
LOCATE: <partial-value | 'partial-value'>

searches for the next occurrence of the specified value in the field that was identified in the KEYFIELD command. If the search string contains special characters, embedded blanks, or lowercase characters, enclose it in quotes.

The LOCATE command searches only for an exact match. To specify only the first part of a value, use the LOCATE: command. To search for a match in any part of the value instead of just at the beginning, use the FIND command.

To find the next occurrence of the specified value, use the RLOCATE command. To search backward from the cursor position toward the top of the window rather than forward toward the end, use the BLOCATE command.

RFIND

repeats the most recent FIND command, locating the next occurrence of the character string.

RIGHT <HALF | PAGE | MAX | n>

scrolls the window horizontally by the specified amount. The following scroll amounts can be specified:

HALF

scrolls by half the window width.

PAGE

scrolls by the full window width.

MAX

scrolls to the right margin of the window.

n

scrolls by the specified number of columns.

If you do not explicitly specify a scrolling increment, the default increment is the amount specified in the HSCROLL command. The default HSCROLL amount is HALF.

RLOCATE

repeats the most recent LOCATE or BLOCATE command, locating the next occurrence of the value.

TOP

displays the attribute frame for the first field in the document.

Previous Page | Next Page | Top of Page