END

From CometWiki

(Difference between revisions)
Jump to: navigation, search
(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 ...)
 
Line 1: Line 1:
-
 
== END ==
== END ==
   
   
-
'''Syntax:''' END   
+
'''Syntax:''' <br> END  <br>
-
'''Placement:''' Place the END command after the REPORT command.
+
'''Placement:''' <br> Place the END command after the REPORT command. <br>
-
'''Discussion:''' The END command signifies the end of a report specification.  
+
'''Discussion:''' <br> The END command signifies the end of a report specification. <br>
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.  
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
+
'''Multiple Report Specifications'''<br>
-
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.  
+
You can set up one report file that contains specifications for a number of separate reports.<br> Each report in one report file must end with either the END command or the RUN command. <br>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.  
+
Placing multiple reports in one specification does not accomplish report changing.<br> 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.<br> 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.  
The END command must be the last command for each report in a multiple-report file.  
   
   
-
Example:   100  INPUT ...
+
'''Example:''' 
 +
  100  INPUT ...
   200  SELECTING ...
   200  SELECTING ...
   300  SORT ...
   300  SORT ...

Latest revision as of 09:11, 6 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