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.

CHAIN<br />

Syntax<br />

CHAIN "str.expr"<br />

Description<br />

The <strong>UniBasic</strong> CHAIN command terminates the current <strong>UniBasic</strong> program and<br />

executes the ECL command str.expr. CHAIN performs a function similar to the<br />

EXECUTE statement, except that control is not returned to the original program.<br />

UniData treats str.expr as a command you type at the ECL colon (:) prompt. If str.exp<br />

executes a <strong>UniBasic</strong> program, variables could be passed through common areas, but<br />

all other variables are reinitialized when the new program begins.<br />

Tip: Use this command to avoid system-imposed limitations on program size by<br />

sequentially running several smaller programs rather than one large program.<br />

UDT.OPTIONS 6 and 40 affect the operation of the CHAIN command. For more<br />

information, see the UDT.OPTIONS <strong>Commands</strong> <strong>Reference</strong>.<br />

Examples<br />

In the following example, the program terminates and UniData executes the ECL<br />

command “RUN BP FORMLET”. FORMLET is a compiled <strong>UniBasic</strong> program.<br />

UniData does not return control to the original program when FORMLET terminates.<br />

CHAIN "RUN BP FORMLET"<br />

In the next example, the current program terminates and the paragraph<br />

RUN.ACCOUNTS executes:<br />

CHAIN "RUN.ACCOUNTS"<br />

1-131 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!