11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Parameter Description<br />

n Indicates the number of the value of a multivalued attribute to retrieve. If n is<br />

not included, UniData retrieves all values of the attribute.<br />

I-Attribute Specifies the number of the attribute to be retrieved during input conversion.<br />

If I-Attribute is omitted, UniData retrieves the record ID.<br />

O-Attribute Number of the attribute to be retrieved during output conversion (OCONV).<br />

If the O-Attribute is omitted, UniData retrieves the record ID.<br />

Examples<br />

OCONV File Translation (Tfile) Parameters (continued)<br />

The first line of the following program segment reads the demo database file<br />

ORDERS, accessing the record with @ID 912, and retrieving the second attribute.<br />

OCONV T also converts the internal date to display format. The second line prints<br />

the value in that attribute.<br />

record.ret = OCONV("912","TORDERS;V;;2")<br />

PRINT "Record retrieved: ":record.ret<br />

END<br />

The following output is obtained by running the preceding program:<br />

Record retrieved: 12:30PM<br />

In the next example, the program statement translates the TAPE_ID to the TAPES file<br />

and returns the name of the tape:<br />

TAPE_ID = CUSTOMER.REC<br />

TAPE_NAME = OCONV("TAPE_ID","TTAPES;X;;1")<br />

Related Command<br />

ICONV File Translation (Tfile)<br />

OCONV File Translation (Tfile) 1-526

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

Saved successfully!

Ooh no, something went wrong!