EasyManua.ls Logo

Commodore 2031 - Creating a File

Commodore 2031
98 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Two sequential files are used to support the random access file in this example.
Each file bears the name of the file name given in the CREATE file code (lines
1100 to 1180) plus a six-character extension. Since primary file names are ten or
less characters, the file names are padded with spaces. The two files are named
FILENAME .DESCR and FILENAME .KEY01.
The descriptor ( .DESC) contains information about record structure and
location. The primary key file ( .KEY01) contains the first field of each record
and the relative record number. This example allows the random records to
reside on a separate diskette from the sequential support files, thereby providing
added room for random data. The OPEN code (lines 1200 to 1275) requires the
disk ID of the random file disk for comparison.
NOTE
The DOS Support Program must not be in the computer
when running this program.
To Create A File:
STEP 1. Insert the Demo Disk
STEP 2. Type: LOAD “RANDOM*”,8 and press RETURN
This loads the Random Program
STEP 3. Type: OPEN 15,8,15 and press RETURN
This opens the command channel.
STEP 4. Remove the Demo Disk and insert a blank disk.
STEP 5. Type: PRINT#15,”N0:MAILING LIST,CS” and press RETURN
STEP 6. Type: RUN and press RETURN
The screen displays: “DO YOU WISH TO CREATE A FILE”?
STEP 7. Type: Y and press RETURN
The screen displays: “RANDOM FILE NAME”?
STEP 8. Type the file name: PHONE LIST and press RETURN
The screen displays: “KEY FILE DRIVE NUMBER”?
STEP 9. Type: 0 and press RETURN
The screen displays: “RANDOM FILE NUMBER”?
57

Table of Contents

Other manuals for Commodore 2031

Related product manuals