Date: Wed, 13 Mar 1996 19:31:00 EST
Reply-To: William Landrum <0006762366@MCIMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: William Landrum <0006762366@MCIMAIL.COM>
Subject: Re: FTPing SAS programs from IBM mainframe
Susan Rubb <rubb@srubb.scs.jhu.edu> wrote:
> I'm trying to use FTP to get some SAS programs off of an
> IBM/CMS mainframe. Through telnet I have used the access
> command to get to the files but I don't know how to move
> around this system via FTP. . . . How would I go about
> getting files located there via FTP?
I am not the strongest person in this area, but I think that
having TELNET and TCP/IP access to the mainframe does not
guarantee that you have FTP access. The simplest way to check to
see if you do, is to go to the mainframe, and manually issue the
command FTP. If it won't work, then you probably don't have
access.
We do have FTP at our MVS sites, and TCP/IP at our desktops, so I
have been moving a lot of programs and data between MVS and my PC
this year. My observations in that somewhat similar environment
may give you some ideas for FTPing to/from CMS.
Depending upon your PC software, an FTP can be initiated from the
PC or from the mainframe. If it won't work both ways, then you
have to go from the PC to the mainframe. If you don't have any
software on your PC other that what came with the operating
system, then Windows for Workgroup has to be initiated from the
PC, whereas Windows NT, OS/2, and I think Windows 95 can be
initiated from either end. If you have an add-on product (such
as Chameleon) then you may have to set up IDs and passwords in
FTP server software to initiate an FTP session from the
mainframe. I set up IDs and passwords with the OS/2 TCP/IP
product so that I can initiate FTP transfers from the mainframe
to my PC.
The beauty of initiating FTP from the mainframe, is that you may
be able to do it in batch. I have gotten to the point where I
run several jobs each month in SAS on MVS, and then have the job
automatically FTP the data to my PC. Here is an example job that
does that:
//XXXXXXX JOB . . . ,LANDRUM,TIME=3,
// MSGCLASS=T,NOTIFY=XXXXXX,MSGLEVEL=(2,0)
//*--------------------------------------------------------------------
//STEP1 EXEC UCC11T
//*--------------------------------------------------------------------
//DOWNLOAD EXEC SAS6,OPTIONS= . . . ,SASAUTO= . . .
//DNLD DD DSN=XX.XXX.TXT,DISP=(,CATLG,DELETE),
// DCB=(RECFM=VB,LRECL=1000,BLKSIZE=27998),
// MGMTCLAS=PERMBKUP,STORCLAS=STANDARD,
// SPACE=(TRK,(10,10),RLSE)
//ABC DD DSN=YYY.YYYY.YYYY.DATALIB,DISP=SHR
//SYSIN DD *
DATA _NULL_;
SET ABC.DEF;
. . .
FILE DNLD . . .;
PUT . . .;
//*
//* USE FTP TO COPY MAINFRAME DATASETS TO MY PC
//*
//FTP EXEC PGM=IKJEFT01
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
FTP 999.99.999.999 (the IP address for my PC)
my_pc_id my_pc_password
CD \FTPDNLD
PUT 'XX.XXX.TXT' ABCDATA.TXT
QUIT
The above example is for a flat data file. The VB format is used
so that the lines get trimmed upon download. When downloading
raw data, I typically use TAB delimiters. PC SAS and MS Access
both read the data OK that way. The FTP process automatically
converts the EBCDIC TAB to an ASCII TAB.
When I am downloading data to be read by PC SAS only, then I use
the SAS export engine on the mainframe, and add the line "BINARY"
to my FTP commands. It works fine.
--Bill Landrum
--------------------------------------------------------------
Dr. Wm. L. Landrum | Internet: WLandrum@MCIMail.com
Small Business Analysis |
MCI Telecommunications Corp. | MCI Mail: 676-2366
MCI Center--7583/132 |
Three Ravinia Drive | Tel: 770-668-6694
Atlanta, GA 30346-2102 | Fax: 770-668-6927
--------------------------------------------------------------
|