We require a print formatting solution

We are in the process of migrating our Adabas/Natural system from an Amdahl mainframe to an IBM UNIX platform.

Formating output in postscript (see my previous post) wasn’t the answer, and after looking at the current method I’m wondering if a similar product exists for the UNIX platform.

Currently we are using the VTAM PRINTER SUPPORT SYSTEM (VERSION 1, RELEASE 8.0) from these guys: http://www.lrs.com/ I don’t know much about it, but this is the blurb from one of the files: “THIS MODULE IS USED TO SEND PRINTER COMMANDS BEFORE AND AFTER A PRINT FILE USING THE PCMDSTRT OR PCMDEND KEYWORDS. THIS MODULE HAS A 32-BYTE HEADER WHICH IS MAPPED BY THE VPSSPMOD MACRO. THE FIRST 2 BYTES MUST BE X’FFFE’ TO INDICATE THAT THE MODULE IS A COMBINED FORMAT MODULE. THE LENGTH AND ADDRESS OF THE START AND END COMMANDS ARE IN THE HEADER.” Eccesentially, they wrap the print output in HP PCL commands before sending it on to a HP printer.

I’ve sent them a query on the current status of their product, but am wondering what other people do to handle print formatting. I have a home-grown solution, but would be very interested to hear of any products or methods which may address our print formating requirements.

Try this. Though it is from Mainframe documentation, I don’t see any reason why this might not work with UNIX.
It describes the technique to mix control characters with printing data. Some time ago, I used a similar (but manual) technique to mix reports on UNIX and Windows.
This will require program changes!

Another possibility (without program changes) is:

  1. define printer initiating and resetting sequences in the NATPARM module (here you can also define control characters for the different AD= settings)
    or
  2. write your own printing scripts with initiating and resetting sequences and use these scripts to read the printing data from stdin and route it to whichever device/script you want.

we handle “classic” print-output, created in batch, on our hp-ux in the following way:

  1. we use the “well known” natural “dd-Names” for reports (e.g. cmprt01, cmprt02 …), as
    we did it on the ibm mainframe. advantage: nothing changed in the programs.

  2. within the batch-script linked to the “dd-Name” is a (temporary) file. This is done by
    a shell-command, using an environment-variable, like this:


  .
export CMPRT01=/tmp/cmprt01_"$stepname"_$$.txt # Report-No 01 goes here ...
  .
  1. start natural in “real batch mode”. output from write-statements are going directly to the
    files.

  export CMOBJIN=$CMSYNIN
  tempP='CMPRT01=$CMPRT01 CMPRT02=$CMPRT02 CMPRT03=$CMPRT03'
  tempS='CMPRINT=$CMPRINT CMSYNIN=$CMSYNIN CMOBJIN=$CMOBJIN'
  natural batchmode PARM=NATINT $tempS $tempP

This is a code-snippet out of a typical batch-script: start the program log1ipth from
library LOG-DPH and send the reports to the archiving-system:


       . create_natsynin "LOGON LOG-DPH" "acommon" "log1ipth"
       . syslog $cmsynin
       export CMSYNIN=$cmsynin
       . allocnatural "$dvsystem" "$procname" 'st010'
       . natbatch
       cat $cmprint > "$JobFolder"/st010-cmprint.txt
       . printprot "$JobFolder"/st010-cmprint.txt 'SYSOUT'
       . checkreturncode $?
       . archiveprint $cmprt01 'W,L1803010,ploh0'
       . archiveprint $cmprt02 'W,L1803020,ploh0'
       . archiveprint $cmprt03 'W,L1803030,ploh0'
       . rmnatural
       export returncode="$maxreturncode"
  1. after natural has terminated, the file(s) can be send to a “real” printer (using the unix-print-subsystem) and/or
    send to an archiving system and/or send to the user(s) by e-mail. all this stuff is done on script-level.

4a) printing is done by the lp-command. printer-specific headers and trailers are inserted via user-exits
(e.g. for kyocera, hp and so on)
4b) archiving: sending the print-file to an archiving-system (.archiveprint)
4c) conversion to rtf: Insert a header for portrait-/landscape-format, depending on the line-size of the report, and
extend the file-content by some rtf-specific requirements. in windows-world this make the content of the file printer-independent.

Reports from automated batch-jobs normaly going to our archiving-system.

Report from Batch-jobs started by the end-user can be printed and/or send by e-mail. The user has the choice to select the
desired printer by name.

much more flexible than to create a “classic” output is to create a xml-file and do the formatting by xslt and/or jscript (Ajax).
we create reports in xml-format from natural and show the result directly in a web-browser, convert it to Excel
(via HSSF, even on unix) or to pdf (xsl-fo).

let me know if you like to get more information.

[quote=“KlaBue”]
we handle “classic” print-output, created in batch, on our hp-ux in the following way:

  1. we use the “well known” natural “dd-Names” for reports (e.g. cmprt01, cmprt02 …), as
    we did it on the ibm mainframe. advantage: nothing changed in the programs.

  2. within the batch-script linked to the “dd-Name” is a (temporary) file. This is done by…

KlaBue,

I would be interested in learning more on how this is done. I would also like to know what is possible right in Natural. Here is one of our print format requirements :

  • set mode to duplex long edge
  • set long edge offset to 180 decipoints
  • set paper size to legal
  • set orientation to landscape
  • set symbol set to ROMAN-8
  • set pitch to 12
  • set point size to 10
  • set style to upright
  • set stroke weight to normal
  • set typeface to Prestige Elite
  • set end of line word wrap on
  • set columns to 163
  • set rows to 45

Are these kind of format commands possible in the AIX UNIX version of Natural?

Thanks,

Michael Gillis, gillisme@gov.ns.ca