Author Topic: Bug in VSI-FAX subroutine  (Read 7554 times)

CKilgore

  • Professional
  • ***
  • Posts: 20
Bug in VSI-FAX subroutine
« on: February 10, 2010, 08:56:36 am »
I found a bug in the Prelude code to send statements via VSIFAX.  The bug is in UF PRINT.STM.FAX.  At the end of the code, it calls SEND.FAX3.  Just prior to that call there this logic:
                IF EMAIL.DOC THEN
                                PARAM = “EMAIL”
                END


On our system this was causing an error.  Once the that variable was set to EMAIL, it persisted from one statement to the next.  This was fixed by adding:
                ELSE
                                PARAM = “”
                END


The most obvious symptom of this was VSI-FAX would send emails to the user that said "vfx: Could not fill fax envelope: Cannot access file outgoing: No such file or directory"

Edit:

The final code should be:
Code: [Select]
   IF EMAIL.DOC THEN
      PARAM="EMAIL"
   END ELSE
      PARAM=""
   END
« Last Edit: February 10, 2010, 10:33:18 am by CKilgore »
Chris Kilgore
Brake Supply Co., Inc.
Prelude ADS Version 20.2

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: Bug in VSI-FAX subroutine
« Reply #1 on: February 10, 2010, 02:27:26 pm »
Anything is USER-FORMS may not be standard software - the file is used primarly for customer specific forms (e.g., Statements, in your case).

Prelude considers anything in USER-FORMS to be "custom" software.

--Tom

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1609
    • Precision Solutions
Re: Bug in VSI-FAX subroutine
« Reply #2 on: February 10, 2010, 02:32:38 pm »
Yeah, but I confirmed the same code in a half dozen sites so it all seems to be from the same base at some point in time.
-Kevin
Accidents "happen"; success, however, is planned and executed.

davidkyles

  • Associate
  • **
  • Posts: 6
Re: Bug in VSI-FAX subroutine
« Reply #3 on: February 13, 2010, 01:17:35 pm »
This is on our system as well and I am sure it has been like this for years.  I have not heard any complaints of users or customers not getting statements or receiving the above message.  Is there any specific routine you must go through to experience this?
David Kyles
EPKO Industries Inc.
Activant Prelude v21

Tom Pellitieri

  • Rock Star
  • *****
  • Posts: 224
  • Tom Pellitieri - Toledo, Ohio
Re: Bug in VSI-FAX subroutine
« Reply #4 on: February 15, 2010, 08:39:38 am »
I'm sorry I'm not much help here...

I suspect my PRINT.STM.FAX is from version 10... the copyright date is 1993, the file date has not been updated since we migrated from Pick to UniData in December 2000, and the letters "EM" do not appear together anywhere in the file.

We also use STM.PRINT.LASER rather than STM.PRINT.

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1609
    • Precision Solutions
Re: Bug in VSI-FAX subroutine
« Reply #5 on: February 15, 2010, 08:43:45 am »
I believe the issue comes up - and Chris would have to verify - when there's a bunch of statements queued to print and one of them is slated for email and the next one should go via fax.  When the VSIFax code is run, it passes EMAIL into the subroutine which then tells the VSIFax thing to attempt to email the document rather than fax it.
-Kevin
Accidents "happen"; success, however, is planned and executed.

CKilgore

  • Professional
  • ***
  • Posts: 20
Re: Bug in VSI-FAX subroutine
« Reply #6 on: February 15, 2010, 09:20:21 am »
Kevin:

Yes that is what appeared to be happening.  When we would run a batch of statements, everything worked until the first statement to fax after the first emailed statement.

David:

The process we run is /CSP "Customer Statement Printing"
Chris Kilgore
Brake Supply Co., Inc.
Prelude ADS Version 20.2

davidkyles

  • Associate
  • **
  • Posts: 6
Re: Bug in VSI-FAX subroutine
« Reply #7 on: February 15, 2010, 02:50:47 pm »
I'll give it a run through and see what breaks.  Thanks
David Kyles
EPKO Industries Inc.
Activant Prelude v21

Charles Sasaki-Skopp

  • Associate
  • **
  • Posts: 5
Re: Bug in VSI-FAX subroutine
« Reply #8 on: November 18, 2019, 01:53:05 pm »
Old topic, but useful for something I found in my system. Replying in case it comes up for anyone else, but suggested fix for this would be to modify the faxing routine SEND.FAX3 to clear PARAM after using it to set the variable DOC.FLAG:

*--------------------------------------------------------------------------
* Initialize Constants
*--------------------------------------------------------------------------
*
      DOC.FLAG=FIELD(PARAM,",",1)
      PARAM = '' ;*Clear PARAM so it doesn't get recycled* CAS*20191118

This is a fairly standard pattern in ADS software. Doing this will allow all the fax routines like PRINT.STM.FAX, INVOICE.FORMAT etc. to function properly without having to modify the PARAM block for each one.