Modify. DORIC 9.65, INFO-Text software
Annons
Annons
MODIFY
MOD
IFY [DF_name]
changes the template of an empty data file, changes the structure of the redefined area of a non-empty data file, or creates a new data file with the same template as the selected data file and then allows you to change the template of the new data file.
argument notes
[DF_name] is a valid INFO file name unique in your user area. INFO creates a new data file with no records but with the same template as the currently selected data file for you to modify.
n
An unqualified MODIFY command indicates that you want to change the template of the currently selected data file.
n
You cannot use MODIFY to add or change defined items in a data file that contains records. You can use MODIFY to add or change redefined items in a data file that contains records. However, be careful when working with redefined items, since modifying can cause a shift in item starting position (see MRED).
n
If you want to change the item characteristics in a data file that contains records, use the ALTER command.
However, you cannot add new items or change the internal width of an existing item (see CWID).
n
If you specify a new data file, that data file must have a unique 1- to 32-character name. The name can include any character except blanks and the current delimiter character.
n
INFO-Text only - you can use MODIFY to add or change the synonym file associated with a text file.
INFO Reference Manual Commands 353
Response
D [#]
P
I
MODIFY discussion
N [#]
When you issue an unqualified MODIFY command, INFO displays the template of the selected data file the same way the ITEMS LONG command does, and then prompts you with ENTER OPTIONS . You can add items to the data file, delete items, or change any characteristic of an existing item. See Table ITEMS-1 'Items display headings' in the ITEMS command for a description of item characteristics.
If the file is empty, INFO positions you before the first item in the file and you can modify any item. If the file is not empty, INFO positions you at the first redefined item in the file and you can modify only redefined items.
When you issue the MODIFY command and specify a new data file name, INFO copies the template, but not the records, of the selected data file to the new data file, displays the template, and prompts you with ENTER
OPTIONS> . The new data file becomes the selected data file and you can modify any item in that file.
Respond as follows to the ENTER OPTIONS> prompt:
Description
Delete item(s). Deletes the current item. If you specify n, where n is a positive integer, it deletes the next n items starting with the current item. INFO then displays the item characteristics of the new current item.
Insert item. Inserts new item(s) after the current item. INFO prompts you for the characteristics of the new item(s) as it does with the DEFINE command. If you insert an item at the top of the file, that item becomes the first item in the file.
Position to next item. Positions you to the next item in the file. If you specify n, where n is a positive integer, INFO positions you at the item that is n items down from the current item.
INFO displays the characteristics of that item.
Print. Displays the characteristics of the current item.
354 Commands INFO Reference Manual
MODIFY
(cont’d)
Response
Q
R
Description
Quit. Ends the modify session. You can also end the session by pressing <RETURN> as an option.
Replace item. Replaces the current item with a new item. INFO prompts you for the characteristics of the new item as it does with the DEFINE command. If you use R at the top of the file, the new item replaces the first item in the file.
For an empty data file:
examples
ENTER COMMAND >SELECT D.MASTER
0 RECORD(S) SELECTED
ENTER COMMAND >MODIFY
DATAFILE NAME: D.MASTER
12/ 1/1993
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 LAST-NAME 10 10 C 4 -
11 FIRST-NAME
21 ADDRESS
10
10
10
10
C
C
-
-
4
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ENTER OPTIONS>N
1 LAST-NAME 10 10 C 4 -
ENTER OPTIONS>N
11 FIRST-NAME 10
ENTER OPTIONS>I
10 C 4 -
ITEM NAME>TITLE,4,C
ITEM NAME><RETURN>
ENTER OPTIONS>P
21 TITLE 4
ENTER OPTIONS>N
25 ADDRESS 10
ENTER OPTIONS>R
INFM NAME>ADD1,30,C
INFM NAME><RETURN>
4 C
10 C
ENTER OPTIONS>P
25 ADD1 30 30 C
ENTER OPTIONS><RETURN>
ENTER COMMMAND>
-
-
-
4
4
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
INFO Reference Manual Commands 355
MODIFY
For a data file containing records:
ENTER COMMAND >SELECT D.MASTER
50 RECORD(S) SELECTED
ENTER COMMAND >MODIFY
DATAFILE NAME: D.MASTER
12/ 1/1993
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
1 LAST-NAME
11 FIRST-NAME
21 ADDRESS
10
10
10
10
10
10
C
C
C
-
-
-
4
4
4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
** REDEFINED ITEMS **
11 F-INIT 1 1 C 0 -
RECORDS IN FILE. MODIFY REDEFINED ITEMS ONLY.
** REDEFINED ITEMS **
ENTER OPTIONS>N
END OF FILE
11 F-INIT 1 1 C 0 -
ENTER OPTIONS>
To create a new data file:
ENTER COMMAND >SELECT D.MASTER
50 RECORD(S) SELECTED
ENTER COMMAND >MODIFY CP.D.MASTER
DATAFILE NAME: CP.D.MASTER
12/ 1/1993
3 ITEMS: STARTING IN POSITION 1
COL ITEM NAME WDTH OPUT TYP N.DEC PROT KEY OCCRS INDX CNLV CC CN UN
-
-
-
-
-
-
-
-
-
-
-
-
1 LAST-NAME
11 FIRST-NAME
21 ADDRESS
10
10
10
10 C
10 C
10 C
-
-
-
4
4
4
ENTER OPTIONS>N
1 LAST-NAME 10 10 C
ENTER OPTIONS><RETURN>
0
ENTER COMMAND>SELECT CP.D.MASTER
0 RECORDS SELECTED
-
-
-
-
-
see also
CWID
MRED
356 Commands INFO Reference Manual
Ladda ner
Annons