I'm working on a Basic-Plus program under RSTS/E v07 that uses random access files. One of the files uses a record size of 32 and yet a ten record file takes up 10 blocks.
Am I wrong in thinking that these 10 records (and a few more) should fit into one block?
10 EXTEND
1000 OPEN "TSTFIL.DTA" AS FILE 2%, RECORDSIZE 32%
1010 FIELD #2%, 32% AS RD$
1020 LSET RD$ = "[123456789012345678901234567890]"
1030 FOR RN% = 1% TO 10%
1040 PUT #2%, RECORD RN%
1050 NEXT RN%
1060 CLOSE #2%
32767 END
It has been nearly 40 years since I worked with these files and I feel like I've forgotten something. Any help would be greatly appreaciated.
On 31.05.18 01:44, Nootrac90 wrote:
I'm working on a Basic-Plus program under RSTS/E v07 that uses random access files. One of the files uses a record size of 32 and yet a ten record file takes up 10 blocks.
Am I wrong in thinking that these 10 records (and a few more) should fit into one block?
10 EXTEND
1000 OPEN "TSTFIL.DTA" AS FILE 2%, RECORDSIZE 32%
1010 FIELD #2%, 32% AS RD$
1020 LSET RD$ = "[123456789012345678901234567890]"
1030 FOR RN% = 1% TO 10%
1040 PUT #2%, RECORD RN%
1050 NEXT RN%
1060 CLOSE #2%
32767 END
It has been nearly 40 years since I worked with these files and I feel like I've forgotten something. Any help would be greatly appreaciated.
Not sure if this is any help. I don't have RSTS/E, and don't have
BASIC+. However, I did try this on RSX with BASIC+2, and for that, the
one thing missing was the adding of "ORGANIZATION RELATIVE" to the open statement. After that, it worked fine, and produced a file as you would
have expected.
But I can't remember if you needed that, or if it is even a valid
keyword to OPEN in BASIC+...
On Thursday, May 31, 2018 at 11:22:22 AM UTC-4, Johnny Billquist wrote:
On 31.05.18 01:44, Nootrac90 wrote:
I'm working on a Basic-Plus program under RSTS/E v07 that uses random access files. One of the files uses a record size of 32 and yet a ten record file takes up 10 blocks.
Am I wrong in thinking that these 10 records (and a few more) should fit into one block?
10 EXTEND
1000 OPEN "TSTFIL.DTA" AS FILE 2%, RECORDSIZE 32%
1010 FIELD #2%, 32% AS RD$
1020 LSET RD$ = "[123456789012345678901234567890]"
1030 FOR RN% = 1% TO 10%
1040 PUT #2%, RECORD RN%
1050 NEXT RN%
1060 CLOSE #2%
32767 END
It has been nearly 40 years since I worked with these files and I feel like I've forgotten something. Any help would be greatly appreaciated.
Not sure if this is any help. I don't have RSTS/E, and don't have
BASIC+. However, I did try this on RSX with BASIC+2, and for that, the
one thing missing was the adding of "ORGANIZATION RELATIVE" to the open
statement. After that, it worked fine, and produced a file as you would
have expected.
But I can't remember if you needed that, or if it is even a valid
keyword to OPEN in BASIC+...
I have not seen the ORGANIZATION RELATIVE keywords in any of the Basic-Plus manuals or books I have seen. That being said, I still tried it.
I added ", ORGANIZATION RELATIVE" to the end of line 1000 and got "?Modifier error at line 1000"
On 2018-06-02 18:58, Nootrac90 wrote:
On Thursday, May 31, 2018 at 11:22:22 AM UTC-4, Johnny Billquist wrote:
On 31.05.18 01:44, Nootrac90 wrote:
I'm working on a Basic-Plus program under RSTS/E v07 that uses random access files. One of the files uses a record size of 32 and yet a ten record file takes up 10 blocks.
Am I wrong in thinking that these 10 records (and a few more) should fit into one block?
10 EXTEND
1000 OPEN "TSTFIL.DTA" AS FILE 2%, RECORDSIZE 32%
1010 FIELD #2%, 32% AS RD$
1020 LSET RD$ = "[123456789012345678901234567890]"
1030 FOR RN% = 1% TO 10%
1040 PUT #2%, RECORD RN%
1050 NEXT RN%
1060 CLOSE #2%
32767 END
It has been nearly 40 years since I worked with these files and I feel like I've forgotten something. Any help would be greatly appreaciated.
Not sure if this is any help. I don't have RSTS/E, and don't have
BASIC+. However, I did try this on RSX with BASIC+2, and for that, the
one thing missing was the adding of "ORGANIZATION RELATIVE" to the open
statement. After that, it worked fine, and produced a file as you would
have expected.
But I can't remember if you needed that, or if it is even a valid
keyword to OPEN in BASIC+...
I have not seen the ORGANIZATION RELATIVE keywords in any of the Basic-Plus manuals or books I have seen. That being said, I still tried it.
I added ", ORGANIZATION RELATIVE" to the end of line 1000 and got "?Modifier error at line 1000"
Ok, so not valid in BASIC+ then. Oh well. I guess someone should take a
look in the BASIC+ manual on PUT as well as OPEN, and see if there are
any hints on this in there.
Sorry that I couldn't help.
Johnny
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 351 |
Nodes: | 16 (2 / 14) |
Uptime: | 31:12:36 |
Calls: | 7,634 |
Files: | 12,796 |
Messages: | 5,689,018 |