END

From CometWiki

(Difference between revisions)
Jump to: navigation, search
Badge (Talk | contribs)
(New page: == END == '''Syntax:''' END '''Placement:''' Place the END command after the REPORT command. '''Discussion:''' The END command signifies the end of a report specification. When ...)
Newer edit →

Revision as of 12:49, 5 June 2009

END

Syntax: END Placement: Place the END command after the REPORT command. Discussion: The END command signifies the end of a report specification. When the report ends, it will exit to the program set up in RQP1 or to RPGEXIT or QMONITOR (in that order) rather than to the QREPORT program.

Multiple Report Specifications You can set up one report file that contains specifications for a number of separate reports. Each report in one report file must end with either the END command or the RUN command. END specifies the end of one report specification.

Placing multiple reports in one specification does not accomplish report changing. Instead, it is only a convenience to allow many similar reports to be stored in one file, and called up by running The Reporter with the "filespec" name, the directory, and the starting line number of the desired report in the spec file. The report would then run, and the END statement would terminate the report process.

The END command must be the last command for each report in a multiple-report file.

Example: 100 INPUT ...

 200   SELECTING ...
 300   SORT ...
 400   REPORT
 500   PRINT ...
 600   END
 700   INPUT ...
 800   ...

In this example, to run the second report, you could type in the command:

 RUN QREPORTS,RPG,"SAMPLE,DSK,    700"
 

and the report would end with the next END or RUN statement in the spec file.

Personal tools