Output processing, lookups, and system calls

Dave Burris dave at kwburris.com
Wed Aug 24 11:23:46 PDT 2005


Dave Burris wrote:

> Kenneth Brody wrote:
>
>>Quoting Dave Burris (Tue, 23 Aug 2005 22:39:46 -0400):
>>[...]
>>  
>>
>>>I am running this code from *report.  The strange thing is that the
>>>ascii file is generated correctly every time.  The pdf file is also
>>>generated correctly when there are no lookup and getnext commands that
>>>run.  I walk through the code and watch the system command run, but no
>>>pdf file is created.  If I run the same command from the command line,
>>>the pdf is created ok, and if I re-run the report for an invoice with no
>>>invoice items (just time entries so the above lookup returns no invoice
>>>items), the pdf is created successfully.  It is like filePro fails to
>>>execute the command completely, but I see no error.  The system command
>>>is:
>>>
>>>::system "/appl/fp/text2pdf"<if
>>>    
>>>
>>
>>What if you replace this with:
>>
>>    SYSTEM "/appl/fp/text2pdf.debug" < if
>>
>>and create a "text2pdf.debug" script with:
>>
>>    echo "Running text2pdf.debug on file:"
>>    ls -l $1
>>    read junk
>>    /appl/fp/text2pdf $1
>>    echo "text2pdf returned with an exit of " $?
>>    read junk
>>
>>Is there any difference in the display with LOOKUP/GETNEXT and without?
>>
>>  
>>
> On OpenServer 5.0.6, I tried the above code and the text2pdf.debug 
> code never seems to run.  The screen flickers a little and that is 
> it.  So I changed the command to:
>
> SYSTEM NOREDRAW "/appl/fp/text2pdf.debug" < if
>
> Now the error stays on the screen.  It says: /appl/fp/text2pdf.debug: 
> cannot open any more files
>
> On OpenServer 5.0.7, the text2pdf.debug command runs, and I see the 
> following:
> Running text2pdf.debug on file:
> -rw------   1   fielpro   group   3727   Aug   24   11:42   /tmp/AE053181
>
> /appl/fp/text2pdf: cannot make pipe
> /tmp/AE053181.txt: No such file or directory
> text2pdf returned with an exit of 0
>
> Here is the text2pdf script:
>
>#!/bin/sh
># Print a pdf file by first converting it to postscript and then sending it to
># the gslp print script
>textfile=$1".txt"
>pdffile=$1".pdf"
>fpdir=/appl/fp
>
>dtox $1 | $fpdir/unpcl > $textfile
>
>$fpdir/text2ps $textfile > /tmp/1.ps
>$fpdir/ps2pdf /tmp/1.ps $pdffile > /dev/null 2>&1
>rm -f /tmp/1.ps
>rm -f /tmp/$textfile
>  
>
Thanks for the help with debugging.  Based on the errors we saw there, I 
increased the NOFILES kernel parameter from 110 to 220.  This seems to 
fix the issue.  Does this indicate a problem with the way I am 
generating the report? 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20050824/59bda3b7/attachment.html


More information about the Filepro-list mailing list