Getting Started with TRANSACT (32247-90007)
95
6 Data Structures
So far, the examples have made little reference to Transact’s data structures. However, if
you go back and scan each example, you will find that some form of the LIST verb exists in
each example. For many applications, what you see in the examples is all that is needed.
However, there are times when it is necessary to programmatically take more control over
Transact’s temporary data storage.
COBOL and Pascal have very well defined data structures. This chapter will compare
Transact's data structures to those used by both of these languages.
Typically, high-level application development products have data structures that are not
well defined. For many applications, this makes them very easy to work with to generate
reports and to update databases or files. By the same token, there are applications which
become, if not impossible, then extremely difficult to implement with these products
because of their weak data structures.
Let’s start by using some lines from EX40 in Figure 5-12.
Figure 6-1. Transact Data Structures
1.1 define(item) lastkey i(4):
1.2 enter i(4),init=0;
1.21 define(item) valid i(4):
1.22 yes i(4),init=1:
1.23 no i(4),init=0;
1.24 list valid:
1.25 yes:
1.26 no;
1.3 list lastkey:
1.4 enter;
2 list(auto) vorderhead;
3 list(auto) vorderline;
3.1 level;