11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

OCONV File Translation (Tfile)<br />

Syntax<br />

OCONV(rec.id, "T[DICT] [filename;cn;I-Attribute;O-Attribute]")<br />

Description<br />

The OCONV file translation (Tfile) function retrieves attributes from a file without<br />

the file being explicitly opened first. This function performs the same conversion as<br />

the ICONV file translation function. If the input value or conversion code is invalid,<br />

UniData returns the input value.<br />

Note: In BASICTYPE P, OCONV returns an empty string if UDT.OPTIONS 56 is on<br />

and the input value or conversion code is invalid.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

1-525 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

rec.id Specifies the ID of the record to be accessed. Can be a literal or a variable.<br />

DICT Include to access the dictionary file.<br />

filename Specifies the name of the file to be accessed (any valid UniData file in your<br />

VOC file containing the required attribute or data).<br />

c One of the following translate subcodes:<br />

V – If the record does not exist, or if the attribute is an empty string, return<br />

an empty string and print an error message.<br />

C – If the record does not exist, or if the attribute is an empty string, substitute<br />

id.expr for the value of the function.<br />

X – If the record does not exist, or if the attribute is an empty string, return<br />

an empty string.<br />

OCONV File Translation (Tfile) Parameters

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

Saved successfully!

Ooh no, something went wrong!