====== File I/O Commands ====== ==== CREATE.FILE and CREATE.BFILE ==== The CREATE.FILE command has the following syntax: CREATE.FILE {DICT} {} {(} This will create the specified file (either/both DICTIONARY and DATA portions, or DICTIONARY only) at the specified location. If no location is specified, the CTO will attempt to determine a location, and will then allow you to accept or change this location. The CTO will also validate the name of the file; if it does not conform to OpenInsight requirements, a new suggested name will be returned, and you may choose to accept or change this (note that you may always create a "q-pointer" in the MD for your invalid file name). If the "C" option is specified ("CREATE.FILE FILENAME (C"), the CTO will mark this as a BASIC+ program file. Compilation (with the BASIC command) will then be possible for this file. The CREATE.BFILE command is identical to the CREATE.FILE command, except that it automatically includes the "C" option to indicate the creation of a BASIC+ file. ==== CLEAR.FILE ==== The CLEAR.FILE command has the following syntax: CLEAR.FILE {DICT DATA} {(I} All items in the specified file will be deleted. Note that DATA is a "throwaway" word, and is ignored. If the I option is specified, no printed output is generated by the command. ==== COPY ==== The COPY command allows you to copy items within a file, copy items between files, and display items. The syntax for the COPY command is: COPY {DICT} { { ...} *} {({O}{D}{I}{PT}{S}} The COPY routine will copy the specified item or items, or all the items in the file, from the specified source file. If a select list is active, the item list may be omitted. If DICT is specified, items will be copied from the dictionary; otherwise, items will be copied from the DATA section of the file. If the “T” or “P” options are not specified, you will be prompted for a destination when you enter this command. If you specified the “T” option, or press in response to the destination prompt, the specified items will be displayed on the screen. If the “P” option is specified, the specified items will be printed to the currently-active printer. If the “S” option is not specified, line numbers for each field will also be displayed. You may specify a destination filename, by prefixing it with "(" - for example: COPY BP * To: (NEWBP You may also specify new item names, in a one-to-one match with the source item names - for example: COPY BP PROG1 PROG2 PROG3 To: NEWPROG1 NEWPROG2 NEWPROG3 By default, new items cannot overwrite existing items; if you wish to overwrite existing items, specify the "O" option. If you wish the original items to be deleted after conversion, specify the "D" option. The COPY command normally displays information about the items it has copied. Specify the "I" option to suppress this output. ==== CONVERT ==== The CONVERT command syntax is similar to the COPY command: CONVERT {DICT} { { ...} *} {({OD}} The CONVERT routine will convert the specified item or items, or all the items in the file, from "traditional" multivalue format to OpenInsight format. If DICT is specified, multivalue dictionary items will be converted to OpenInsight dictionaries; if DICT is not specified, then multivalue basic programs will be converted to BASIC+. When you enter this command, you will be prompted for a destination. If you press , you will be asked to verify that you wish to overwrite the current items with the newly converted information. You may also specify a destination filename, by prefixing it with "(" - for example: CONVERT BP * To: (NEWBP You may also specify new item names, in a one-to-one match with the source item names - for example: CONVERT BP PROG1 PROG2 PROG3 To: NEWPROG1 NEWPROG2 NEWPROG3 By default, new items cannot overwrite existing items; if you wish to overwrite existing items, specify the "O" option. If you wish the original items to be deleted after conversion, specify the "D" option. ==== DELETE ==== The DELETE command has the following syntax: DELETE {DICT} { { ... } * } The specified item or items (or all items, if "*" is specified) will be deleted from the specified file. ==== LISTDICT ==== The LISTDICT command has the following syntax: LISTDICT The full sorted list of dictionaries for the specified file will be displayed. ==== LISTFILES ==== The LISTFILES command displays the full sorted list of tables that are available to you in the current application. ==== FIND ==== The FIND function allows you to find all items in a specified table that contain the specified text. The syntax of this command is: FIND {DICT} If any items in the specified file contain the specified text, an active select list of those items will be returned. Note that the text may optionally be enclosed in quotes.