Printing to a file

Brian K. White brian at aljex.com
Wed May 26 11:11:18 PDT 2004


George Simon wrote:
> Yes, but it is writing the header and the first record.  It only
> barfs when it tries to write the next record.
> Anyhow, that problem has been solved.  I'm not writing to that
> directory anymore, I'm writing to /tmp and it doesn't give me an
> error there.
> The problem now is that only the last record and the totals are in
> the file. I guess it is overwriting the file each time.
> How is this avoided in *nix?  It (the syntax) would work fine in
> Windows.

I would guess it's because you are running "printer file xxx" more than
once. My previous posts happens to address that as well as the possibly
changing filename at the same time.

>
> George Simon (IT Department)
> American River Logistics, LTD
> 614 Progress St.
> Elizabeth, NJ  07205
> Phone:(908)354-7746      Fax:(908)354-7491
> mailto:george at worldest.com
> http://www.americanriverintl.com/
>
>
>
> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of
> Jean-Pierre A. Radley
> Sent: Wednesday, May 26, 2004 12:56 PM
> To: FilePro Mailing List
> Subject: Re: Printing to a file
>
> George Simon propounded (on Wed, May 26, 2004 at 12:06:18PM -0400):
>>
>> Using SCO Unix filePro version 5.0.08R4
>> I need to print a report to a file.
>> I'm using this syntax in a subroutine called DEFINEP:
>>
>> DEFINEP. If        .
>>        Then:
>>
> 7  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -   -
>>        . If:
>>        Then: printer type "hp_accting"
>>
> 8  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -   -
>>        . If:
>>        Then: dt(8,mdyy)=@t4
>>
> 9  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -   -
>>        . If:
>>        Then: printer file "/u/tracking/"{3{"_onhand_"{dt{".pcl"
>>
> 0  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -   -
>>        . If:
>>        Then: filename1=""{3{"_onhand_"{dt{".pcl" ; return
>>
>> The problem is that when I run the report, the report header and the
>> first record gets written to the file and then I get this error
>> message:
>>
>> *** A System Error Has Occurred ***
>>
>> /u/tracking/1148_onhand_05262004.pcl
>>
>> On File: /u/tracking/1148_onhand_05262004.pcl
>>
>> Output Processing
>> Line Number: 29
>> Permission denied
>>
>> What do I have to do to avoid this error?
>
> See to it that user 'filepro' is permitted to write in direcotry
> '/u/tracking'.



More information about the Filepro-list mailing list