Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : TED

TED
Displays a table for text editing. (E)
Invocation
Do one of the following:
Type TED(text_input) <Enter>
Type EX TED(text_input) <Enter>
Where:
 
Usage Notes
If you do not supply a value for text_input, executing TED displays a screen prompting for a value.
After TED is invoked, a table appears for text editing. If a string is supplied, TED displays the table @TEXT(userid,name). If a table name is typed, TED displays the table.
The table named in text_input must be a text table. A text table can be parameterized and it must contain the following two fields:
A field with a syntax of V (variable-length character string) and a semantic type of S (string).
Line Commands
The following line commands are available:
Inserts after this line. This inserts a new blank line on the screen. Another line is inserted each time you press Enter, as long as the cursor is on the previous line. Using TED you can insert blank lines.
Splits this line. The line splits where the cursor is positioned. This command is not sensitive to tokens. Words can be split.
If A or B marks the destination for a move or copy command, the marked destination is used. Otherwise, the destination is assumed to be after the line where the cursor is placed.
Primary Commands
A command line exists at the top of both the formatted and unformatted screens. The primary command line accepts the following primary commands (except where noted otherwise):
 
CH or CHANGE old new [ALL]
The first occurrence of string old after the cursor position is replaced with the string new. If the option ALL is included, every string after the cursor changes. Tokens, indicated by spaces (' '), must separate strings in the command. This separator token must appear three times on the command line. This command is sensitive to case.
COPY (source)
Copies text from an existing text table into the document already on the screen. The source can be one of:
2 – Before or after a line containing B (before) or A (after) in the line command field.
The entire text is deleted from the database. You are prompted to confirm the deletion. This command is valid only on the unformatted text screen.
F or FIND string
The first occurrence of string after the cursor is located and highlighted. This command is sensitive to case.
SAVE (tablename)
Saves the text without leaving TED. If no tablename is given, the source table is overwritten. tablename follows the conventions of TED’s argument and can be a name or a table. Using this command, you can make a copy of your text by saving it under a new name.
PF Keys
The following PF keys are recognized by TED:
PF22 is available only from the unformatted version of the text.
Example
The following application uses TED to write notes about employees. The initial application screen is EMPLOYEE_SCR_B, which contains the scrollable screen table EMPLOYEE_NAME:

 
Date: 2000-03-17 Employees by Region
Employee Name Employee#
_________________________ _________
 
_ DRABEK 22001
_ ROEDER 22007
_ HOEGSON 30058
_ TERAMURA 34111
_ LEES 34121
_ MORANG 36162
_ CROFTON 41001
_ STEVENSON 41007
_ SMITH 41009
_ SOUZA 44385
_ SAUNDERS 44622
_ HRODEK 51111
_ CANNON 51121
_ KIMURA 51162
_ WONG 61219
 
 
 
FCNKEYS: 2=GET INFO 12=EXIT 4=NOTES

 
MAKE_NOTE Rule
When you type an S in the selection field beside the employee name and press PF4, the following rule is executed:

 
RULE EDITOR ===> SCROLL: P
MAKE_NOTE;
_ LOCAL EMP;
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ GET EMPLOYEE_NAME('EMPLOYEE_SCR_B') WHERE SELECT = 'S'; | 1
_ EMP = EMPLOYEE_NAME.EMPNAME; | 2
_ CALL TED('EMP_NOTES(' || EMP ||')'); | 3
_ ---------------------------------------------------------------------------

 
Table for Editing
This rule displays the following table (in this case the table is for employee ROEDER and contains previously entered text, including SCRIPT commands):

 
Text Editor ====>
Scroll: P
Editing: EMP_NOTES(ROEDER)
_ ----------------------------------------------------------------------------
_ Responsible for:
_ .ul.
_ .li.Performing site assessment
_ .li.Writing proposal
_ .li.Presenting proposal to board of directors
_ .eul.
_ Due Date for activities: Sept. 13
 
 
 
 
 
 
 
 
 
 
 
PFKEYS: 12=CANCEL 22=DELETE 3=SAVE 5=SCRIPT 9=REPEAT CMND

 
Scripted Text
Pressing PF5 from this screen displays the scripted text:

 
Formatted Output
Command ====> Scroll: P
page 1
Responsible for:
-> Performing site assessment
-> Writing proposal
-> Presenting proposal to board of directors
Due Date for activities: Sept. 13
 
 
 
PFKEYS: 12=CANCEL 13=PRINT 3=SAVE 5=EDIT 9=FIND NEXT

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved