Bug in @DONE?

Bruce Easton bruce at stn.com
Thu Feb 22 08:28:28 PST 2007


> Ken Brody wrote on Wednesday, February 21, 2007 10:36 AM:
>
> Quoting Fairlight (Tue, 20 Feb 2007 22:12:46 -0500):
>
> > fP 5.0.14D4, SCO 5.0.6
> >
> > Weirdest thing.  Using rreport, someone had a problem with their code
> > not working correctly for an empty output format.  And I do mean
> > empty...no characters in any section.  Here's how I understand it
> > (roughly):
> >
> > There was a processing table being run for sort/selection, and it was
> > very simple, just a select;end.
> >
> > For the output processing, they had a table that had an @DONE section.
> > This whole thing worked fine when there were records selected.  However,
> > if no records were selected, they were getting the error "lp: no printer
> > specified".
> [...]
> > Turns out, if I set PFWGT0=ON and changed @DONE to @WGT, it miraculously
> > started working in both cases, not just the one case.  The problem
> > entirely went away, rreport started exiting with proper 0 exit code.
> [...]
>
> What is in the @DONE (now @WGT) event?
>

Ken - following is the actual @wgt processing that works fine and
evidently does not produce exit code 1, as Mark indicated.  Using
@done instead of @wgt here produces exit code 1 (only in the case
where no records are selected).  (SCO Unix - fp 5.0.14 - we've
tried this with different combinations of printers or file
destinations on the form or using the PRINTER command in
processing, but that didn't seem to make any difference in this
exit code.)

Bruce

Bruce Easton
STN, Inc.

  8  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
@wgt     If: @ts lt "1"
       Then: goto nunsel
  9  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :tx "<tr><td>"{@ts<"Records Selected</td></tr>"
 10  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :tx "</table></body>"
 11  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If: 'close output document
       Then: html :cl
 12  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: end
 13  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: '*******************************************
 14  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
nunsel   If: 'no records selected
       Then:
 15  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: xy=getenv("ONEGATE_OUTFILE"){""
 16  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :cr xy
 17  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :tx "</head><body>"
 18  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :tx "No records were selected."
 19  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :tx "</body>"
 20  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: html :cl
 21  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
         If:
       Then: end






More information about the Filepro-list mailing list