广告
广告
SPECIAL FORM
SPEC
IAL FORM SF_name
Y
SF N
[
/W
]
creates a new special form or runs an existing special form.
arguments
SF_name the name of a special form file.
Y sends the form output to the spool file. This is the same as responding Y to the OUTPUT TO PRINTER (Y
OR N)?> prompt at the end of the form definition dialog.
N displays the form output at your terminal. This is the same as responding N to the OUTPUT TO PRINTER (Y
OR N)?> prompt at the end of the form definition dialog.
/W causes the display of your form to pause the first time your screen is full. This is used only with the N option.
When you use the /W option, INFO gives you a MORE?
prompt at the bottom of your screen. Responses to the
MORE? prompt are:
<RETURN> to display the next screen of the special form.
The display stops when either the screen is full or you come to the end of a form. INFO prompts you with MORE?
again.
Y (yes) to display the rest of the report with no pauses.
N (no) to file the report with no further display and return you to the ENTER COMMAND> level.
note discussion
n
An unqualified SPECIAL FORM allows you to create a special form that will not be saved.
n
INFO produces one page of output for each selected record, formatted as specified in the special form.
n
INFO-Text A-type items cannot be specified in special form definitions.
With this command, you can create customized forms for each selected record. A special form describes a page of displayed or printed information that comprises items, literals, or the results of arithmetic expressions. You define
INFO Reference Manual Commands 493
SPECIAL FORM
Defining a special form
the size of the page during the definition dialog, along with information about executing an existing form. Separate discussions for defining and executing a special form follow below.
When you specify SPECIAL FORM, INFO initiates a dialog that prompts you for a description of the page layout for the form. This description includes information about the size of the page, what data is to appear on the page, and where it is to appear.
To begin a special form definition dialog, enter the command SPECIAL FORM with the name of the new form or without a form name. If you do not include a name for the special form, INFO does not save the form when the command is finished. To establish the size of the page for the special form, INFO returns with the following prompt:
LINES PER PAGE>
COLUMNS PER LINE>
Respond to the LINES PER PAGE> prompt with a number from 1 to 1200. Respond to the COLUMNS PER LINE> prompt with a number from 1 to 200.
For each special form line, INFO prompts:
ENTER LINE DEFINITION>
Respond to these prompts by entering line definitions. To end the definition dialog, enter <RETURN> after any
ENTER LINE DEFINITION> prompt. A <RETURN> after the first such prompt returns you immediately to ENTER
COMMAND > level.
To define a special form line, enter definitions in the following format:
line,column,content [,width [,decimals]]
,D
Line and column identify the position at which the content appears on the page.
494 Commands INFO Reference Manual
SPECIAL FORM
Specifically, line can be a value from 1 to the value you gave in response to the LINES PER PAGE prompt, with 1 corresponding to the top-most line on the page, and the value you gave corresponding to the last line of the form.
Column can be a value from 1 to the value you gave as
COLUMNS PER LINE, with 1 corresponding to the leftmost position on the page, and the value you gave corresponding to the right-most position.
Both line and column specifications can take the form of a constant (eg. 4), a data item name (eg. COL-CONTROL), or a system variable (eg. $NUM2).
Content defines the information to be located at the specified line and column. Content can be specified as a literal, an arithmetic expression, or an item, as described below:
1) A 'literal' appears on the page exactly as defined. Specify a literal as text enclosed in single quotes. To embed a quote within the text, use two successive quotes (e.g.,
'YESTERDAY''S PRICE').
2) An 'arithmetic expression' evaluates to a value at runtime that is to be displayed on the page. (See 'Building
Expressions' for a complete discussion of the rules for constructing a valid expression.)
3) An 'item' refers to data item, system item, or system variable whose value is displayed on the page at the line, column location. You can use any data item from a currently selected related file.
Width defines the ouput width of the content field. The default for this field is the default or formatted OUTPUT
WIDTH for the item or system variable; or 12 spaces for an arithmetic expression.
INFO Reference Manual Commands 495
SPECIAL FORM
Executing a special form
Decimals is an integer that defines the number of decimal places for the associated content. It applies only for numeric contents and requires the preceding width specification. Its default value is 2 for calculated values, and the defined or formatted DECIMAL PLACES characteristic for other items..
D formats the content into a date (D-type) and is valid only when the content is an arithmetic expression involving dates. When processing a date, INFO-Text assumes the result is a numeric value (a number of days) unless you include the D option to specify a date result. When D is specified, the content-width is required and is generally specified as 5, 8, or 10.
When you end the line definition dialog, INFO prompts:
DO YOU WISH TO EXECUTE THIS FORM (Y OR N)>
Respond with Y (yes) to begin execution of the form.
Respond with N (no) or <RETURN> to save the special form if named and return to ENTER COMMAND > level.
You can execute a special form immediately following its definition as described above, or at any other time by entering a SPECIAL FORM command, the name of an existing form and any appropriate run-time options. INFO produces one page of output for each selected record, as specified in the special form.
If you do not include the Y, N, or N/W option when you issue the SF command, INFO prompts you with:
OUTPUT TO PRINTER (Y OR N)?>
Respond with Y (yes) to direct INFO to send the output of the special form to your spool file. Respond with N (no) to display the output of the form at your terminal. You can also include the optional specification /W to cause the terminal display to pause when the screen is full.
496 Commands INFO Reference Manual
广告