UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
DATA Syntax DATA expr1 [,expr2]... Description The UniBasic DATA command places data in an input queue stored in @DATA. ASCII character 013 (CR) delimits elements in the queue. Each subsequent INPUT statement reads one element. @DATA is read-only. For more information about @ variables, see Appendix B, “UniBasic@variables.” The expressions (expr1 and expr2) can be literal strings or variables. You can continue DATA statements over several lines by placing a comma at the end of each line to be continued. UniData places data in the queue in order of execution of DATA commands. The queue processes on a first-in, first-out basis. When the input queue is empty, UniData requests input from the terminal. The input queue remains available through program CHAIN and EXECUTE operations, but is cleared when control returns to the UniData ECL prompt (:). Tip: You can load inline prompts in paragraphs with the DATA command. For instructions, see the UniData Commands Reference. Example In the following example, the program segment executes a DATA statement containing variables and constants of both string and numeric types. The first value, 10, is read by a subsequent input statement and assigns the value to the variable COUNT. 1-187 UniBasic Commands Reference DATA 10,"William","James",TESTVAL,135, "Test Run" INPUT COUNT
DATE Syntax DATE( ) Description The UniBasic DATE function returns the current system date in internal format. Internal format is the number of days after December 31, 1967. Example The following statement prints the current system date in external format: PRINT OCONV(DATE(),"D") Related Commands UniBasic ICONV Date (D), OCONV Date (D), TIMEDATE DATE 1-188
- 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 148 and 149: CLOSE Syntax CLOSE [file.var] [ON E
- 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 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
- Page 198 and 199: The preceding program calls the fol
- Page 200 and 201: Examples The following program segm
- Page 202 and 203: Examples The following program stat
- Page 204 and 205: In the next example, the program st
- Page 206 and 207: UniData SQL SELECT - For informatio
- Page 208 and 209: Examples In the following example,
- Page 210 and 211: Parameters The following table desc
- Page 212 and 213: DIGEST Syntax DIGEST(algorithm, dat
- Page 214 and 215: DIR Syntax DIR(file.expr) Descripti
- Page 216 and 217: STATUS Codes DISABLEDEC has the fol
- Page 218 and 219: DISPLAYWIDTH Syntax DISPLAYWIDTH (s
- Page 220 and 221: DQUOTE DQUOTE is a synonym for the
- Page 222 and 223: Related Commands UniBasic PRECISION
- Page 224 and 225: ECHO Syntax ECHO [ON | OFF | expr]
- Page 226 and 227: EDADRV_CloseStmt Syntax RETCODE EDA
- Page 228 and 229: EDADRV_Connect Syntax RETCODE EDADR
- Page 230 and 231: EDADRV_Disconnect Syntax RETCODE ED
- Page 232 and 233: 1-226 UniBasic Commands Reference
- Page 234 and 235: Return Codes The following table de
DATA<br />
Syntax<br />
DATA expr1 [,expr2]...<br />
Description<br />
The <strong>UniBasic</strong> DATA command places data in an input queue stored in @DATA.<br />
ASCII character 013 (CR) delimits elements in the queue. Each subsequent INPUT<br />
statement reads one element. @DATA is read-only. For more information about @<br />
variables, see Appendix B, “<strong>UniBasic</strong>@variables.”<br />
The expressions (expr1 and expr2) can be literal strings or variables. You can<br />
continue DATA statements over several lines by placing a comma at the end of each<br />
line to be continued.<br />
UniData places data in the queue in order of execution of DATA commands. The<br />
queue processes on a first-in, first-out basis. When the input queue is empty, UniData<br />
requests input from the terminal. The input queue remains available through program<br />
CHAIN and EXECUTE operations, but is cleared when control returns to the<br />
UniData ECL prompt (:).<br />
Tip: You can load inline prompts in paragraphs with the DATA command. For<br />
instructions, see the UniData <strong>Commands</strong> <strong>Reference</strong>.<br />
Example<br />
In the following example, the program segment executes a DATA statement<br />
containing variables and constants of both string and numeric types. The first value,<br />
10, is read by a subsequent input statement and assigns the value to the variable<br />
COUNT.<br />
1-187 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />
DATA 10,"William","James",TESTVAL,135,<br />
"Test Run"<br />
INPUT COUNT