Enscribe Programmer's Guide
-set part (5,$part5,50,20,"TA")
-show
TYPE K
CODE 1000
EXT ( 50 PAGES, 20 PAGES )
PART ( 1, $PART1, 50 PAGES, 20 PAGES, "DA")
PART ( 2, $PART2, 50 PAGES, 20 PAGES, "HA")
PART ( 3, $PART3, 50 PAGES, 20 PAGES, "LA")
PART ( 4, $PART4, 50 PAGES, 20 PAGES, "PA")
PART ( 5, $PART5, 50 PAGES, 20 PAGES, "TA")
REC 150
BLOCK 2048
IBLOCK 2048
KEYLEN 34
KEYOFF 0
-create custfile
CREATED - $PART0.SVOL1.CUSTFILE
To create a partitioned file when using the FILE_CREATELIST_ system procedure, place the partition
information into the value array. Place the appropriate value codes into the item list.
This TAL code creates a key-sequenced file partitioned across six volumes:
?NOLIST
?SOURCE $SYSTEM.ZSYSDEFS.ZSYSTAL(FILESYSTEM^ITEMCODES)
?SOURCE $SYSTEM.SYSTEM.EXTDECS0(FILE_CLOSE_,
? FILE_OPEN_,
? FILE_CREATELIST_,
? READ)
?LIST
PROC DO^THE^WORK MAIN;
BEGIN
LITERAL name^length = 26,
num^partitions = 5,
item^list^len = 14;
INT error;
INT error2;
INT namelen;
STRING .filename[0:name^length-1]:=
"\SYS.$PART0.SVOL1.CUSTFILE";
INT .item^list [0:item^list^len-1];
STRUCT value^list;
BEGIN
INT file^type;
INT file^code;
INT rec^len;
INT block^len;
INT key^offset;
INT key^length;
INT pri^extent;
INT sec^extent;
INT partitions;
STRUCT part^info [0:num^partitions-1];
BEGIN
INT part^pri^extent;
INT part^sec^extent;
END;
STRUCT vol^name^len [0:num^partitions-1];
BEGIN
INT vol^name^act^len;
END;
84 Key-Sequenced Files