For More Information About SITE commands,  please click here...
How To  FTP Sequential Data Sets (on DISK or TAPE devices) Using  SAM Shell Views -- Examples & Snaphsots:
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
FTPing Managed-SAM Data Sets:

The following examples show how to download from  and upload to Managed-SAM data sets
using a SAM shell view.  Both examples show how to logically transform the SAM shell view into a managed-SAM specific view, then show how to issue GETs and PUTs.

To correctly transform
the SAM shell view into a Managed-SAM specific view, we must know the following:

a. Data set real name.
b. Logical record format & length.
c. physical block size, if  logical records are blocked.
d. The DLBL for the VSAM catalog that points to the data set.
e. And for Uploads, you must specify DISP, Space info and expiration date
    as well.








DownLoad Example:

          The following snapshot shows how to download a Managed-SAM data set using a SAM shell
          view. The data set attributes are as follows:

          Real name:        TEST.MANAGED.SAM.FILE
          Record format:  FB
          Record Length:  300
          Block Size:        15000
          Catalog DLBL:  VSESP



















        
Upload Example:

          The following snapshot shows how to upload to a Managed-SAM data set using a SAM shell
          view. The data set attributes are as follows:


          Real name:        TEST.MANAGED.NEW.SAM.FILE
          Record format:  FB
          Record Length:  300
          Block Size:        15000
          Catalog DLBL:  VSESP
          DISPosition is NEW (i.e., we want to create a new SAM file at the server end).
          Primary/secondary  Space Quantity: 100/10 blocks.
          Expiration Date: 2002/180




























For More Information About  Required Attributes For
"Managed-SAM Data Sets (SAM in VSAM Space)", please click here....
ftp>
ftp> cd /samshell                                                                  1) CD into SAMSHELL
250 Requested file action okay, completed.                        

ftp>
ftp> cd test.managed.sam.file                                               2) Point to real data set name.
250 Requested file action okay, completed.

ftp>
ftp> literal site parm = off                                                    3) Fix those missing data set attributes..
200 Command okay.
ftp> literal site type = vsam
200 Command okay.
ftp> literal site recf = fb
200 Command okay.
ftp> literal site recl = 300
200 Command okay.
ftp> literal site blocksize  = 15000
200 Command okay.
ftp> literal site catalog = vsesp
200 Command okay.

ftp>
ftp> get stuff.txt                                                                 4) download data into stuff.txt   
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> cd /samshell                                                                  1) CD into SAMSHELL
250 Requested file action okay, completed.                        

ftp>
ftp> cd test.managed.new.sam.file                                       2) Point to real data set name.
250 Requested file action okay, completed.

ftp>
ftp> literal site parm = off                                                    3) Fix those missing data set attributes..
200 Command okay.
ftp> literal site type = vsam
200 Command okay.
ftp> literal site recf = fb
200 Command okay.
ftp> literal site recl = 300
200 Command okay.
ftp> literal site blocksize  = 15000
200 Command okay.
ftp> literal site catalog = vsesp
200 Command okay.
ftp> literal site disp = new
200 Command okay.
ftp> literal site space_primary = 100
200 Command okay.
ftp> literal site Space_secondary = 10
200 Command okay
ftp> literal site Expiration = 2002/31
200 Command okay.

ftp>
f
tp> put test.txt                                                                         4) upload data from 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.
ftp>

FTPing Disk Data Sets:

The following examples show how to download from  and upload to Disk data sets. Both examples show how to transform the SAM shell view into a DISK-SAM specific view, then show how to issue GETs anbd PUTs.

To correctly transform the SAM shell view into a DISK-SAM specific view, we must know the following:

a. Data set real name.
b. Logical record format & length.
c. physical block size, if  logical records are blocked.
e. And we need a DASD space Manager to take care of locating extents. If you
    do not have a DASD space Manager, then please access sam files via SAM
    specific views!!!!
 









DownLoad Example:

          The following snapshot shows how to download a DISK-SAM data set using a SAM shell
          view. The data set attributes are as follows:

          Real name:        TEST.SAM.FILE
          Record format:  FB
          Record Length:  121
          Block Size:        12100
          File Manger:      YES   (i.e., volume is controlled by a DASD space Manager).
          volser:               POOL




























       
Upload Example:

          The following snapshot shows how to upload to a DISK-SAM data set using a SAM shell
          view. The data set attributes are as follows:

         
          Real name:        TEST.SAM.NEW.FILE
          Record format:  FB
          Record Length:  121
          Block Size:        12100
          File Manger:      YES   (i.e., volume is controlled by a DASD space Manager).
          volser:               POOL









For More Information About  Required Attributes For
"Sequential Data Sets on Disk",   please click here....
ftp>
ftp> cd /samshell                                                                  1) CD into SAMSHELL
250 Requested file action okay, completed.                        

ftp>
ftp> cd test.sam.file                                                             2) Point to real data set name.
250 Requested file action okay, completed.

ftp>
ftp> literal site parm = off                                                    3) Fix those missing data set attributes..
200 Command okay.
ftp> literal site type = disk
200 Command okay.
ftp> literal site recf = fb
200 Command okay.
ftp> literal site recl = 121
200 Command okay.
ftp> literal site blocksize  = 12100
200 Command okay.
ftp> literal site volser = pool
200 Command okay.
ftp> literal site fm = yes
200 Command okay.
ftp>
ftp> get stuff.txt                                                                 4) download data into stuff.txt   
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.
FTPing Tape Data Sets:

The following examples show how to download from  and upload to tape data sets. Each example shows how to transform the SAM shell view into a specific TAPE-SAM view, then shows how to issue GETs anbd PUTs.

To correctly transform the SAM shell view into a TAPE-SAM specific view, we must know the following:

a. Data set real name.
b. Logical record format & length.
c. physical block size, if  logical records are blocked.
e. Volser, Label, File Sequence number, Tape drive address, and possibly
    other attributes as well depending on whether or not the tape is controlled
    by a TMS.

Our examples assume that the tape is not controlled by TMS.









DownLoad Example:

         The following snapshot shows how to download a TAPE-SAM data set using a SAM shell
          view. The data set attributes are as follows:

          Real name:        TEST.TAPE.FILE
          Record format:  FB
          Record Length:  121
          Block Size:        12100

          Label                 Standard
          File Sequence     5                  (i.e., 5th file on the tape).
          VOLSER           901077
          UNIT                790               (volser pre-loaded on drive 790 before FTP starts).
          File Manger:      NO        No TMS
   





























 





     
Upload Example:

          The following snapshot shows how to upload to a TAPE-SAM data set using a SAM shell
          view. The data set attributes are as follows:

          Real name:        TEST.TAPE.NEW.FILE
          DISPosition:      NEW (i.e.,  create a new file on the tape.) 
          Record format:  FB
          Record Length:  121
          Block Size:        12100

          Label                 Standard
          VOLSER           901078          If empty, server creates 1st file; otherwise stacks new file at end.      
          UNIT                790               (volser pre-loaded on drive 790 before FTP starts).
          File Manger:      NO                No TMS








ftp>
ftp> cd /samshell                                                                  1) CD into SAMSHELL
250 Requested file action okay, completed.                        

ftp>
ftp> cd test.sam.new.file                                                       2) Point to real data set name.
250 Requested file action okay, completed.

ftp>
ftp> literal site parm = off                                                    3) Fix those missing data set attributes..
200 Command okay.
ftp> literal site type = disk
200 Command okay.
ftp> literal site recf = fb
200 Command okay.
ftp> literal site recl = 121
200 Command okay.
ftp> literal site blocksize  = 12100
200 Command okay.
ftp> literal site volser = pool
200 Command okay.
ftp> literal site fm = yes
200 Command okay.
ftp>
ftp> put test.txt                                                                         4) upload data from 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.
ftp>
For More Information About  Required Attributes For
"Sequential Data Sets on Tape", please click here....
ftp>
ftp> cd /samshell                                                                  1) CD into SAMSHELL
250 Requested file action okay, completed.                        

ftp>
ftp> cd test.tape.file                                                             2) Point to real data set name.
250 Requested file action okay, completed.

ftp>
ftp> literal site parm = off                                                    3) Fix those missing data set attributes..
200 Command okay.
ftp> literal site type = tape
200 Command okay.
ftp> literal site recf = fb
200 Command okay.
ftp> literal site recl = 121
200 Command okay.
ftp> literal site blocksize  = 12100
200 Command okay.
ftp>
ftp> literal site tape_label = standard
200 Command okay.
ftp> literal site tape_sequence = 5
200 Command okay.
ftp> literal volser = 901077
200 Command okay.
ftp> literal site unit = 790
200 Command okay.
ftp> literal site fm = no
200 Command okay.
ftp>
ftp> get stuff.txt                                                                 4) download data into stuff.txt   
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> cd /samshell                                                                  1) CD into SAMSHELL
250 Requested file action okay, completed.                        

ftp>
ftp> cd test.tape.new.file                                                             2) Point to real data set name.
250 Requested file action okay, completed.

ftp>
ftp> literal site parm = off                                                    3) Fix those missing data set attributes..
200 Command okay.
ftp> literal site type = tape
200 Command okay.
ftp> literal site recf = fb
200 Command okay.
ftp> literal site recl = 121
200 Command okay.
ftp> literal site blocksize  = 12100
200 Command okay.
ftp>
ftp> literal site tape_label = standard
200 Command okay.
ftp> literal site disp = new
200 Command okay.
ftp> literal volser = 901078
200 Command okay.
ftp> literal site unit = 790
200 Command okay.
ftp> literal site fm = no
200 Command okay.
ftp>
ftp> put test.txt                                                                         4) upload data from 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.
For More Information About "How To Issue GETs and PUTs For SAM/VSAM Specific & Shell Views:", please click here..
For More Information About "How To Issue GETs and PUTs For SAM/VSAM Specific & Shell Views:", please click here..
For More Information About "How To Issue GETs and PUTs For SAM/VSAM Specific & Shell Views:", please click here..
Hosted by www.Geocities.ws

1