Running Native iSeries FDMRGSPLF Command to Merge Spool Files Natively with FormDocs from an iSeries RPG or CL program - Support

Running Native iSeries FDMRGSPLF Command to Merge Spool Files Natively with FormDocs from an iSeries RPG or CL program

From Support

Jump to: navigation, search

Contents

Overview

As of version 3.60 of the WINSPOOL library coupled with V1.1.55 of the RJS iSeries Office Integrator PC Server Component and the WinSpool/400 Electronic Forms Print Server, iSeries users can use the new FDMRGSPLF CL command to merge a text based (SCS) spool file natively on the iSeries with a form overlay and either capture or print the results via one of the following options: 1.) Doc can be captured and merged to the IFS as a PDF or PCL file. 2.) Doc can be captured and merged to a UNC path or the local hard drive on the PC print server as a PDF or PCL file. 3.) Doc can be captured and merged into an output queue on the iSeries as a PDF or PCL file. 4.) Doc can be captured and merged and printed directly on any PC or network printer connected to the PC print server.

The FDMRGSPLF command can be called interactively or can be embedded into a CL or RPG program to merge form documents as the text spool files are generated on the AS/400 or iSeries system.

NOTE: The FDMRGSPLF command is located within the WINSPOOL library, not the RJSOFFICE library.

Software Requirements

iSeries Software Requirements

1.) WINSPOOL library V3.60 or above. 2.) RJSOFFICE library V1.19 or above.

PC Requirements

1.) WinSpool/400 Report Download 2.) WinSpool/400 Electronic Forms 3.) RJS Forms Merge Engine (Should already get installed with WinSpool Electronic Forms.) 4.) FormDocs software. 5.) RJS iSeries Office Integrator PC Server Component V1.1.55

FDMRGSPLF Parameters (Merge Spool with Form Overlay) Spooled file - Spool file name

Job name/user/number - Enter the appropriate job information.

Spooled file number - Enter a spool file number to capture.

Form overlay template name - Enter the prefix to be used when locating the FormsDocs overlay template on the forms print server in C:\Program Files\FormDocs\Templates directory. Example: If INVOICE is entered, the print server will look for a template named: INVOICES.FDT and a text layer file of INVOICES.TLR

Special values:

  • SPOOL - Substitute spool file (Default),
  • USERDATA - Substitute user data value,
  • FORMTYPE - Substitute form type,
  • JOBNAME - Substitute job name.

Form destination option - This setting determines where the merged output will go during the form overlay process.

  • IFSFILE - The document will go to the IFS output file specified in the IFS merged output file name parameter. (Default)
  • PCFILE - The document will go to the PC file specified in the PC/LAN merged output file name parameter.
  • PCPRINTER - The document will print on the PC printer connected to the PC forms print server based on the info passed on the Form merge printer driver parameter.
  • DESTOUTQ - The document will be re-spooled into an iSeries output queue for printing or distribution based on the destination output queue info. The original spool file name, user data, form type and user defined data valued can be retained.

Form merge data output format - This setting determines the data format output when a document is merged.

PDF - Document will be converted to PDF when PDF is specified and the Form merge printer driver name is set to *NONE. PCL - Document will be converted to PCL, Postscript or whatever based on the PC printer driver specified and the Form merge printer driver name parameter. Example: If HP LaserJet 4 is specified, the data output will be created in PCL format.

TIF - Not supported yet. FDD - Not supported yet. CSV - Not supported yet.

Form merge printer driver name - Enter a valid printer driver connected to the electronic forms print server locally or via the network. This setting can be used to print directly to a network printer or to format the distributed output file data based on the printer driver. This is a nice way to capture PCL or Postscript data into an output file after a form is merged. (Default = *NONE)

Example: If HP LaserJet 4 is specified, the data output will be created in PCL format.

IFS merged output file name - IFS output file name used if *IFSFILE is selected for the form destination option. (Default = *NONE)

PC/LAN merged output file name - PC or LAN UNC file name or path used if *PCFILE is selected for the form destination option. (Default = *NONE)

Replace IFS or PC output file - *NO - Do not replace existing file. (Default) *YES - Replace existing file.

Merge dest output queue - Enter an output queue and library name for the queue where the report will be re-spooled to in PDF or PCL format if *DESTOUTQ is chosen for the form destination option.

Spool file name - Spool file name for new spool (*SAME - Keep same value as original spool)

User data - User data value for new spool (*SAME - Keep same value as original spool)

Form type - Form type for new spool (*SAME - Keep same value as original spool)

User defined data - User defined data value for new spool (*SAME - Keep same value as original spool)

Hold spool file - Hold spool file when generated (*SAME - Keep same value as original spool, *NO, *YES)

Save spool file - Save spool file after printing (*SAME - Keep same value as original spool, *NO, *YES)

Copies - Number of print copies. Default - 1

Remote system - IP address or host name for iSeries Office Integrator server PC.

User profile on remote system - Enter user ID if enabled for remote iSeries Office Integrator PC server. Something must always be passed even if security is not enabled on the iSeries Office Integrator PC server.

Password on remote system - Enter password if enabled for remote iSeries Office Integrator PC server.

FTP log option - *NONE - No logging, *DSP - display log, *PRT - print log


Example Command Calls to FDMRGSPLF

Writing merged electronic form document to an IFS File in PDF Format Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and place the resulting file in /test.pdf in the IFS

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*IFSFILE) MRGDTAFMT(PDF) MRGIFSFILE('/test.pdf') REPLACE(*YES) RMTSYS('125.1.1.33') USR(USER) PWD(PASSWORD) LOGOPT(*NONE)

Writing merged electronic form document to a local file on the electronic forms print server in PDF Format Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and place the resulting file in c:\test.pdf on the forms print server PC

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*PCFILE) MRGDTAFMT(PDF) MRGPCFILE('c:\test.pdf') REPLACE(*YES) RMTSYS('125.1.1.33') USR(USER) LOGOPT(*NONE)

Writing merged electronic form document to a network UNC path in PDF Format Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and place the resulting file on a Windows Server URL: \\125.1.1.53\root$\test.pdf

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*PCFILE) MRGDTAFMT(PDF) MRGPCFILE('\\125.1.1.53\root$\test.pdf ') REPLACE(*YES) RMTSYS('125.1.1.33') USR(USER) LOGOPT(*NONE)

Writing merged electronic form document to a network UNC path in PCL Laserjet Format Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and place the resulting file on a Windows Server URL: \\125.1.1.53\root$\test.pcl

Note: This process will fail if you don't have the specified printer driver loaded on the selected PC. If you want to format your report in Postscript, PCL or some other variation,simply install the selected printer driver on the print server PC and specify the printer name on the MRGPRTDRV parameter.

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*PCFILE) MRGDTAFMT(PCL) MRGPRTDRV('HP LaserJet 4') MRGPCFILE('\\125.1.1.53\root$\test.pcl ') REPLACE(*YES) RMTSYS('125.1.1.33') USR(USER) LOGOPT(*NONE)

Writing merged electronic form document to an output queue in PDF Format Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and place the resulting PDF formatted file into the selected output queue. The spool file name, user data, form type and user defined data information are preserved.

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*DESTOUTQ) MRGDTAFMT(PDF) MRGPRTDRV(*NONE) REPLACE(*NO) MRGOUTQ(QGPL/SAMPLES) RMTSYS('125.1.1.33') USR(USER) LOGOPT(*NONE)

Writing merged electronic form document to an output queue in PCL Laserjet Format Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and place the resulting PCL formatted file into the selected output queue. The spool file name, user data, form type and user defined data information are preserved. Note that this example uses a printer driver named: HP LaserJet 4 to tell the print server to convert the data stream to PC based on the HP driver installed on the print server PC.

Note: This process will fail if you don't have the specified printer driver loaded on the selected PC. If you want to format your report in Postscript, PCL or some other variation,simply install the selected printer driver on the print server PC and specify the printer name on the MRGPRTDRV parameter.

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*DESTOUTQ) MRGDTAFMT(PCL) MRGPRTDRV('HP LaserJet 4') REPLACE(*NO) MRGOUTQ(QGPL/SAMPLES) RMTSYS('125.1.1.33') USR(USER) LOGOPT(*NONE)

Printing merged electronic form document directly via a printer connected to the print server PC Run the FDMRGSPLF command to Merge an iSeries text report with a form overlay named INVOICE.FDT and print the resulting PCL formatted file using the selected PC printer. Note that this example uses a printer driver named: HP LaserJet 4 to tell the print server to convert the data stream to PC based on the HP driver installed on the print server PC and print it right away.

Note: This process will fail if you don't have the specified printer driver loaded on the selected PC. If you want to format your report in Postscript, PCL or some other variation,simply install the selected printer driver on the print server PC and specify the printer name on the MRGPRTDRV parameter.

FDMRGSPLF FILE(INVOICE) JOB(110513/DICK/QPADEV0007) SPLNBR(38) MRGOPTION(*PCPRINTER) MRGDTAFMT(PCL) MRGPRTDRV('HP LaserJet 4') RMTSYS('125.1.1.33') USR(USER) LOGOPT(*NONE)

Personal tools