Is it possible to define a second chanel with NATURAL for online printing (writing to channels in batch via workfiles is no problem)? We need it for AFP-forms with variable layouts.
With the profile parameter PRINT you can define up to 32 reports (what you presumably mean with channels) similar to work files.
Using the DEFINE PRINTER statement you can dynamically assign a printer to each report.
Hope this helps.
Hello! I mean other channels within one report. In the spooled reports you find ‘1’ as channel 1 in line 1/column 1 for new page. We want zu write the channel-number at column 1 in any desired line of the report, for example:
Please refer to the documentation of the DEFINE PRINTER statement, and there to that of the “special printer” CCONTROL.
Printer-advance control characters can be generated within a Natural program by using the DEFINE PRINTER statement as follows:
.... DEFINE PRINTER (n) OUTPUT 'name' DEFINE PRINTER (n+1) OUTPUT 'CCONTROL' .... Both DEFINE PRINTER statements work together so that all Natural output for the printer (n) follows the normal Natural report-output rules and all Natural output for the printer (n+1) is also written to the printer (n). Natural does not generate a printer-advance control character for this report. Therefore, the first character in the output variable is the control character. With this method, it is possible to merge control characters for laser-printer systems and channel-advance characters for line printers in a normal Natural output report.
Hello again! Thank you for this solution.
I’ve another question in this context: Is it possible to control the TRC parameter for the printer (in batch-mode i set it in JCL) in the writing NATURAL program?