File I/O Operations

From CometWiki

(Difference between revisions)
Jump to: navigation, search
 
Line 6: Line 6:
At the highest level, Internet Basic file operations include statements to open, close, create, erase, rename, lock, and unlock a file, including:  
At the highest level, Internet Basic file operations include statements to open, close, create, erase, rename, lock, and unlock a file, including:  
-
*[[CREATE]]
+
*[[IB Statements/create|CREATE]]
-
*[[ERASE]]
+
*[[IB Statements/erase|ERASE]]
-
*[[RENAME]]
+
*[[IB Statements/rename|RENAME]]
-
*[[OPEN]]
+
*[[IB Statements/open|OPEN]]
-
*[[CLOSE]]
+
*[[IB Statements/close|CLOSE]]
-
*[[LOCK]]
+
*[[IB Statements/lock|LOCK]]
-
*[[UNLOCK]]
+
*[[IB Statements/unlock|UNLOCK]]
'''Note:''' Starting with Comet version 504.211, whenever a filename is referenced in a Comet statement (in the OPEN, CREATE, and RENAME statements, for example), the system converts the filename to upper case before making the call. This change was made in response to some case-sensitive problems encountered on several Windows NT installations.  
'''Note:''' Starting with Comet version 504.211, whenever a filename is referenced in a Comet statement (in the OPEN, CREATE, and RENAME statements, for example), the system converts the filename to upper case before making the call. This change was made in response to some case-sensitive problems encountered on several Windows NT installations.  
Line 19: Line 19:
*[[IB Statements/write|WRITE]]
*[[IB Statements/write|WRITE]]
-
*[[READ]]
+
*[[IB Statements/read|READ]]
-
*[[EXTRACT]]
+
*[[IB Statements/extract|EXTRACT]]
-
*[[INQUIRE]]
+
*[[IB Statements/inquire|INQUIRE]]
-
*[[DELETE]]
+
*[[IB Statements/delete|DELETE]]
Internet Basic also provides statements for inserting, rewriting, and updating data records, including:  
Internet Basic also provides statements for inserting, rewriting, and updating data records, including:  
-
*[[UPDATE]]
+
*[[IB Statements/update|UPDATE]]
-
*[[INSERT]]
+
*[[IB Statements/insert|INSERT]]
-
*[[REWRITE]]
+
*[[IB Statements/rewrite|REWRITE]]
In addition to these direct input/output statements, Internet Basic provides several file functions, including:  
In addition to these direct input/output statements, Internet Basic provides several file functions, including:  
-
*[[FIRST]]
+
*[[IB Statements/first|FIRST]]
-
*[[LAST]]
+
*[[IB Statements/last|LAST]]
-
*[[KEY]]
+
*[[IB Statements/key|KEY]]
-
*[[POSITION]]
+
*[[IB Statements/position|POSITION]]
-
*[[PREV]]
+
*[[IB Statements/prev|PREV]]
-
*[[RECNUM]]
+
*[[IB Statements/recnum|RECNUM]]

Latest revision as of 09:52, 1 June 2009

File I/O Operations

The Internet Basic language provides over twenty statements related to file input and output operations. These are explained in detail in the Procedure Division documentation. Below is a brief summary of the most common file operations. Note that some of these operations may not be performed simultaneously by multiple users, or actions taken by one user could affect file operations attempted by another.

At the highest level, Internet Basic file operations include statements to open, close, create, erase, rename, lock, and unlock a file, including:

Note: Starting with Comet version 504.211, whenever a filename is referenced in a Comet statement (in the OPEN, CREATE, and RENAME statements, for example), the system converts the filename to upper case before making the call. This change was made in response to some case-sensitive problems encountered on several Windows NT installations.

Once a data file is created and opened, normal I/O operations may proceed. Internet Basic provides statements for reading records, writing records, reading and locking records, deleting records, etc. These include:

Internet Basic also provides statements for inserting, rewriting, and updating data records, including:

In addition to these direct input/output statements, Internet Basic provides several file functions, including:

Personal tools