SNDDOMFAX command
Version 1.0.1
July 26, 2002

The SNDDOMFAX command allows you to fax OS/400 spooled files of type AFP or SCS directly from an OS/400 command line using Domino Fax for iSeries. This is sample code only.

July 26, 2002: This updated version of SNDDOMFAX supports multiple mail boxes.



IMPORTANT NOTICE:
This example contains C programming source code (Sample Code) for your consideration.  IBM grants you a nonexclusive copyright license to use this Sample Code as an example from which you can generate similar function tailored to your own specific needs.   This Sample Code is provided by IBM for illustrative purposes only and has not been thoroughly tested under all conditions.  IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of this Sample Code.  IBM provides no program services for this Sample Code.  All Sample Code contained herein is provided to you "AS IS" without any warranties of any kind.  THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGMENT ARE EXPRESSLY DISCLAIMED.  SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSIONS MAY NOT APPLY TO YOU.  IN NO EVENT WILL IBM BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES FOR ANY USE OF THIS SAMPLE CODE INCLUDING, WITHOUT LIMITATION, ANY LOST PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR OTHER DATA ON YOUR INFORMATION HANDLING SYSTEM OR OTHERWISE, EVEN IF WE ARE EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

(C) Copyright IBM Corp. 2000
All rights reserved.
US Government Users Restricted Rights -
Use, duplication, or disclosure restricted
by GSA ADP Schedule Contract with IBM Corp.

Licensed Materials - Property of IBM


Command requirements and restrictions

Transferring Files to your iSeries System

Using the SNDDOMFAX Command

Creating the SNDDOMFAX Command  (only necessary if you change the command)
 



Command Requirements and Restrictions

Transferring Files to your iSeries System

After downloading the sndfax.zip file and unzipping it, you have the following files on your workstation:

readme.html - the file you are currently reading
qfxdsav.bin - OS/400 save file of library QFXDTOOLS. This library contains all SNDDOMFAX objects and source.
The save file (qfxdsav) listed above must be transferred from your workstation to an iSeries system in binary mode as directed below.

  a.    Create an OS/400 library and save file in preparation for transferring qfxdsav to the iSeries.

    For example, create a library called mylib and a save file in mylib called QFXDSAV on the iSeries system, as follows:
      crtlib mylib
      crtsavf mylib/qfxdsav
  b.    Transfer the qfxdsav binary file from your workstation to the OS/400 save file created in step a.
For example:
cd xxxx   [change to the directory on your workstation that contains the save file]

ftp [your iSeries system name or IP address]

Name: [Enter your iSeries user profile name and press enter]
Password: [Enter your iSeries password and press enter]

ftp>binary
         Representation type is binary IMAGE.
ftp>put qfxdsav  mylib/qfxdsav (replace
ftp>quit

The qfxdsav save file for the QFXDTOOLS library is now on your iSeries system.
  c.    Restore the QFXDTOOLS library from the qfxdsav save file.
On the iSeries system where you transferred QFXDSAV, run the following command:
RSTLIB SAVLIB(QFXDTOOLS) DEV(*SAVF) SAVF(MYLIB/QFXDSAV)
When the RSTLIB command completes, you have a new library on your iSeries system called QFXDTOOLS which contains all of the SNDDOMFAX objects and source as listed below:
Object
Type
Description
SNDDOMFAX *CMD compiled command, source in QCMDSRC
SNDDOMFAX *PGM compiled command processing program
QFAXCALHPT *MODULE Module needed to create SNDDOMFAX program, source in QCSRC
QFAXSETENV *MODULE Module needed to create SNDDOMFAX program, source in QCSRC
QFAXSNDFAX *MODULE Module needed to create SNDDOMFAX program, source in QCSRC
QFXDFINE *WSCST Workstation customization object needed for call to Host Print Transform, source in QTXTSRC
SDFMSG *MSGF contains the command message file
QCSRC *FILE source for the command processing program
QCMDSRC *FILE source for the SNDDOMFAX command
QTXTSRC *FILE source for the workstation customization object



Using the SNDDOMFAX Command

Review the user considerations before attempting to run the command.

Use the WRKSPLF command to identify the attributes of the spooled file you wish to fax.

Enter SNDDOMFAX on any OS/400 command line and press F4 to display the command prompt.

Enter the required information:
Note: You can specify the most recently spooled file of a particular name (for example, QSYSPRT) for your current session by using * as the Job Name.


Creating the SNDDOMFAX Command

You only need to perform the steps described in this section if you make changes to the command. You do not need to create the command if you plan to use it without customizing it.

Note: To successfully run the these commands, you must have the following items installed on your iSeries system (use DSPSFWRSC command to determine if they are already installed):

/* create the modules */

ADDLIBLE QNOTESAPI
CRTCMOD MODULE(QFXDTOOLS/QFAXCALHPT) SRCFILE(QFXDTOOLS/QCSRC) TEXT('SNDDOMFAX module - calls Host Print Transform')
CRTCMOD MODULE(QFXDTOOLS/QFAXSETENV) SRCFILE(QFXDTOOLS/QCSRC) TEXT('SNDDOMFAX module - sets up Notes environment')   CRTCMOD MODULE(QFXDTOOLS/QFAXSNDFAX) SRCFILE(QFXDTOOLS/QCSRC) TEXT('SNDDOMFAX module - sends the fax')

/* create the SNDDOMFAX command processing program */

CRTPGM PGM(QFXDTOOLS/SNDDOMFAX) MODULE(QFXDTOOLS/QFAXCALHPT QFXDTOOLS/QFAXSETENV QFXDTOOLS/QFAXSNDFAX) BNDSRVPGM(QNOTES/LIBNOTES QNOTES/QNNINAPI QSYS/QWPZHPT1) USRPRF(*OWNER) AUT(*USE)

/* change the owner of the SNDDOMFAX program to QSYS */

CHGOBJOWN OBJ(QFXDTOOLS/SNDDOMFAX) OBJTYPE(*PGM) NEWOWN(QSYS)

/* create the command */

CRTCMD CMD(QFXDTOOLS/SNDDOMFAX) PGM(QFXDTOOLS/SNDDOMFAX) SRCFILE(QFXDTOOLS/QCMDSRC) TEXT('SNDDOMFAX command') MSGF(QFXDTOOLS/SDFMSG) PRDLIB(QFXDTOOLS) AUT(*EXCLUDE)

Note: Use the Work with Authority command (WRKAUT) to authorize appropriate individuals or groups to run the SNDDOMFAX command.

/* Create the workstation customization object */
CRTWSCST WSCST(QFXDTOOLS/QFXDFINE) TEXT('SNDDOMFAX workstation customization object') SRCFILE(QFXDTOOLS/QTXTSRC)