Using KSAM/XL and KSAM 64 (32650-90886)

Chapter 2 31
Creating a KSAM File
Using Related Commands
parameter values rather than item number pairs to identify file characteristics and the
KSAM key value array. Refer to Chapter 4 , “Opening and Closing the File,” for a
description of the FOPEN intrinsic.
Using Related Commands
Several MPE/iX commands can be used for KSAM files. KSAM files can be deleted and
renamed using the same commands used with standard files. File attributes can be
modified with a file equation.
Deleting a KSAM File
KSAM files can be deleted using the PURGE command. As with standard files, the file
named in the PURGE command is deleted. The accounts receivable file can be deleted using
the following command.
PURGE ARMSTR.MGR.AR
Renaming a KSAM File
The RENAME command can be used to change the name of an existing KSAM file. The file
name specified in the command is deleted. The parameters for the RENAME command are
the same as for standard files. The file name specified in the command is deleted. The first
file name is the current name of the KSAM file. The second file name is the new name of
the file.
RENAME ARMSTR.MGR, OLDMSTR.MGR.
Modifying File Attributes
The FILE command declares the file attributes to be used when an existing file is opened.
It can be used with KSAM files as well as standard files. The FILE command's keywords
(;KSAMXL, ;KSAM64, ;KEY, ;FIRSTREC, ;LANG, ;REUSE, ;NOREUSE, ;OPTMBLK and ;DEFBLK)
perform the same functions as they do for the BUILD command.
The FILE command can be used to override system default file specifications or
specifications supplied with the HPFOPEN or FOPEN intrinsic. The new specifications remain
in effect for the entire job or session unless they are revoked by the RESET command or
superseded by another FILE command.