WebDocs Home | Show Navigation Hide Navigation

Appendix E: FileStack Processing

A file stack is multiple sets of fixedlength, logical records, stored in a single, physical scratch file. These logical record sets are organized in the file in a lastin, firstout (LIFO) stack manner. A file stack enables you to “stack” temporary files, rather than maintaining multiple files individually.

File stacks are maintained by the Toolkit filestack subroutines. These routines are used by Toolkit’s list processor, and can be called from your applications as well.

Introduction to filestack processing

The filestack subroutines

FS_APPEND – Append a record to the current logical file

FS_CLOSE – Close one or more logical files

FS_INIT – Initialize a filestack system

FS_OPEN – Add a logical file to the top of the stack

FS_PARAM – Get a logical file’s parameters

FS_QUIT – Terminate a filestack system

FS_READ – Read an existing record from a logical file

FS_WRITE – Write a record to a logical file