FTPing SAM Data Sets using Shell Views:

We basically convert the shell view into a specific view, then perform the FTP as per  following:

1) Move into the view subdirectory (i.e., issue
CD /SAMSHELL), then
2) Point the shell view,
SAMSEHLL,  to a real data set, then 
3) Fix all missing, or incorrect, data set attributes, then
4) Perform your FTP. 






Procedure Details:

1) Move into the subdirectory (in our case, SAMSHELL):

    Line-mode clients: issue
CD /SAMSHELL
    Graphical clients: 
click on the view subdirectory, SAMSEHLL, icon.
 
   



    Graphical clients automatically issue a DIR as soon as you click on a subdirectory icon. If you are using
    a line-mode client, and care to issue a DIR, then here is what you get back from the server:






   
Oops! Nothing (i.e., null listing). Well, this actually makes sense because our view, VSHELL, does
    not point to a real VSAM data set, yet. So, without any further ado, let's fix this problem (i.e., let's
    point to a real  SAM data set).


2) Point the view to a real SAM data set:

   
In order to do this, you, the user, must know the real data set name!
       
    Line-mode clients: issue
CD real_sam_data_set_name      
   Graphical clients: modify the path to point to the real_sam_data_set




 
    Graphical clients, again,  automatically issue a DIR as soon as you modify the path. If you are using
    a line-mode client, and care to issue a DIR, then here is what you get back from the server:







   

   
Our subdirectory is no longer empty!! It contains exactly one data file entry! What does it mean and
     where does it come from?

    Well, this data file entry logically represents the real data set the view, SAMSHELL,  now points to.
   
Please note that the server neither uses, nor cares about, this logical data file entry. Therefore, the
    user may also safely ignore it on his GETs and PUTs as well.


    The Admin can control the name you see by coding CTL_FTPC_NAME in the view. If this statement
    is not coded, the server, as a default, uses the view's name. For more information about
    CTL_FTPC_NAME statement, please see  ssssssss 

3) Fix all missing, or incorrect, data set attributes:

     We must fix all required data set attributes. The required attributes depend on storage media (tape
     or Disk), Storage manager (Tape Managmemnt System, Disk manager, VSAM) and soforth.

     As an example, let's assume that we have pointed to a managed-SAM file (i.e., our space manager is
     VSAM itself). In this case, the required attributes become those attributes required to process
     managed-SAM data sets. 

     
      



   

















4) Perform your FTP:

    Steps two and three logically, and temporarily,  transform the shell view
     into a specific view. We are now ready to upload and download data
     Please see                                                                                               
  
     Please                            for examples and snaphsots..  
For More Information About SITE commands,  please click here...
ftp> dir
200 Command okay.
150 File status okay, about to open data connection.
226 Closing data connection.
For More Information About  Required Attributes For
"Managed-SAM Data Sets (SAM in VSAM Space)", please click here....
How To  FTP Sequential Data Sets  Using  SAM Shell Views:
Sample View:

The following SAM  view will be used to demonstrate how to access SAM data sets using a shell view.  Assume that the administrator already coded the following shell view and saved it under the name of SAMSHELL.FTPC: 





Introduction:

This page explains how to FTP sequential data sets using Shell views. The idea is to logically transform, or convert,  the shell view into a specific-like view, then perform the FTP. We transform the view by a) logically pointing it to the required data set then b) provide required attributes. Once done, the view becomes very much like a specific SAM view.  

Please note that SAM shell views are most usefull when used along with some sort of a "storage space manager" such as DYNAM (for standalone sequential data sets), or VSAM (for managed-SAM files).
 
XFER = begin
       TYPE          = RCV
       TGT_AM    =  SAM
       TGT_BUCKET =  POOL:1-0          
XFER = end
tp>
ftp>
cd /SAMSHELL
250 Requested file action okay, completed.
ftp> cd  managed.sam.file                               point to real data set name.
250 Requested file action okay, completed.
ftp>
ftp> dir
200 Command okay.
150 File status okay, about to open data connection.
-rw-rw-rw-  1 vse  none          0 Aug 12 11:17 SAMSHELL          Ha! a file, not subdirectory, entry!!!!
226 Closing data connection.
ftp: 56 bytes received in 0.38Seconds 0.15Kbytes/sec.
ftp>
How to code CTL_FTPC_STATEMENTS in Views.
For More Information About  Required Attributes For
"Sequential Data Sets on Disk",   please click here....
For More Information About  Required Attributes For
"Sequential Data Sets on Tape", please click here....
How To Issue GETs and PUTs For SAM/VSAM Specific & Shell Views:
Click here...
Hosted by www.Geocities.ws

1