Getting Started with TRANSACT (32247-90007)
76 Chapter4
Using KSAM and MPE
Using KSAM
Using KSAM
Adding Records
Adding a record to a KSAM file uses the same verbs and syntax as adding a record to an
IMAGE dataset. Compare this program with Ex9 in Figure 2-3.
Figure 4-1. Program to Add Data to a KSAM File
1 The KSAM= option names the KSAM file to be accessed. The default
access is READ only. The most inclusive capability is UPDATE.
Figure 4-2. Adding Data to a KSAM File
1 system ex32,ksam=kcust(update);
2 set(delimiter) "/";
3 level;
4 prompt cust-no;
5 prompt name;
6 put kcust;
7 end;
CUST-NO> 301
NAME> Wheeler Dealer
CUST-NO> 301
NAME> My Place
*ERROR: DUPLICATE KEY VALUE (FSERR 171) (KSAM 171,4,KCUST)
CUST-NO>