z/OS Network File System Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Creating VSAM files

z/OS Network File System Guide and Reference
SC23-6883-00

The z/OS NFS supports three types of VSAM files: key-sequenced (KSDS), entry-sequenced (ESDS), and relative record (RRDS). However, keyed access and relative-number access to the files are not supported. Maximum file size supported for any VSAM file type is less than 4GB. VSAM files should not be defined as EXTENDED ADDRESSABILITY even though the file size may be less than 4GB. See z/OS DFSMS Using Data Sets for additional information on MVS file size limits.

If you plan to update a VSAM data set (for example, with the vi editor or with the cp copy command), the data set must have been defined with the reuse option. Trying to write back a VSAM data set that was not defined as reusable results in an "I/O error", "failure to open", or similar error message. If you create a VSAM file using the NFS, the reuse option is used by the server.

For more information on VSAM files, see z/OS DFSMS Using Data Sets.

In the following example for creating a VSAM KSDS file, the attributes indicate that:
  • Spanned records are allowed
  • Organization is key-sequenced
  • Keys are 8 bytes long and start in position 0 of each record
  • Average record size is 1024
  • Maximum record size is 4096
  • Space is allocated for 50 records with a secondary allocation of 10
  • Cross-region and cross-system share options are provided
  • The file is to be created on a volume named D80CAT
$ cp ksds.old "ksds.new2,spanned,dsorg(indexed),keys(8,0),
   recordsize(1K,4K),space(50,10),shareoptions(1,3),
   vol(D80CAT)"
In the following example for creating a VSAM ESDS file, the attributes indicate that:
  • Spanned records are allowed
  • Organization is entry-sequenced
  • Average record size is 1024
  • Maximum record size is 4096
  • Space is allocated for 50 records with a secondary allocation of 10
  • Cross-region and cross-system share options are provided
  • The file is to be created on a volume named D80CAT
$ cp esds.old "esds.new3,spanned,dsorg(nonindexed),
   recordsize(1K,4K),space(50,10),shareoptions(1,3),
   vol(D80CAT)"
In the following example for creating a VSAM RRDS file, the attributes indicate that:
  • Spanned records are not allowed
  • Organization is relative record, numbered in ascending order
  • Average record size is 1024
  • Maximum record size is 1024
  • Space is allocated for 50 records with a secondary allocation of 10
  • Cross-region and cross-system share options are provided
  • The file is to be created on a volume named D80CAT
$ cp rrds.old "rrds.new4,nonspanned,dsorg(numbered),
   recordsize(1K,1K),space(50,10),shareoptions(1,3),
   vol(D80CAT)"       

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014