If you use the VSAM ENVIRONMENT option, the associated workstation VSAM data set must exist before the file is opened. You can create your data sets with a simple program. Figure 19 is an example of creating a workstation VSAM keyed data set.
/********************************************************************/
/* */
/* NAME - ISAM0.PLI */
/* */
/* DESCRIPTION */
/* Create an ISAM Keyed data set */
/* */
/* */
/********************************************************************/
NewVSAM: proc options(main);
declare
NewFile keyed record output file
env(organization(indexed)
recsize(80)
keylength(8)
keyloc(17)
);
open file(NewFile) title('/keynames.dat');
close file(NewFile);
End NewVSAM;If the data set named KEYNAMES.DAT does not already exist, PL/I creates it with that name when the OPEN statement is executed.