[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Database!?



PureBytes Links

Trading Reference Links



Jim Michael wrote:

> On Sat, 6 Dec 1997, JUPU wrote:
> > The only thing is the difference between the volume database CD and the
> > text file volume...
> >
> > Here is an example of the text file:
> >
> > AABC,971205,10.2500,10.2500,10.1250,10.1250,1100,0
> > Volume is real not with an multiplikator e.g. of the Metastock database CD.
> > I think i should write a programm to convert at first the text-file volume
> > and than converting with the downloader to my database.
> > Any other possibilities??
>
> Here is a Perl script to preprocess text files prior to import into
> Metastock. You can easily modify to deal with splits based on values of
> $date, change order of prices, etc. to handle other file formats, prepend
> "19" to your date string to be Y2K compliant...
> Find the free Perl interpreter at http://www.perl.com
>
> Cheers,
>
> Jim
>
> #!/usr/bin/perl -w
> ($inputFile, $outputFile, $multiplier)=@xxxx;
> open (INFILE,"$inputFile") || die("Can't open input file $!");
> open (OUTFILE,">$outputFile") || die("Can't open output file $!");
> while (<INFILE>) {
>         chomp;
>         ($ticker,$date,$o,$h,$l,$c,$v,$oi)=split(/,/, $_);
>         $v*=$multiplier;
>         print OUTFILE "$ticker,$date,$o,$h,$l,$c,$v,$oi\n";
> }
> close INFILE;
> close OUTFILE;
> __END__

Hello JIM!!

Great!! It looks good!!!
Thank you very much for your time!!
It helps me a lot.

Juergen