Please enable JavaScript to view this site.

A-Shell Consolidated Reference

CREATE <file>, <blocks>

CREATE allocates and fills a file with the specified number of 512-byte blocks.

Under AMOS, "random" or "contiguous" files are actually different in structure from the normal "sequential" files, and as the name implies, are allocated in contiguous space. Under Windows and Unix, there is no equivalent concept, nor is there a need for one. All data files can be accessed using either the "random" access method or the sequential method. In fact, a file allocated with CREATE could later be accessed as if it were a sequential file. Since there is no perfect way to recognize whether an existing file was created with CREATE (and thus should be treated as a "random" file) or via a sequential output process, A-Shell can only guess based on whether the file size is a perfect multiple of 512 bytes. If so, there is a very good likelihood that it was intended to be a random file. If not, then it must be a sequential file. The only significance of this decision is for the DIR/F operation (which indicates contiguous files with a "C"), and for the ASB LOOKUP statement, which by default returns a negative number to indicate random or contiguous files. The miame.ini setting OPTIONS=ABSLOOKUP eliminates that distinction, causing all files to be reported as positive numbers.

The OPTIONS=BRKALC switch in miame.ini affects what the newly allocated file is pre-filled with. When set, the file is filled with brackets (]]]]). Otherwise, the contents will be whatever was previously occupying that disk space.