Previous Topic: Changing Destination for the Application RunNext Topic: Using Working Data


Changing the Output File Dynamically

You can assign a report to an output file and destination with an ASSIGN statement during program execution.

You must specify the ASSIGN statement in the application before the first PRODUCE statement executes. Additionally, by using RELEASE and ASSIGN statements during program execution, you can use multiple output files and destinations with a single RDF report definition resulting in multiple reports. You can write the output to a different file and destination for each released report, assuming that the output file names and the destinations are valid.

The ASSIGN statement can specify the output file name as a literal, such as the following:

ASSIGN REPORT CUSTRPT TO 'IDLRTX'

Or as a variable. If DDNAME is a defined variable, you can use the following statement:

ASSIGN REPORT CUSTRPT TO DDNAME