| Introduction: You can create SAM views with varying degrees of access restrictions. There are three categories of views: Shell, VTOC and specific. Shell views are the least restrictive while Specific views are the most restrictive case. VTOC views are in-between. Shell views: No restrictions. The user can point the view to any data set he chooses! VTOC views: Restrict access to a set of sequential files on one DASD Volume. Specific views: Restrict the client to one sequential file. The server, however, might point the view to different files at different times if the admin codes variables in the data set name. |
| How To Create SAM Views: |
| SAM Shell, or Generic, Views: The user can point a shell view to any data set he chooses! Therefore, access to shell views should be restricted to trusted users, if at all. The following example shows how to create a shell view. The coded statements are absolutely required. The two links provide more information about other statements you may have to code as well. Please notice that the user can transform this view into a Specific Managed-SAM, DISK-SAM or TAPE SAM view. |
| XFER = BEGIN TYPE = RCV TGT_AM = SAM XFER = END |
| VTOC Views: VTOC Views grant access to a set of SAM files on one DASD volume. The admin can use the MASK statement, in the user's PROF, to limit the user to a subset of files. The user can list the VTOC and may FTP any visible data set. With the aide of a DASD space manager, the user can even create new data sets as well. The following example shows how to create a VTOC view. The coded statements are absolutely required. The two links provide more information about other statements you may have to code as well. |
| XFER = BEGIN TYPE = RCV TGT_AM = SAM <<<== SAM (Access Method) is a keyword. Code as is. TGT_TYPE = INDEX <<<= INDEX is a keyword (means VTOC View).. Code as is. TGT_VOL = volser <<<= DASD VOLSER. . XFER = END |
| SAM Specific Views: Each SAM Specific view grants access to one sequential data set. The user can't point the view to other data sets. But the server can if the admin codes in the data set name. However, it should be noted that "the collection" of files the view points to must have identical attributes (i.e., same recformat, reclen, ..etc). There are three types of SAM specific views: 1. Managed-SAM 2. DISK-SAM 3. TAPE-SAM. 1. Managed-SAM (SAM in VSAM space) Specific Views: To correctly code a managed-SAM specific view, you must code all relevent data set attributes required by the FTP server in order to read and write the data set. For more information about managed-SAM data set attributes, please click here. The following example shows how to code a specific view for managed-SAM data sets: Notes about this view: 1) This example illustrates how to code a view to grant access to a single, or a collection of identical, SAM data set(s), in VSAM space. Notice that virtually all data set attributes are defined. This eliminates the need to issue SITE commands. 2) Also, notice that the file name has a Name of Day variable, &NDL3. Therefore, if you are writing (PUTing), or reading (GETing), on a MONday, the server writes, or reads, FILE.MON.SAM. In other words, you can use variables to have a specific view describe multiple, though identical, SAM data sets. 2. DISK-SAM (Sequential Data Set on DASD) Specific View : To correctly code a specific view for a sequential file on a DASD volume, you must code all relevent data set attributes required by the FTP server in order to read and write the data set. For more information about required data set attributes, please click here. The following example shows how to code a specific view for a DISK SAM data set: 3. TAPE-SAM (SAM on Tape) Specific Views: To correctly code a specific view for a sequential file on a TAPE volume, you must code all relevent data set attributes required by the FTP server in order to read and write the data set. For more information about required data set attributes, please click here. The following example shows how to code a specific view for a Tape data set: |
| XFER = BEGIN TYPE = RCV TGT_FILE = FILE.&NDL3.SAM * <- - Specific view.. Never put a side comment where a file name is expected.. TGT_AM = SAM * Access method: SAM... Code as shown. TGT_TYPE = VSAM * TYPE OF FILE is SAM in VSAM Space. Code as shown. TGT_DISP = Mod TGT_RECF = FB TGT_RECL = 80 TGT_BLOCKSZ = 8000 TGT_CATALOG = catalog_DLBL TGT_VOLSER = tst000 * stick the data set on this volume. TGT_SPACE_PRIM = 100 TGT_SPACE_SEC = 25 XFER = END |
| XFER = begin TYPE = RCV TGT_FILE = TEST.SAM.FILE1 TGT_AM = SAM TGT_TYPE = DISK TGT_FM = NO Unmanaged DASD... No DASD SPACE MANAGER!! TGT_RECFM = FB Record Format TGT_RECL = 121 Logical Record Length TGT_BLKSZ = 12100 Block size. TGT_DISP = SHR Disposition. TGT_BUCKET = TST000:13365-98 Volume and extents.. XFER = END |
| XFER = begin TYPE = RCV TGT_FILE = TEST.FILE1 TGT_AM = SAM TGT_TYPE = TAPE TGT_FM = NO Unmanaged DASD... No DASD SPACE MANAGER!! TGT_RECFM = FB Record Format TGT_RECL = 121 Logical Record Length TGT_BLKSZ = 12100 Block size. TGT_DISP = NEW Disposition. TGT_UNIT = 790 Tape is always preloaded onto tape drive 790 TGT_VOLSER = 123456 TGT_LABEL = Standard XFER = END |