The FDMRGSPLF command merges a text based (SCS) spool file with a form overlay natively on the iSeries and then either:
  1. Sends the document to the IFS as a PDF or PCL file. 
  2. Sends the document to a UNC path or the PC print server local hard drive as a PDF or PCL file.
  3. Sends the document to an output queue on the iSeries as a PDF or PCL file.
  4. Prints the document directly to a PC or network printer.
You can call the FDMRGSPLF command interactively or embed it in a CL or RPG program to merge spool files as they are generated on the iSeries. 
 
Note: The FDMRGSPLF command is in the WINSPOOL library, not the RJSOFFICE library.
 
Prerequisites:
 
On the iSeries:
  • WINSPOOL library version 3.60 or above
  • RJSOFFICE library version 1.19 or above
On the PC:
  • WinSpool/400 Report Download
  • WinSpool/400 Electronic Forms Print Server
  • RJS Forms Merge Engine (installed with WinSpool/400 Electronic Forms Print Server)
  • FormDocs
  • iSeries Office Integrator PC Component version 1.1.55 or above

FDMRGSPLF (Merge Spool with Form Overlay) Parameters

  • Spooled file - The name of the spool file to capture.
  • Job name, User, and Number - The job information.
  • Spooled file number - The spool file number.
  • Form overlay template name - A prefix to use to locate the FormsDocs overlay template on the forms print server in C:\Program Files\FormDocs\Templates.
    For example: If you enter INVOICE, the print server looks for the template INVOICE.FDT and the text layer file INVOICE.TLR.
    Use the following to substitute values:
    • *SPOOL - The spool file name. (Default)
    • *USERDATA - The user data.
    • *FORMTYPE - The form type.
    • *JOBNAME - The job name.
  • Form destination option - Where the merged output goes.
    • *IFSFILE - The IFS output file in IFS merged output file name. (Default)
    • *PCFILE - The PC file in PC/LAN merged output file name.
    • *PCPRINTER - The PC printer in Form merge printer driver name
    • *DESTOUTQ - The output queue in Merge dest output queue. You can keep the original spool file name, user data, form type, and user defined data.
  • Form merge data output format - The format for the merged output document.
    • *PDF - Convert to PDF; Form merge printer driver name must be set to *NONE
    • *PCL - Convert to PCL, Postscript, or the printer language of the printer in Form merge printer driver name.
      For example: If you choose a HP LaserJet 4, the output document will be in PCL format. 
    • *TIF - Not supported yet. 
    • *FDD - Not supported yet. 
    • *CSV - Not supported yet.
  • Form merge printer driver name - A valid local or network printer driver connected to the forms print server. Use this setting to print or format the output file as PCL or Postscript, based on the printer driver.
    For example: If you choose a HP LaserJet 4, the output document will be in PCL format.
    • *NONE (Default)
  • IFS merged output file name - If the Form destination option is set to *IFSFILE, the IFS output file name to use.
    • *NONE (Default)
  • PC/LAN merged output file name - If the Form destination option is set to *PCFILE, the PC or LAN UNC file name or path to use.
    • *NONE (Default)
  • Replace IFS or PC output file - Whether to replace an existing file.
    • *NO (Default)
    • *YES
  • Merge dest output queue - If the Form destination option is set to *DESTOUTQ, the output queue and library name to re-spool the PDF or PCL file to.
  • Spool file name - The spool file name for the new spool file.
    • *SAME - Keep the original spool file name. (Default)
  • User data - The user data value for the new spool file.
    • *SAME - Keep the same user data as the original spool file. (Default)
  • Form type - The form type for the new spool file.
    • *SAME - Keep the same form type as the original spool file. (Default)
  • User defined data - The user defined data for the new spool file.
    • *SAME - Keep the same user defined data as the original spool file. (Default)
  • Hold spool file -  Whether to hold spool file when it is generated.
    • *SAME - Keep the same value as the original spool file. (Default)
    • *NO
    • *YES
  • Save spool file - Whether to save the spool file after printing.
    • *SAME - Keep the same value as the original spool file. (Default)
    • *NO
    • *YES
  • Copies - The number of copies to print. The default is 1.
  • Remote system - IP address or host name of the iSeries Office Integrator PC server.
  • User profile on remote system - A user ID for the remote iSeries Office Integrator PC server. You must always pass something even if security is not enabled on the iSeries Office Integrator PC server. 
  • Password on remote system - The password for the remote iSeries Office Integrator PC server.
  • FTP log option
    • *NONE - Do not log.
    • *DSP - Display the log.
    • *PRT - Print the log.

Example Command Calls to FDMRGSPLF

  • To send the merged document to an IFS file in PDF format, where the form overlay is INVOICE.FDT and the IFS file to write to is /test.pdf:

    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)

  • To send the merged document to a file on the WinSpool/400 Electronic Forms Print Server PC in PDF format, where the form overlay is INVOICE.FDT and the PC file to write to is c:\test.pdf:

    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)

  • To send the merged document to a file on a Windows server on the network in PDF format, where the form overlay is INVOICE.FDT and the UNC path of the file to write to is \\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)

  • To send the merged document to a file on a Windows server on the network in PCL Laserjet format, where the form overlay is INVOICE.FDT and the UNC path of the file to write to is \\125.1.1.53\root$\test.pcl:
    Note: The printer driver must be loaded on the selected PC.

    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)

  • To send the merged document to an output queue in PDF format, where the form overlay is INVOICE.FDT, the output queue is SAMPLES in library QGPL, and the spool file name, user data, form type, and user defined data 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)

  • To send the merged document to an output queue in PCL Laserjet format, where the form overlay is INVOICE.FDT, the output queue is SAMPLES in library QGPL, the spool file name, user data, form type, and user defined data are preserved, and the printer driver to convert to PCL is HP LaserJet 4:
    Note: The printer driver must be loaded on the selected PC.

    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)                    

  • To print the merged document directly, where the form overlay is INVOICE.FDT and the printer driver to convert to PCL is HP LaserJet 4:
    Note: The printer driver must be loaded on the selected PC.

    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)


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016