11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A value can be an integer (for example, record size), a string (for example, host name), or avariable or expression that evaluates to a value.A letter code string uses individual letters to specify device characteristics for the openoperation. For most devices, this letter code string is one of the positional parameters. Youcan specify any number of letters in the string, and specify the letters in any order. Lettercodes are not case sensitive. A letter code string is enclosed in quotation marks; no spacesor other punctuation is allowed within a letter code string (exception: K and Y may be followedby a name delimited by backslashes: thus: K\name\). For example, when opening a sequentialfile, you might specify a letter code string of “ANDFW” (append to existing file, create newfile, delete file, fix-length records, write access.) The position of the letter code stringparameter, and the meanings of individual letters is highly device-dependent.Keyword ParametersKeyword parameters can be specified in any sequence in the parameter list. A parameter listcan consist entirely of keyword parameters, or it can contain a mix of positional and keywordparameters. (Commonly, the positional parameters are specified first (in their correct positions)followed by the keyword parameters.) You must separate all parameters (positional or keyword)with a colon (:). A parameter list of keyword parameters has the following generalsyntax:OPENdevice:(/KEYWORD1=value1:/KEYWORD2=value2:.../KEYWORDn=valuen):timeoutThe individual parameters and their positions are highly device-dependent. As a general rule,you can specify the same parameters and values using either a positional parameter or akeyword parameter. You can specify a letter code string as a keyword parameter by usingthe /PARAMS keyword.timeoutOPENThe number of seconds to wait for the OPEN request to succeed. The preceding colon isrequired. timeout must be specified as an integer value or expression. If timeout is set to zero(0), OPEN makes a single attempt to open the file. If the attempt fails, the OPEN immediatelyfails. If the attempt succeeds it successfully opens the file. If timeout is not set, <strong>Caché</strong> willcontinue trying to open the device until the OPEN is successful or the process is terminatedmanually. If you use thetimeout option and the device is successfully opened, <strong>Caché</strong> sets the$TEST special variable to TRUE (non-zero). If the device cannot be opened within thetimeout period, <strong>Caché</strong> sets $TEST to FALSE (0).<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!