![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Both the source and the dest tables must be defined as text tables (that is, a table that you can edit with the Text Editor, TED). The text table can be parameterized, and it must contain the following two fields:
A primary key field with a length of 4, a syntax of B (binary), and a semantic type of I (identifier). A field with a syntax of V (variable-length character string) and a semantic type of S (string).SCRIPT CommandsThis section lists and describes the commands you can use to control the presentation of your text. The commands are divided into three categories:
Formatting commands Page layout commands Convenience commands Provides services that would require several commands to accomplish or adds extra features to the formatter.
Formatting Commands
.br or .break Forces a break in the formatting. A break forces whatever is currently in the line to be emitted and a new line to start immediately. Several other commands (for example, .skip) cause breaks to occur. .bc chars Characters specified with the .bc command become the bullet characters. You can specify up to two characters. Places a bullet before the text. The default bullet is ->. Specify a space (or a period) after the command and then the text that you want to appear after the bullet. Uses the option on to turn concatenation on; use the option off to specify no concatenation. Normally, concatenation is on, which specifies whether to join input lines to fit the specified line length. When concatenation is off, the input lines are placed unchanged, starting at the left margin. Input lines too long to fit are truncated. This command is useful for creating diagrams, for example, where you want the text to appear as you enter it. Uses the option on to format the input text; uses the option off to specify a pass-through mode that copies the source exactly. .in # or .indent # Indents the text # spaces from the left margin. An indent of 0 causes the text to begin at the left margin. Starts a new paragraph. The command .p is the Waterloo GML tag, and .pp is the Waterloo script primitive. To use with GML, a period '.', not a blank, must delimit the text. .pa or .page .pn {on|off|#} Uses the on option to number the current page, the off option to turn page numbering off, or a number for the # variable to specify a page number. Begins a new paragraph. At least one line is left blank and the text is indented five spaces on the first line of the new paragraph. Specify a space (or a period (.)) after the command and then the text that you want in the paragraph. Page Layout CommandsThe following commands specify the layout of material on the page. You can use them repeatedly in a document, although it is unlikely you would use the .setup command more than once.
Adjusts the left margin # spaces from the edge of the page. Sets the top margin to have # lines. Sets the bottom margin to have # lines. .imbed tablename Causes the specified table to be used as the source of text. When all the text is formatted, SCRIPT continues formatting with the line immediately after this command. Embedded tables can also contain imbed commands. The tablename can contain parameters or can be the second parameter of the @TEXT table. Right justifies to the right margin if the option on is set; turns right justification off if the option off is specified. Sets the line length to # characters.To use this command after an initial line length is set up, it is first necessary to give the command .br and then the new .ll command. The right margin is the adjust plus the line length characters from the edge of the page. Sets the line spacing to #. The command .ls 1 is equivalent to .single and .ls 2 is equivalent to .double; however, you can use any positive integer. Sets the page length to # lines. The page length must include the lines used for the top and bottom margins. .pn {on|off|#} on – Turns page numbering onoff – Turns page numbering off. The special character percent sign (%) in title strings, which the setup determines, positions page numbers in the margins. Title strings that contain this character do not print if page numbering is off. This differs from Waterloo Script, which suppresses only the particular string “page %”.# – Sets the number of the current page to whatever you specify for #. When the number is at the top of the page, it must be reset before the start of the new page .setup setupname Invokes a setup that specifies page details and other options. Refer to TEXTSETUP for more information on creating custom setups. TIBCO Object Service Broker provides the following setups:Default is in effect whenever formatting begins and if no setup is specified. It turns formatting off and sets the page setup to suit the document handler. Therefore, SCRIPT passes through the old documentation and new documentation containing the .format command with the option on is formatted to fit the document handler screen.Screen sets a larger page size, intended to fill a screen.Help sets a page without a page number and is used by the Screen Definer to display both field and screen-level help.Print sets a page that can print in portrait form through the use of a print function that you provide later. Convenience CommandsThe following commands provide services that would require several commands to accomplish or add extra features to the formatter. There are five types of convenience commands:Heading CommandsHeading commands produce consistent headings. Type a space (or a period) after any of these commands and then any text that you want in the heading. The heading commands are:
Begins a list and sets the type of the list. Depending on which variable you specify for char, the following lists occur:# - Ordered listt - Definition list. The terms of the definition list are specified by .term commands and the definitions of the terms are specified by the items following each term.Any other characters – An unordered list using the specified characters as the bullet that marks each item Identifies an item placed in a list. The text of the item is always indented and separated from other items by at least one blank line. Type a space (or a period) after the .item command and then the text of the item.In an unordered list, the specified bullet character precedes each item.In a definition list, an item provides the definition for a preceding term, which is identified by a .term command. The item appears below and to the right of the term it defines. Identifies a term In a definition list. The term cannot extend more than one line. Type a space or a period after the .term command and then the text of the term. The term is defined by the text associated with the .item command that follows it. The following commands also produce ordered, unordered, and definition lists, which can be nested, and are compatible with GML if they are preceded by a colon (which is interchangeable with a period in SCRIPT), or if a period precedes the text.
The named table is printed into the output. The tablename can include parameters and it must be a table, not only a parameter of the @TEXT table. A list of fields of the table can follow the tablename. If this list is present, only the fields in the list are printed and appear in the order they are named. Otherwise, all the fields, up to one line, are printed. Fields that cannot fit into the line are left out.Note Printing a table is not the same as embedding it. This command invokes rules from the Table Printer tools (PRINTTABLE and TABLEPRINT). The table prints into the output; SCRIPT does not format it.You use these commands to place text within a box. The box commands are often used with the concatenate commands, .co{on|off}, to give the user more control over the layout of text within the box.
This command begins a box to enclose the text that follows. This box differs from either the Waterloo Script or the GML box commands. The box is drawn as wide as the existing margins and then the margins inside the box are moved closer together so that all the text fits within it. After the completion of the box, the margins are restored. Either the colon or the period is acceptable as the first character of the command.Note A box can continue from one page to the next. If necessary, you can use commands, such as .sk (skip) and .p (page), to make the box fit on one page. The text within the box can contain almost any other command. End the box. The end of the box is drawn and the margins restored to their values before the box was started. Either the colon or the period is acceptable as the first character of the command.Text Shifting Commands
Centers the text on the line. The text must not extend more than the line length. Type a period instead of a space before the text to use this command with Waterloo Script. Prints text centered and in uppercase. The text must not extend more than the line length. Type a period instead of a space before the text to use this command with Waterloo Script.The following rule formats text and Script commands in the @TEXT(USERNAME,SCRIPTINPUT) table and puts the formatted text in the SCRIPTOUTPUT table:
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |