DataBasic Reference > Statements and Intrinsic Functions > C > COLLECTDATA Statement

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

COLLECTDATA Statement (DataBasic) (m618703+collectdata_s.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

COLLECTDATA Statement

Retrieves data passed by the PASSDATA clause of a PERFORM statement.

Syntax

COLLECTDATA variable

Syntax Elements

variable is the name of the variable where the data is returned.

Operation

The COLLECTDATA statement is used in conjunction with the PERFORM statement. It is assumed that you are familiar with the operation of the PERFORM statement in this description.

The COLLECTDATA statement is only used in a program that has been PERFORMed by another program. The data returned to the variable is passed by the PASSDATA clause of the PERFORM statement. If no PASSDATA clause was used, then a value of null is assigned to the variable.

Comments

Use of the COLLECTDATA statement in a program that has not been PERFORMed is meaningless. In this case, the variable is assigned a null value.

Example

      PROG1
001 PERFORM 'RUN BP PROG2' PASSDATA 'ABC'
      PROG2
001 COLLECTDATA COLLVAR
002 PRINT 'PROG2: DATA=':COLLVAR

RealityV15.0Comment on this topic