Wednesday, February 16, 2011

jBase Infobasic Command COLLECTDATA

Use the COLLECTDATA statement to retrieve data passed from the PASSDATA clause of an EXECUTE statement.

Command Syntax

COLLECTDATA variable

Syntax Elements

variable is the name of the variable, which is to store the retrieved data.

Notes

Use the COLLECTDATA statement in any program, which is EXECUTEd (or PERFORMed) by another program where the calling program uses a PASSDATA clause. The EXECUTEd program uses a COLLECTDATA statement to retrieve the passed data. If a PASSDATA clause is not in effect, variable will be assigned a value of null.

Example

FIRST
001 EXECUTE "RUN JBASIC_PROGS SECOND" PASSDATA "Handover"

SECOND
001 COLLECTDATA PassedMessage
002 CRT PassedMessage
In the above example, program FIRST will EXECUTE program SECOND and will pass the string "Handover" in the PASSDATA clause. Program SECOND retrieves the string to a variable PassedMessage and prints the string on the Terminal screen.

0 comments:

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems