header records on an export file
Brian K. White
brian at aljex.com
Tue Sep 21 14:15:20 PDT 2004
Brian K. White wrote:
> Bob Stockler wrote:
>
>> I _think_ the -A switch works only with EXPORT ASCII.
>
> word and ascii, but not the others.
except I just tried adding a header like this in @once in an existing report
and if I put a "show @" right after the close hdr but before the end of
@once,
I can see the header in the file,
then the data export overwrites the header
the -a is not being honored.
5.0.13 sco unix
also extremely interesting:
along the way I'd made a mistake and used the alias from the main data
export in the @once header routine
and the data made it into the file!
explanation, my export process went like this:
these are all "then:" lines, and the menu batch file that runs this
sets umask 0 and zeros out the file and sets -r filename
----top----
gosub exp
csv(1)=1
...
end
exp: export word csv=(@pm) -a
return
@once:
export word tst = (@pm)
csv(1)="test"
csv(2)="test"
close tst
show "@"
end
----bottom----
I would have never expected those csv(1)="test" lines to have any affect.
I can see why they wouldn't automatically fail syntax check, but at run-time
they should cause a filepro error since at that time there is no lookup,
export, or array named csv.
since they didn't error, and since they actually took precedence over the
normal first two fields data, it's as if @once ran just _after_ processing
the first record. I don't think that is actually the case though, because I
have other things not shown here that contradict that. one is I have a
variable with a static value that I define with ",g" and fill in @once, and
then use it in every record, and it works in the first record, so @once must
have been processed before that.
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
More information about the Filepro-list
mailing list