Instead of using the file system intrinsic FOPEN to create the KSAM file, you can create the file with the >BUILD command of the KSAMUTIL program. Once created, the file can be opened with a call to FOPEN or CKOPEN. (Note that CKOPEN cannot be used to create a file.)
The same file created in Figure 5-1 “Creating and Writing to KSAM File in FORTRAN” with FOPEN could be created in KSAMUTIL as follows:
:RUN KSAMUTIL.PUB.SYS
<BUILD FEXAMFIL;REC=-72,10,F,ASCII;DEV=DISC;DISC=100;&
KEYFILE =FKEYFILE;KEY=B,1,20;KEY=B,21,8;FIRSTREC=1
|