Submitted by Anonymous (not verified) on Sat, 01/01/2005 - 00:00
Forums

I am working on a conversion from a different fax package over the
BlueFax.  I have the old address book and it has a 10 byte ID key.
My question is this .... can I just copy/reformat records into the
BlueFax file named RCP00 in library FAXDB.  Is it really just that
simple?

Full name
Administrator

admin

Sat, 01/01/2005 - 00:00

It is that simple but you have to be sure to increase the RCRCTK
field by one for every new record (our internal token). Another
way to make the conversion is by using the ADDFAXRCP command. This
command will not give you problems with database level check in
later versions of BlueFax. It can also be used for automatic
database replication of e.g. ERP database.

You can use this CL program example to upgrade the BlueFax Phone
book e.g. daily.
 

  0002.00 Pgm
  0003.00    DCL        VAR(&KEY) TYPE(*CHAR) LEN(10)   /* Work field for numeric to alphanumeric converting */
  0004.00    DCLF       FILE(MYFILE)                    /* Input file to be read from the top */
  0005.00    OVRDBF     FILE(MYFILE) POSITION(*START)   /* Prepare read from top of file (just like SETLL in RPG)*/
  0005.01
  0006.00 loop:
  0007.00    RcvF                             /* Fetch a record (same as READ in RPG) */
  0008.00    MonMsg Cpf0000 exec(Goto Eof)    /* End when end of file */
  0009.00    chgvar &key   &CUSTNBR           /* The customer number is changed from numeric to alphanumeric */
  0009.01    if (&FAXNBR  *NE ' ') then(Do)   /* Checking for fax number */
  0009.02
  0009.03       /* Add the customer to the Fax Phone book if he is not already there, otherwise changes it    */
  0010.00       FAX/ADDFAXRCP RCPID(&KEY) RCPNAME(&NAME ) +
  0011.00                              RCPATTN(&ATT) FAXNBR(&FAXNBR) +
  0012.00                              REPLACE(*REPLACE)
  0012.01    EndDo
  0013.00    Goto Loop    /* Fetch next */
  0013.02
  0014.00 Eof:
  0015.00 EndPgm
 

This program will read through your address database, and the address
will be added to the BlueFax phonebook for each customer with a fax
number. The keyword *REPLACE in the command means, that an occurrence
already found will be corrected.