• Keine Ergebnisse gefunden

CREATING NULL LINES - EDITOR

Im Dokument The Picl(System (Seite 118-123)

TYPE II VERB The type II verbs

1 AAAA 2 BBBB

4.10 REPLACING DATA: REPLACE (R) COMMAND

4.10.3.4 CREATING NULL LINES - EDITOR

As discussed in the topic describing the Input command, the Replace command may be used to create null lines. This is accomplished by using the Input command to create lines each containing a fill character (such as an "."), and then prior to permanently filing the item replace each fill character with & null via a Replace command (such as R99/.//).

CHAPTER 4 - EDITOR Copyright (c) 1985 PICK SYSTEMS PAGE 106

EXAMPLES:

Consider the following line.

064 The difference between the beginning and ending

To reI ace 2nd "the" with "any"

C [CR]

1 2 3 4 6

1234667690123466769012345676901234567690123456769012345

Useful a.id for column identificat1on.

R/the/any/24 [CR] which will yield:

064 the difference between any beginning and ending A column range example:

R/the/any/24-26 [CR]

064 the difference between any beginning and ending

R5/XYZ/123/15 [CR]

RU7/XX/77/20-50 [CR]

Further unrelated examples:

Replace first occurence of string

"XYZ" after column 15 for the next 5 lines.

Replace all occurences of "XX"

between columns 20 to 50 for the next 7 lines.

Sample usage of column specifications with the replace command.

CHAPTER 4 - EDITOR Copyright (c) 1965 PICK SYSTEMS PAGE 106

4.11 ITEM HANIPULATIl\JG - EDITOR

: Ed1tor comm&nds &re prov1ded for merg1ng upd&tes 1nto the 1tem, f1l1ng the:

: 1tem, delet1ng the 1tem, or ex1t1ng &n 1tem.

4.11.1 "F" COMMAND - EDITOR FOBMAT:

F

The F comm&nd toggles the funct10n of the EDITOR buffers. Upd&tes &re merged w1th the prev10usly ex1sting 1tem, &nd the current l1ne po1nter is set to zero.

4.11.2 "FI" - FILE ITEM COMMAND EDITOR FOBMAT:

FI{K} or

FI{K}{O} 1temn&me or

FI{K}{0}({DICT}f1len&me {1temn&me}

The F1le Item comm&nd upd&tes the ed1ted 1tem to the d1sc-f1le &nd returns control to TCL. When the 1tem h&s been filed, the mess&ge "xxxx FILED"

(where xxxx 1s the 1tem n&me) 1s pr1nted.

You m&y f1le the 1tem currently be1ng ed1ted to e1ther & d1fferent 1tem 1n the current f1le, or to the s&me 1tem n&me or to & different 1tem n&me 1n

& d1fferent f1le, by us1ng the complex form of the "FI" comm&nd. Note the de11m1ter (sp&ce or left p&renthes1s) must 1mmed1&tely the "FI". Use &

bl&nk &s & de11m1ter when only the 1temn&me 1s spec1f1ed. The def&ult 1s the currently edited file. Any item-ids with embsdded bl&nks m&y be enclosed in p&renthes1s. The DICT or f1len&me, if present must immedi&tely follow the left p&renthes1s, (no bl&nks). A copy of the edited item 1s gener&ted to the des1gn&ted file, &nd &n upd&ted version of the currently ed1ted 1tem is ccp1ed to the d1sc. Control is returned to TCL unless & seleoted list is in effect, in which c&se the next 1tem is entered. The "K" opt1on will c&ncel &ny selected list in effect &nd return control tc TCL or & c&lling Proc. The "0" option will overwrite

&ny 1tem w1th the s&me n&me &s the item we h&ve 1nstructed the Editor to gener&te, if it &lre&dy ex1sts in the design&ted f1le.

4.11.3 "FS" - FILE SAVE COMMAND EDITOR FOBMAT:

FS or

FS{O} 1temn&me or FS{0}(f1len&me {itemn&me}

CHAPTER 4 - EDITOR Copyr1ght (c) 1985 PICK SYSTEMS PAGE 107

The File Save command updates the edited item to the disc-file and returns control to the EDITOR. The current line pOinter is set to zero.

You may file the item currently being edited to either a different item in the current file, or to the same item name or to a different item name in a different flle, by using the extended syntax forms of the "FS" command.

The "FS" command generates a copy of the item being edi ted to the designated file, updates the currently edited item, and returns control to the Editor. The "0" option would overwrite any pre-existing item in that designated file. Once again note the blank used as a delimiter with itemname only, and the need to put DICT or the filename immediately following the left parenthesis, which immediately follows the "FS" in extended forms of the command.

4.11.4 "FD" - FILE DELETE ITEM EDITOR FORMAT:

FD{K)

The File Delete command deletes the item from the disc-file and returns control to TCL.

When the item has been deleted, the message "xxxx DELETED" (where xxxx is the item name) is printed. You can not FD any item other than the one which you are currently editing. Massive use of the FD can be accomplished with the DELETE verb (PROC) or by the use of a prestore command. The delete verb will be faster.

The "K" option returns control to TCL or a calling Proc, before any remaining selected items need be edited.

4.11.5 "EX" - EXIT COMMAND EDITOR FORMAT:

EX[K)

The Exit command terminates the EDITOR session and returns control to TCL.

The item being edited will not be updated to the disc-file. Upon exit, the message "'ITEM-ID' EXITED" is printed.

The user should again note that if multiple items were specified in the EDIT verb at the TCL level, then any of the above commands which ordinarily return control to TCL will instead return control to the EDITOR to edit the next item whi'ch was specified.

The purpose of the "EXK" command is to exit from just such a situation, and to cause the editing process to proceed to TCL or the PROC which called the EDITor. The exit process will not recognize a lowercase 'k'.

NOTES: In general, anything which the EDITOR either does not understand or of which the EDITOR disapproves will result in CMND? Error message when the FI, FS, or EX processes are involved.

CHAPTER 4 - EDITOR Copyright (c) 1985 PICK SYSTEMS PAGE 108

• )ED AFILE ABC [CR]

Sample Usage of Item Manipulating commands.

CHAPTER 4 - EDITOR Copyright (0) 1985 PICK SYSTEMS PAGE 109

Im Dokument The Picl(System (Seite 118-123)