UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
CLOSE Syntax CLOSE [file.var] [ON ERROR statements] Description The UniBasic CLOSE command closes a dictionary or data file. Note: You can use the OPEN command to access an unlimited number of files in a single UniData process. However, the operating system could limit the number of files that can be opened across numerous processes and users. Parameters The following table describes each parameter of the syntax. Parameter Description 1-151 UniBasic Commands Reference file.var Specifies a dictionary or data file to close. If you do not specify file.var, the default file is closed. If no default file is open, the command has no effect. A default file is created by omitting the file variable in the OPEN statement. ON ERROR statements Specifies statements to execute if a fatal error occurs because the file is not open. If you do not specify the ON ERROR clause, the program terminates under fatal error conditions. CLOSE Parameters
Example In the following example, the program segment opens and closes the file INVENTORY: OPEN 'INVENTORY' TO INVENTORY.FILE ELSE STOP CLOSE INVENTORY.FILE Related Command UniBasic OPEN CLOSE 1-152
- Page 98 and 99: AND Syntax expr1 AND expr2 Synonym
- Page 100 and 101: ASIN Syntax ASIN(expr) Description
- Page 102 and 103: Related Command UniData TERM - For
- Page 104 and 105: BITAND Syntax BITAND(num.expr1,num.
- Page 106 and 107: BITOR Syntax BITOR(num.expr1,num.ex
- Page 108 and 109: BPIOCP Syntax BPIOCP Description Th
- Page 110 and 111: BPIOCPN Syntax BPIOCPN Description
- Page 112 and 113: BREAK Syntax BREAK [KEY] {ON | OFF
- Page 114 and 115: BYTELEN Syntax BYTELEN (string) Des
- Page 116 and 117: Example In the following example, t
- Page 118 and 119: Parameters The following table desc
- Page 120 and 121: CALLC Syntax CALLC c.sub.name [(arg
- Page 122 and 123: CASE Syntax BEGIN CASE CASE express
- Page 124 and 125: In the next example, the program se
- Page 126 and 127: Related Commands UniBasic CATS, SPL
- Page 128 and 129: CHAIN Syntax CHAIN "str.expr" Descr
- Page 130 and 131: CHANGE Syntax CHANGE(string, old.su
- Page 132 and 133: CHAR Syntax CHAR(expr) Description
- Page 134 and 135: CHARLEN Syntax CHARLEN (string) Des
- Page 136 and 137: CHECKSUM Syntax CHECKSUM(str.expr)
- Page 138 and 139: Related Commands UniBasic COMMON, C
- Page 140 and 141: UniData DELETECOMMON, STACKCOMMON -
- Page 142 and 143: CLEARFILE Syntax CLEARFILE [file.va
- Page 144 and 145: CLEARINPUT Syntax CLEARINPUT Synony
- Page 146 and 147: UniQuery GET.LIST, SELECT, SSELECT
- Page 150 and 151: CLOSESEQ Syntax CLOSESEQ seq.file.v
- Page 152 and 153: closeSocket Syntax closeSocket(sock
- Page 154 and 155: COL1 Syntax COL1( ) Description The
- Page 156 and 157: COMMON Syntax COMMON [/common.name/
- Page 158 and 159: 1-161 UniBasic Commands Reference
- Page 160 and 161: UniData DELETECOMMON, STACKCOMMON -
- Page 162 and 163: Related Command UniBasic EXIT 1-165
- Page 164 and 165: In the next example, the program se
- Page 166 and 167: In the next example, the program se
- Page 168 and 169: COUNT Syntax COUNT(str.expr1, str.e
- Page 170 and 171: COUNTS Syntax COUNTS(expr,str.expr)
- Page 172 and 173: createCertificate Syntax createCert
- Page 174 and 175: createCertRequest Syntax createCert
- Page 176 and 177: Parameter Description The following
- Page 178 and 179: The following table describes the a
- Page 180 and 181: createSecureRequest Syntax createSe
- Page 182 and 183: Method Description The following ta
- Page 184 and 185: Parameters The following table desc
- Page 186 and 187: DATA Syntax DATA expr1 [,expr2]...
- Page 188 and 189: DBTOXML Syntax DBTOXML(xml_document
- Page 190 and 191: DCOUNT Syntax DCOUNT(str,delim) Des
- Page 192 and 193: DEACTIVATEKEY Syntax DEACTIVATEKEY
- Page 194 and 195: STATUS Code Example The following e
- Page 196 and 197: DEFFUN Syntax DEFFUN function.name
Example<br />
In the following example, the program segment opens and closes the file<br />
INVENTORY:<br />
OPEN 'INVENTORY' TO INVENTORY.FILE ELSE STOP<br />
CLOSE INVENTORY.FILE<br />
Related Command<br />
<strong>UniBasic</strong><br />
OPEN<br />
CLOSE 1-152