FTPing VSAM Data Sets Using Specific Views:


We have already mentioned that a Specific view points to one data set.  Therefore, all we have to do is move into the view subdirectory, then perform our FTP as follows:

1) Move into the
View subdirectory (i.e., issue CD /VFILE), then
2) Perfrom the FTP.

Procedure:

1) Move into the View Subdirectory, VFILE:

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

 


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










      We see that the server has returned
one data file entry. This data file entry logically represents the
      real data set the view,
VFILE,  points to. 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  

      
Also, notice that the user actually knows nothing, nor should, about the details of the actual data set the
      view,
VFILE,  points to.  To the user,  it looks as if he FTPs to a black hole.  


     
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.  

2) Perform the FTP:

   
     We are now ready to perform downloads and  uploads.

                          
                                                                                                           
ftp>
ftp>
dir
200 Command okay.
150 File status okay, about to open data connection.
-rw-rw-rw-  1 vs e  none          0 Aug 12 11:17  DATA1003.TXT     
Server resolved &TH&TM
226 Closing data connection.
Perform Downloads & Uploads:


To download from, or upload to, a specific view, you simply move into, or click on,  the subdirectory
(i.e., issue
CD /VFILE) then do downloads (i.e., issue GETs) and uploads (i.e., issue PUTs) as follows:

GET file_name where file_name is the actual file you want to download to (on the client side),  and
PUT file_name where file_name is the actual file you want to upload from (on the client side).. 

For more information, please                                                     
                                                
                                                                                                           


  
Example 1: Download from, for lack of a better word, the black hole:

          
This example illustrates how to:
        
         a. Move into the subdirectory VFILE (i.e., issue CD /vfile), then
         b. As a precaution, turn off all pending values, if any, from previous SITE commands, then
         c. download data from the black hole.





















  Example 2: Upload data to the black hole:

       This example illustrates how to:
        
         a. Move into the subdirectory VFILE (i.e., issue CD /vfile),  then
         b. As a precaution, turn off all pending values, if any, from previous SITE commands, then
         c. Upload data to the black hole.


ftp>
ftp>
cd /vfile                                                               move into the vfile  subdirectory.
250 Requested file action okay, completed.
ftp>
ftp>
ftp>
literal site parm = off                                             reset all pending, or inherited, site values.       
200 Command okay.
ftp>
ftp>
ftp>
get test.txt                                                         Download from the balck hole.  
200 Command okay.                                                      

150 File status okay, about to open data connection.
226-Records sent : 000042606
    Bytes dropped:       n/a
226 Closing data connection.

ftp: 12867012 bytes received in 48.06Seconds 267.73Kbytes/sec.
ftp>
ftp>
ftp>
cd /vfile                                                              move into the vfile  subdirectory.
250 Requested file action okay, completed.
ftp>
ftp>
ftp>
literal site parm = off
200 Command okay.
ftp>
ftp>
ftp>
put c:\stuff\vse\test.txt
200 Command okay.
150 File status okay, about to open data connection.
226-Records rcvd : 000022929
      Bytes dropped: 000000000
226 Closing data connection.

ftp: 2627561 bytes sent in 91.12Seconds 28.84Kbytes/sec.
How to  FTP VSAM Data Sets Using VSAM Specific Views:
Introduction:

This page explains how  to FTP VSAM data sets using VSAM Specific views. A Specific view, as far as the client is concerned, points to one data set. Further more, all required data set attributes are presumed to have been correctly coded in the view as well. Therefore, working with these views requires neither Pointing (to vsam data sets) nor fixing (other than possibly turning off pending values generated by previous site commands).

Sample VSAM Specific View:

The following VSAM  view will be used to demonstrate how to access VSAM data sets using specific views.  Assume that the administrator already coded the following  view and saved it under the name of  VFILE.FTPC:
XFER = begin
       TYPE          = RCV
       TGT_AM    = VSAM
       TGT_FILE  = TEST.&NDL0.ESDS    
Group VSAM data sets we want to expose to the user.
       TGT_Disp   = NEW                  
Reset to empty on Uploads..  
        TGT_TYPE = ESDS                
ESDS file.
       TGT_RECF  = Fixed
       TGT_RECL  = 200
       TGT_CATALOG = VSESP        
This is the Catalog's DLBL, not the catalog's Name!!!!!!      
       CTL_FTPC_NAME = Data&TH&TM.TXT       
This name appears should the user LIST the view subdirectory.
XFER = end
click here.....
ftp>
ftp>
cd /vfile                                                         
250 Requested file action okay, completed.
ftp>
click here...
Hosted by www.Geocities.ws

1