![]() | |
#1
| |||
| |||
|
|
From the moment you do a WRITESEQ you can forget about trying to do any READSEQs because you're always going to be at EOF. |
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Have I got this right...? If I do an OPENSEQ followed by one or more READSEQs, the current record pointer will be set to where the latest record just read terminated. If I do a WRITESEQ with an APPEND option then regardless of where the current pointer is positioned the data will be appended to the end of the file and the pointer will move to EOF. If I do a WRITESEQ with no APPEND option, and the current pointer is anywhere other than at EOF, the write will fail and the ELSE clause will be taken. The system might be maintaining a current record pointer but it's only ever relevant when you're READSEQing. You might as well always use the APPEND option anyway when you're WRITESEQing. From the moment you do a WRITESEQ you can forget about trying to do any READSEQs because you're always going to be at EOF. It is simply not possible to do the equivalent of a WRITEV, unless you get all complicated about it and have a before and after image, READSEQing from before-image and WRITESEQing to after-image, and PCPERFORM a !mv of after-image over before-image afterwards. I hope I'm missing something and that is it possible to simply update a line in the middle of a sequential file after all. Did someone say something recently about booze and dancing? I just gotta get back to the Sierra Hotel. Mike. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
No need to manipulate (huge) strings or arrays in program memory. |
![]() |
| Thread Tools | |
| Display Modes | |
| |