[comp.databases] DBase III+ SDF formatting - summary

SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) (10/02/89)

This summary includes only responses e-mailed to me.

My original request:

>I would like to copy contents of a DBase III+ file into an
>SDF file in such a manner as to intersperse information from
>fields of the database with blank "fields" of specific length
>and location.

Roger Boissonnas (roger@tcgould.tn.cornell.edu) suggested using report
(.FRM) or SET ALTERNATE (paraphrased summary):

>You could create a dBase report (.FRM) file and run
>that report to a text file (REPORT ... TO FILE <name>).
>
>Or you could use a loop to step through your database
>and either @ .. SAY or ? and ??, making to SET
>ALTERNATE TO <name> and SET ALTERNATE ON.


and Bruce A. McIntyre  (wells!mdi386!bruce@dsinc.dsi.com) sent a
sample of the code using the technique:

>SET ALTERNATE TO filename.sdf
>SET ALTERNATE ON
>DO WHILE .NOT. EOF()
>  IF .NOT. exptcond
>    SKIP
>    LOOP
>  ENDIF
>  ? field1 + bl1 + field2 + bl2 + STR(field3,3,1) +
>bl3 + field4
>  SKIP
>ENDDO
>SET ALTERNATE OFF

Alexis Rosen  (actnyc!jsb@uunet.UU.NET) sent a sample of doing it with
SET DEVICE TO  [I think some syntax is FoxBase+ (SLO)]:

>* For dumping the entire database, based on some condition
>Set Console Off
>Set Device to MYFILE.TXT    && modified to DBase   
>                            && syntax [SLO]
>*Set Print To MYFILE.TXT    && FoxBase+ ? [SLO]
>Set Print On
>Go Top
>Do While !Eof()           && maybe in dBase III+   
>                          && this should read ".Not.Eof()"
>    If <condition>        && put the appropriate   
>                          && condition here
>        ?fld1,"    ",fld2,"         ",fld3   && etc...
>    Endif
>    Skip
>Enddo
>Set Print Off
>Set Print To
>Set Console On

My many thanks to them.

----
Stan Olejniczak               Internet:         slores@umiami.miami.edu
University of Miami, FL USA   UUCP: (temp void) gould!umbio!solejni
SLORES@UMIAMI.BITNET          UUCP: (?)         umigw!gables!slores
Voice: (305) 547-6571         FAX: (305) 548-4612  
My opinions cannot possibly represent the views of anyone else!