HP RPG/XL Programmer's Guide (30318-90001)

3- 23
Figure 3-19. Deleting Records From a KSAM File
Comments
1 This line defines the KSAM file, MASTFL.
Column 15 is U to indicate that the file will be updated.
2 This line reads the KSAM file, MASTFL, in a chained fashion.
Columns 18-27 contain EMPNO, which is key field name.
Columns 28-32 contain CHAIN to specify a CHAINed read operation.
Columns 33-42 contain MASTFL to name the KSAM file.
3 This line performs exception output when the appropriate record
in MASTFL is found.
4 This line defines the delete operation to be performed for
exception output.
Columns 16-18 are DEL to delete the current output record from
MASTFL.
Columns 32-37 contain DELREC to specify the EXCPT Name for the
record to be deleted.
Providing Security for KSAM Disc Files
When a KSAM file is going to be accessed by several programs, you must
decide on the type of security the file should have. If you want to
allow the programs to access the file simultaneously or do you want only
one program at a time to access the file? You specify the type of file
security with the operating system FILE command (see the
MPE XL Commands
Reference Manual
for details on the FILE command).
The following list summarizes the level of file security that you can use
for KSAM files.
* Exclusive
Exclusive access prevents others from accessing a file that is used