Creating fixed length text file 
Author Message
 Creating fixed length text file

Hi everyone,

I am trying to create a fixed length text file from a
btrieve table with CW20. I am using the 'BASIC' file
driver.  I cannot get ito left justify and include the
extra spaces to make the records fixed length.  Does
anyone know what driver string to send when setting up
the temporary record structure to make this happen?

Thanks for the help. Please email your reply.

Tim Belding



Mon, 07 Aug 2000 03:00:00 GMT  
 Creating fixed length text file

Quote:
> I am trying to create a fixed length text file from a
> btrieve table with CW20. I am using the 'BASIC' file
> driver.  I cannot get ito left justify and include the
> extra spaces to make the records fixed length.  Does
> anyone know what driver string to send when setting up
> the temporary record structure to make this happen?

Use the DOS or ASCII driver.

For the DOS driver define you record with the desired record length +
the length of the EOR you want, if any), for example: CR/LF would be
'<13,10>' with an added length of 2, then...
  CLEAR(<PRE:>RECORD)
  <PRE:>RECORD = SUB(<whatever>,1,<REClen-EORlen>) & <EOR>
  ADD(<file>,<REClen>)

For the ASCII driver define the record with the desired length then...
  CLEAR(<PRE:>RECORD)
  <PRE:>RECORD = <whatever>
  ADD(<file>,<REClen>)

You might be able to do this with the BASIC driver, don't know since I
never use it<g>...

--



\\\  The countdown continues... LESS THAN 3 months!
///  East Tennessee Clarion Conference & Gathering
\\\  Great Smoky Mountains in Gatlinburg, Tennessee
///  Sponsored by the Knoxville Clarion Users Group
\\\  For more information go to http://www.kcug.org



Mon, 07 Aug 2000 03:00:00 GMT  
 Creating fixed length text file



Quote:
> Hi everyone,

> I am trying to create a fixed length text file from a
> btrieve table with CW20. I am using the 'BASIC' file
> driver.  I cannot get ito left justify and include the
> extra spaces to make the records fixed length.  Does
> anyone know what driver string to send when setting up
> the temporary record structure to make this happen?

I think to get the lines to pad out, you'll need to use the DOS driver with
a structure like

Line STRING(whatever)
CR   BYTE
LF    BYTE

And don't forget to set CR to <13> and LF to <10>

--
For Hire,
Tom Ruby
Industry, Illinois USA
http://www.netins.net/showcase/tomruby/
CW Resource Page -> http://www.netins.net/showcase/tomruby/clarion/



Tue, 08 Aug 2000 03:00:00 GMT  
 Creating fixed length text file

You need to use an ASCII driver with CLIP = Off, see the help for ascii
driver, send functions.

DRIVER('ASCII', '/CLIP = on | off' )

--

Regards,
Geoff Bomford
ComForMark
Computer services For Marketing
Sydney,  Australia

Quote:

>Hi everyone,

>I am trying to create a fixed length text file from a
>btrieve table with CW20. I am using the 'BASIC' file
>driver.  I cannot get ito left justify and include the
>extra spaces to make the records fixed length.  Does
>anyone know what driver string to send when setting up
>the temporary record structure to make this happen?

>Thanks for the help. Please email your reply.

>Tim Belding



Wed, 09 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem when formating a variable delimited file to fixed length

2. Breaking up an asci or txt file with a fixed length

3. problem ascii file with fixed record length

4. Binary search for fixed length ascii files.

5. fixed length reccords files

6. manipulating text files (new page length)

7. processing variable length records in text file

8. text data file record length has limit ???

9. Parsing multi-line fixed-structure text file help?

10. Question: Creating text files

11. Creating text files using sockets

12. Creating a text file on a floppy

 

 
Powered by phpBB® Forum Software