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 />

Examples<br />

In the following example, the program segment lists all the items in the VOC file and<br />

returns the result in select list 2:<br />

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

RTNLIST int.expr The RTNLIST clause must evaluate to an integer 0–9, designating the<br />

list to return to the calling program. You can use the resulting list with<br />

subsequent READNEXT statements or in the PASSLIST clause of a<br />

MDPERFORM statement. If you do not include an expression after<br />

RTNLIST, the generated list replaces the contents of list 0. If you do not<br />

specify RTNLIST, the MDPERFORM command does not return a list.<br />

PASSLIST<br />

int.expr<br />

The PASSLIST clause must evaluate to an integer 0, 1, or 2,<br />

designating the select list to be sent to the called program. If you do not<br />

specify int.expr, UniData assumes list 0.<br />

The passed list can be the result of previous SELECT or GETLIST<br />

commands, or the RTNLIST clause of an MDPERFORM statement.<br />

PASSCOM This parameter is provided for backward compatibility for releases<br />

before 3.1.<br />

MDPERFORM Parameters (continued)<br />

list_var = 2<br />

MDPERFORM "list dict VOC all" RTNLIST list_var<br />

In the next example, the program segment performs a selection on the CUSTOMER<br />

file, passes the result back in select list 1, and then sorts the result:<br />

list_var = 1<br />

cmd1 = "select CUSTOMER with @ID = '200'"<br />

cmd2 = "sort CUSTOMER by DATE_OUT"<br />

MDPERFORM cmd1 RTNLIST list_var<br />

MDPERFORM cmd2 PASSLIST list_var

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

Saved successfully!

Ooh no, something went wrong!