Enscribe Programmer's Guide
LITERAL name^length = 20,
pri^extent = 30,
sec^extent = 15,
file^type = 3,
rec^len = 11,
data^block^len = 4096,
key^length = 11, ! max. alternate key length
! + primary-key length
! + 2
key^offset = 0;
INT namelen;
INT error;
STRING .filename [0:name^length-1] :=
"$STORE1.SVOL1.INVALT";
namelen := name^length;
error := FILE_CREATE_(filename:name^length,
namelen,, pri^extent, sec^extent,,
file^type,, rec^len, data^block^len,
key^length, key^offset);
IF error <> 0 THEN ... ! error
Example 4: Creating a Partitioned Relative File
This example shows how to create the file illustrated in Example 1 but enables it to ultimately span
four partitions.
You could create the file by using these FUP commands:
volume $part1.svol1
>fup
-set type r
-set ext (60,30)
-set rec 112
-set block 4096
-set part (1,$part2,60,30)
-set part (2,$part3,60,30)
-set part (3,$part4,60,30)
-show
TYPE R
EXT ( 60 PAGES, 30 PAGES )
REC 112
BLOCK 4096
PART ( 1, $PART2, 60, 30 )
PART ( 2, $PART3, 60, 30 )
PART ( 3, $PART4, 60, 30 )
-create empfile
CREATED - $PART1.SVOL1.EMPFILE
Note that each partition must reside on a separate disk volume. Within those volumes, however,
the partitions all have the same subvolume name and file name (SVOL1.EMPFILE in this example).
All four partitions are created at the same time.
When all 16 extents of the primary partition (#0) have been entirely used, the file system
automatically begins using partition #1; when all 16 extents of that partition have been entirely
used, the file system then begins using partition #2; and so forth.
Using the FILE_CREATELIST_ procedure, you could create the same file by including the TAL code
in one of your application modules. The node name is not specified, so the FILE_CREATELIST_
procedure obtains the node name from the current value of the VOLUME attribute of the =_DEFAULTS
DEFINE.
LITERAL name^length = 20,
num^partitions = 3,
item^list^len = 9;
142 Relative Files