
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
yes but don't forget the value() statement around the filename.
"J Piper" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I don't think that will do what you want. Tino wants one (1) file per
> record, not one (1) file containing all records.
>
> Try this:
>
> for each pt_mstr :
> output to "c:\temp\" + pt_mstr.pt_part + ".txt".
> put unformatted "1".
> output close.
> end.
>
> This should create a unique file for each and every record in pt_mstr.
> The only thing you are missing in your code is the close statment.
> Try it and see if it doesn't create files with the part number as the name
> of the file, unless the part number is numeric. If so, the filename
should
> be changed to start with a character, not a number.
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Thanks a heap. I'll give it a go.!!
> >
> > On Wed, 26 Nov 2003 07:59:32 +0100, "Jens Tönsing" <[EMAIL PROTECTED]>
> > wrote:
> >
> > >[EMAIL PROTECTED]:
> > >
> > >> Hi,
> > >>
> > >> I'm trying to write a piece of progress code that will automatically
> > >> create a separate text file for each record in a table.
> > >>
> > >> The code is something like the code at the bottom of this posting but
> > >> it doesn't work. Can anyone tell me what I'm doing wrong.
> > >>
> > >> Any help would be much appreciated.
> > >>
> > >> Regards,
> > >>
> > >> Tino
> > >> ===============
> > >>
> > >> for each pt_mstr no-lock.
> > >> output to "c:\temp\" + pt_part + ".txt".
> > >> put unformatted "1".
> > >> end.
> > >
> > >Hi Tino,
> > >
> > >def var pt_part as char init "x".
> > >
> > >output to value("c:\temp\" + pt_part + ".txt").
> > > for each pt_mstr no-lock:
> > > put unformatted "1".
> > > end.
> > >output close.
> > >
> > >This will work.
> > >
> > >Jens
> >
>
>
| <-- __Chronological__ --> | <-- __Thread__ --> |