OpenSpec-Review dokumentieren und ISAM-Vertragsabweichungen beheben

This commit is contained in:
2026-09-05 17:55:09 +02:00
parent 19804e0e2d
commit 57d6386a5a
61 changed files with 3087 additions and 86 deletions

View File

@@ -0,0 +1,54 @@
' tb-screen: 80x25
' tb-tempdir
' Verschachtelte Sicherungspunkte nehmen Inhalt, Indizes und Tabellen zurueck.
TYPE R
Nr AS INTEGER
END TYPE
DIM r AS R
ON ERROR GOTO Handler
OPEN "struktur.isam" FOR ISAM R "R" AS #1
CREATEINDEX #1, "Nr", 1, "Nr"
r.Nr = 1
INSERT #1, r
BEGINTRANS
a% = SAVEPOINT
CREATEINDEX #1, "Neu", 0, "Nr"
b% = SAVEPOINT
DELETEINDEX #1, "Nr"
INSERT #1, r
CLOSE #1
ROLLBACK b%
OPEN "struktur.isam" FOR ISAM R "R" AS #1
PRINT "Saetze="; LTRIM$(STR$(LOF(1)))
SETINDEX #1, "Neu"
PRINT "Index="; GETINDEX$(1)
INSERT #1, r
CLOSE
DELETETABLE "struktur.isam", "R"
OPEN "struktur.isam" FOR ISAM R "R" AS #1
r.Nr = 9
INSERT #1, r
CLOSE
ROLLBACK a%
OPEN "struktur.isam" FOR ISAM R "R" AS #1
SETINDEX #1, "Neu"
SETINDEX #1, "Nr"
RETRIEVE #1, r
PRINT "wiederhergestellt="; LTRIM$(STR$(r.Nr))
c% = SAVEPOINT
r.Nr = 2
UPDATE #1, r
DELETE #1
INSERT #1, r
CLOSE
ROLLBACK c%
COMMITTRANS
OPEN "struktur.isam" FOR ISAM R "R" AS #1
SETINDEX #1, "Nr"
RETRIEVE #1, r
PRINT "nach COMMIT="; LTRIM$(STR$(r.Nr))
CLOSE
END
Handler:
PRINT "ERR="; LTRIM$(STR$(ERR))
RESUME NEXT