Back to SPR List Previous Next
General problem reading text files over 2Gbytes
Moderate Closed - Fixed Found:2002.20.28 *********** Fixed:2002.20.30 11 DEC 2003

DETAILS
 When text files over 2147483648 bytes long are read the file pointer gets
 misaligned and the data are not read properly. This problem can occur when
 reading dbatch data, import files, pql READ.

EXAMPLE PROGRAM
 program
 string*1016 output
 compute output = pad("","X",1016,1016)
 open big dsn="2gbfile.txt" write lrecl=1024

 for line = 1,2100000
 write (big) [format(line,-7)] 1x output (a1016)
 end for
 end program

 program
 string*1016 input
 open big dsn="2gbfile.txt" read lrecl=1024
 for line = 1,2093060
 read (big) linen (a7)
 end for
 for line = 1,10
 read (big) linen (a7) text (a20)
 write linen TEXT
 end for
 end program

WORKAROUND
Split large files into <2gb files if possible.
Back to SPR List Previous Next