Submitted by Anonymous (not verified) on Mon, 03/19/2001 - 00:00
Forums

Is it possible to merge my existing address database to BlueFax and "BlueFax Client 2000" database?

Full name
Administrator

admin

Mon, 03/19/2001 - 00:00

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

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

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