To test an OS/390 Native application that accesses VSAM files on the workstation, you must pre-allocate the VSAM file your program will be accessing. You can pre-allocate a KSDS, RRDS, or ESDS file on the workstation using either Btrieve 6.15 SDK or CICS.
Note: | If you have CICS installed, you also have Btrieve installed, as it is included in the CICS product. |
You cannot access a VSAM file if it is not allocated. Unlike PDS members or sequential files, which are created on the workstation if they do not exist, VSAM files must exist to be opened. When allocating a VSAM file, there are several considerations to make, depending on the type of VSAM file your program is accessing.
To allocate a KSDS file on the workstation, use the following characteristics:
You can create an editable file that contains these values. Btrieve allows you to allocate a file based on values found in a supporting file. For example, create a file on your workstation called ksds.des. The file should look like this (given that the file you are creating will contain fixed 80 byte records and has a key starting at offset 25 for a length of six):
record=80 variable=n truncate=n compress=n key=1 page=512 replace=y position=25 length=6 duplicates=y modifiable=n type=string alternate=n segment=n
From a workstation command prompt, you can enter the following transaction to create an KSDS file using the attributes provided in ksds.des:
BUTIL -CREATE filename KSDS.DES
Where filename is the name of the KSDS file you want to create. Note that when allocating a KSDS file, any of the attributes listed above can be modified.
To allocate an RRDS file on the workstation, use the following characteristics:
You can create an editable file that contains these values. Btrieve allows you to allocate a file based on values found in a supporting file. For example, create a file on your workstation called rrds.des. The file should look like this (given that the file you are creating will contain fixed 80 byte records):
record=84 variable=n truncate=n compress=n key=1 page=512 replace=y position=1 length=4 duplicates=n modifiable=n type=unsigned alternate=n segment=n
From a workstation command prompt, you can enter the following transaction to create an RRDS file using the attributes provided in rrds.des:
BUTIL -CREATE filename RRDS.DES
Where filename is the name of the RRDS file you want to create. Note that of the attributes above, only the record size, the page size, or the specification of variable can change for an RRDS file. All other attributes must be specified as shown.
To allocate an ESDS file on the workstation, use the following characteristics:
You can create an editable file that contains these values. Btrieve allows you to allocate a file based on values found in a supporting file. For example, create a file on your workstation called esds.des. The file should look like this (given that the file you are creating will contain fixed 80 byte records):
record=85 variable=n truncate=n compress=n key=1 page=512 replace=y position=5 length=1 duplicates=y modifiable=n type=string alternate=n segment=n
From a workstation command prompt, you can enter the following transaction to create an ESDS file using the attributes provided in esds.des:
BUTIL -CREATE filename ESDS.DES
Where filename is the name of the ESDS file you want to create. Note that of the attributes above, only the record size, the page size, or the specification of variable can change for an ESDS file. All other attributes must be specified as shown.