| VSAM Data Set Attributes: |
| The following five attributes are required to successfully Up/Down-load VSAM file. You either code them in the view or change their values by issuing the corresponding SITE commands. 1) Disposition: View statement: TGT_DISP = disp where disp is SHR, NEW, OLD or MOD. SITE Command: SITE DISP = disp 2) Data Set Type: View statement: TGT_TYPE = type where type is ESDS, KSDS or RRDS/VRDS. SITE Command: SITE TYPE = type 3) Record Format: view statement: TGT_RECF = recf where recf is Fixed, Variable or Spanned. SITE Command: SITE RECF = recf 4) Record Length: View Statement: TGT_RECLEN = reclen where reclen is the logical record length. SITE Command SITE RECLEN = reclen Where reclen is the record length. 5) Catalog's DLBL: View Statement: TGT_CATALOG = dlbl where dlbl is the catalog's DLBL (i.e., DLBL for SITE Command: SITE CATALOG = dlbl the catalog that points to the data set). |
| VSAM Disposition Processing for Uploads: The file disposition you specify is first processed by the system then by the server. The system processes the disposition while opening the file. If your disposition is inconsistent with the status of the file, open fails. If the file gets opened, however, the application may, or may not, act on the disposition, as we will describe in Server Processing for the disposition you specify. System processing for the disposition you specify: DISP = NEW: Tells the system to open an empty file or a file that can be reset to empty (REUSABLE files). Needless to say that if the file is not empty, or can't be reset to empty, the system fails the OPEN request, thus resulting in immediate termination of the transfer operation. DISP = OLD: Tells the operating system to open the file. Whether the file is empty or not is irrelevant. This means that a loaded reusable file is NOT reset to empty status. DISP = MOD: Same as for DISP=OLD. Notice, however, that there is no such disposition in VSE. The server tells VSE that DISP = OLD is specified. However, the server processes DISP = OLD differently than it does DISP = MOD. Server Processing for the disposition you specify: If the operating system opens the file (everything is OK and your specified disposition makes sense to the system), the application processes the disposition you specify as follows: Disposition Processing for Empty Files: Empty files are those ones that are REALLY empty or those ones that are defined with the reusable attribute and are opened with disposition of NEW. The disposition is unconditionally changed to NEW and the file is sequentially loaded as follows: ESDS files: The file is sequentially loaded, one record after another. RRDS files: The file is sequentially loaded one record after another. VSAM automatically assigns Relative Record Numbers (RRNs), starting with RRN #1. KSDS files The file is sequentially loaded, one record after another. Keep in mind that incoming records must be in proper key sequence. Disposition Processing for Non-Empty (loaded) Files: The application processes your disposition taking into account target file type and, possibly, source file type as follows: DISP = NEW: INVALID for all VSAM file types. The system have already failed the OPEN ACB macro with X'E8'. Why? Because you are trying to open a non-empty, non-reusable file with a disposition of NEW. This is an inconsistent request. If you still want to do the transfer, please change the disposition to either MOD or OLD (depending on the sequence of incoming data) and retry the upload. DISP = OLD: Processing depends on the type of the file: ESDS Files: Incoming records are sequentially appended to the bottom of the file.. RRDS Files: Incoming records are sequentially added to the bottom of the file with RRNs automatically assigned by VSAM. KSDS Files: This value instructs the server to do direct record insertion. Incoming records, therefore, need not be sorted in key sequence. Furthermore, all errors, such as duplicate key, are ignored. DISP = MOD: Processing also depends on the type of file: ESDS Files: Incoming records are sequentially appended to the bottom of the file. This is the same as specifying DISP=OLD. RRDS Files: Incoming records are sequentially added to the bottom of the file. This is the same as specifying DISP=OLD. KSDS Files: Incoming records are sequentially added to the bottom of the file. Therefore, incoming records must be in key sequence and be consistent with those already in the file. |
| For downloads (GETs) specify SHR. For Uploads (PUTs) please see "VSAM Disposition Processing for Uploads". |