Editors > Editor Reference > Editor Commands > FI (File)

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

FI - File (Editor) (m618503+fi.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

FI - File

Files the edited item (optionally to another item-id and/or file), and then returns control to TCL, or passes control to EDIT of the next item in a list (unless the K option is used to kill the list).

Caution

When using this command, you need to be aware of the effects of any file triggers that might be run as consequence. See File Triggers for more information.

Syntax

FI{K}{O} { (file-specifier} {item-id}{)}

Syntax Elements

K indicates that you wish to terminate ('kill') the item list.

O indicates that you wish to overwrite an existing item with the same item-id. You only need to specify O if writing to another item or file (if writing to the current item and file, overwrite of any existing item is automatic).

(file-specifierspecifies write the item to another file (not the one used with the EDIT command). The item of the same name in the original file is not changed.

Note: A file specifier must be identified by an open parenthesis preceding it.

item-id is a new name for this item, within the current file if file-specifier is omitted, otherwise within the specified file. Omit if you want to use the existing item-id for the item within the current or alternative file.

How to Exit From an Item List

To terminate a multiple item EDITing session after you file an item but before you reach the last item in the list, use the FIK command.

Message for a Filed Item

When the item has been filed, the following message is displayed:

'item-id' filed in file 'file-name'.

Example 1 - FI

:ED INV 12-345
Top
.P
001 AAA
002 BBB
003 CCC
EOI 003
.I
003+DDD
003+
.FI
'12-345' filed in file 'INV'.
Edit contents of item 12-345 in the INV file.






Insert new data in the item.


File item 12-345 in the INV file.

Example 2 - FI

:ED INV 12-345
Top
.P
001 AAA
002 BBB
003 CCC
004 DDD
EOI 004
.FI (CUSTOMER 12-345A
'12-345A' filed in file CUSTOMER'.
Edit contents of item 12-345 in the INV file.







File as 12-345A in the CUSTOMER file.

Example 3 - FI

:ED INV 12-345
Top
.P
001 AAA
002 BBB
003 CCC
004 DDD
EOI 004
.FI (CUSTOMER 12-345A
Item exists!


Item 12-345 as it exists in the INV file.





Attempt to write item 12-345A in the CUSTOMER file not allowed because an item of the same name already exists in the CUSTOMER file.

Example 4 - FI

:ED BP DATA.BASIC
Top
.P
001 IF '' = 0 THEN PRINT 'CASE 1'
002 IF '' < 0 THEN PRINT 'CASE 2'
003 IF '' > 0 THEN PRINT 'CASE 3'
004 IF '0' = 0 THEN PRINT 'CASE 4'
005 IF '0' = '00' THEN PRINT 'CASE 5'
006 IF '' = '00' THEN PRINT 'CASE 6'
007 IF '01' = 1 THEN PRINT 'CASE 7'
008 IF '01' = '1' THEN PRINT 'CASE 8'
009 IF '0' < '00' THEN PRINT 'CASE 9'
010 END
.FI DATA.BASIC.2
'DATA.BASIC.2' filed in file 'BP'.
Edit the item 'DataBasic' in the BP file.
















File the item under a new name in the same file.

Example 5 - FIK

:ED INV 12-111 12-112 12-113
12-111
Top
.P
001 123
002 234
003 345
EOI 003
.I
003+456
003+
.FIK
'12-111' filed in file 'INV'.
Edit items '12-111', '12-112', and '12-113' in the INV file.










File item '12-111' and kill the item list.

Example 6 - FIK

:ED INV 12-345 12-346 12-347
'12-345'
Top
.P
001 AAA
002 BBB
003 CCC
EOI 003
.FIK (CUSTOMER 12-345A
'12-345A' filed in file 'CUSTOMER'.
Edit items '12-345', '12-346', and '12-347' in the INV file.

List contents of item 12-345 in file INV, the first item in the list.



File the item into the CUSTOMER file, then kill the item list.

Example 7 - FIO

:ED INV 12-111 12-112 12-113
12-111
Top
.P
001 123
002 234
003 345
EOI 003
.I
003+456
003+
.FIO (CUSTOMER 12-111
'12-111' filed in file 'CUSTOMER'.
12-112
Top
.P
001 321
002 432
003 543
EOI 003
.I
003+654
003+
.FIK
'12-112' filed in file 'INV'.
Edit item 12-111 in the INV file.












Edit item 12-112 in the INV file.

Example 8 - FIKO

:ED INV 12-345 12-346 12-347
'12-345'
Top
.P
001 AAA
002 BBB
003 CCC
004 DDD
EOI 004
.FIKO (CUSTOMER 12-345A
'12-345A' filed in file 'CUSTOMER'.
Edit items 12-345, 12-346, and 12-347 in the INV file.







Write item 12-345A to the CUSTOMER file, overwriting the existing item and then kill the item list.

 

RealityV15.0Comment on this topic