Profits Plus modules»Software Maintenance»System printers»eform design
  • RSS Feed

Last modified on 1/15/2015 9:00 PM by User.

Tags:

eform design

You don’t need this information during installation.  It is background info for programmers.

Definition:

An eform uses the laser printer's graphic drawing capability to "print" the form as a background to the data.  Eforms use blank plain paper.

All of the special PCL5 commands needed to draw the form are kept in a static file (efiv01.pcl or efst01.pcl)  which is pre-pended to the data .prt file at runtime to create a .pcl file that gets sent to the printer, fax or email.

eform directories:

We keep all eform files for all customers in MVS:/u1/mvs/eforms directory.   The usr directory has a sub-directory for each customer's custom file extension.

  • /u1/mvs/eforms/usr/???/invoice/...

  • /u1/mvs/eforms/usr/???/stmt/...

  • /u1/mvs/eforms/docs/...

  • /u1/mvs/eforms/bin/...

 

  • The /u1/mvs/eforms directory  is only a storage area.   The files must be copied to the live data directories  /u/mvs/dsk0/??????/ to be used by Profits Plus.

  • The /u/mvs/dsk0/100001/ef*.syp files are not necessarily the "standard" version.   The correct .syp files required should be in the same /u1/eforms/usr/... directory that has the eform.mk script used to create the eform.  You should put those versions of the .syp files on the customer's machine in their ...dsk0/100??? data directory.

Standard eform invoice layout:

  • The bdy.pcl file contains the data column headers that will probably be the same for all customers.

  • The logo.pcl, hdr.pcl and trl.pcl files contain custom graphics and text specific to the customer.

  • All four files are cat'd together to create the efiv01.pcl eform file.

  • Once you have the customized logo.pcl, hdr.pcl and trl.pcl files created you can use the eform.mk script to create the efiv01.pcl file.

  • Watch our for .psm files!: Normally the PCL5 files hdr.pcl bdy.pcl and trl.pcl must never have comments (the PCL CO; command) because vsifax can't handle it for faxes.  Visifax looses track of Pen-up and Pen-down so you'll see unwanted lines drawn between sections of the page when the pen is moved.  You say the pen is up, but vsifax thinks it is down.    To get around this problem, we keep the raw pcl codes in corresponding .psm files (like hdr.psm, bdy.psm and trl.psm).  You should edit the .psm files, not the .pcl versions.  If you forget, and edit the .pcl file, you'll loose your changes because the eform.mk script will read the .psm files and overwrite the corresponding .pcl files (excluding comment lines).  Comments are any line that starts with an exclamation point in column 1.

  • Always check the eform.mk script first!. Every eform directory will have an eform.mk script that  you execute to create a new eform file.  It shows you if this eform is using the new .psm files or if it still uses the old .pcl files.

  • You should use the vim editor, not the vi or vue.  The vim editor is just like vi except it lets you edit binary files and enter the ASCII Escape codes right from the keyboard.   You have to launch vim with the -b option to tell it to allow binary editing.   example:   vim -b bdy.psm       In vim, to enter the ASCII escape character do this:   (1) Get into insert mode with the i key.     (2) CTRL-V     (3) let go of the CTRL-V     (4) press the escape key.   You'll see ^]  or ^^ where the escape codes was inserted.   It takes two characters to display it on the screen but it is really just one byte in the file.   As far as I know, vim is installed only on the mvs unix server.

Custom invoice eform layout:

Since custom eforms will always be unique, there is no need in maintaining the components in separate files.  It is all stored in their efiv01.pcl file. The custom eform is monolithic and structured how ever it was originally created by Jim Asman in Vancouver.   If an eform.mk script is used it will probably just add sample data and create a .pdf file for testing.

Caveats:

  • Aux Printing is not supported. 

  • All printers must be network printers or attached to the Profits Plus server.  Printers attached to PC’s will not be able to receive the graphics correctly.

  • Laser Printers attached to digi-board ports will be a lot slower than network printers.

  • The /u/mvs/dsk0/100001/ef*.syp files are not necessarily the "standard" version.   If the customer has their own copies in MVS:/u1/mvs/eforms/usr/???/invoice  or stmt directories then you should use those. 

 All eform laser printers must be:

  • Added with the HPLASERJET model in unix scoadmin. Here's how.
  • Do not use the mvs  or mvpass models.  They can’t print graphics.
  • No banner

 All eform overlay files must

  • Have lower case filenames that start with “ef”.  Example:   efivc01.pcl
  • have a .pcl extension
  • use PCL macro #21 for the form overlay

 Print programs will do this:

  • If printer keyword EFORM exists then it will set printer FORM’NAME to its required overlay file name (no extension)

IF INSTR(1,SYP’KEYWORD,”EFORM”)>0 THEN FORM’NAME=”efiv01”

  • Use the given CMP and NOR codes as usual from the printer record. 

 The system printer record will do this:

  • Have the keyword EFORM
  • Have a special prefix .syp file that enables macro #21 for automatic overlay. Example: efivc.syp and efivn.syp for compress and  normal.
  • No need to have a special suffix .syp file that disables macro #21 for automatic overlay, because the reset command in the hpdflt.syp will disable the macro.

 Spool.glm will do this

  • If printer FORM’NAME doesn’t start with “EF” then don’t use eform logic.
  • If printer FORM’NAME starts with “EF” but the FORM’NAME .pcl file doesn’t exist then set the printer FORM’NAME back to “NORMAL” so eform logic won’t be used.
  • If the printer also has keyword HTML or PDF then assume this is an email printer, and create pdf files instead of pcl files.
  • In Windows servers, PRINT-PREVIEW will display eforms using the Adobe Acrobat reader.

 Tokens.glm will do this when FORM’NAME starts with “EF”

  • Printfile.htm token prints an html file.  (not really used anymore)
  • Printfile.pdf token prints a .pdf file (used for emails).
  • Printfile.prt token prints the original .prt file
  • Printfile.pcl token prints the .pcl file (used for faxes)

 The $MVS_ROOT/$MVS_PLATFORM/bin directory must contain:

  • A program or script for converting pcl files to pdf format.  PCL2PDF

 The site.ini parameter file must contain:

  • INI’PCL2PDF’CONVERTER=PCL2PDF  or the name of the converter