problem ascii file with fixed record length 
Author Message
 problem ascii file with fixed record length

Hi Hugo,



Quote:
>I need to modify two characters in the first line of an ascii file with a
>fixed record length of 128.
>After modifying the characters they are written correctly to the first
>record, but the record gets truncated.  As a result a blank line is written.
>The file is processed through a LOOP after giving a SET command.

Updating an ascii file is a delicate matter;)  You can specify a
driver string for ascii files, CLIP=ON or CLIP=OFF which tells the
driver if it should clip the string before writing it to file.  If you
need to modify (not add) the first two characters, you can do that by
using:

 ASC:Line[1] = 'A'
 ASC:Line[2] = 'B'
 Put(AsciiFile)

This will place AB at the first two character positions.  

Best regards,

Arnor Baldvinsson        
[Team Topspeed - Internet Connect]
Denmark

http://www.*-*-*.com/
UIN nr.: 2428601



Sat, 01 Dec 2001 03:00:00 GMT  
 problem ascii file with fixed record length
I need to modify two characters in the first line of an ascii file with a
fixed record length of 128.
After modifying the characters they are written correctly to the first
record, but the record gets truncated.  As a result a blank line is written.
The file is processed through a LOOP after giving a SET command.

How should I proceed not to get an empty record ?

Thanks in advance for any clue.



Sun, 02 Dec 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Binary search for fixed length ascii files.

2. Record Length in Ascii File

3. Convert comma-delimited records to fixed length records

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

5. Ascii-records (with some comp fields) to plain Ascii-records

6. Variable vs. fixed-length records performance

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

8. Creating fixed length text file

9. fixed length reccords files

10. Getting true length of a variable length record - IBM Mainframe

11. Finding Variable-Length Record Length

12. processing variable length records in text file

 

 
Powered by phpBB® Forum Software