Moving Files from TSO to a PC | WIN9X004 |
|
|
October 1999 | |
"Every big problem was at one time a wee disturbance." — Unknown
Moving TSO files to another platform is one of those tasks that is easy to keep putting off until another day. However, time is running out to move your files from TSO to another platform. If you wait until the final days of access to TSO to move your files, it will likely be a big problem for you and for Information Technology Services (ITS).
In four easy steps, I will show you how to give your TSO files a new life on your PC. Using the word LIFE, I made an acrostic to simplify and help you to remember the steps.
LOGON
Logon to your TSO ID. If you cannot remember your password or have problems logging on, call the ITS Help Desk at 956-8883 or send e-mail to tsomove@hawaii.edu.
IDENTIFY
Identify the files you want to move. You will need to make some decisions about which files to move. In selecting the files you want to move, consider these three things:
You probably have active files, migrated files and files that are stored on the backup tapes. Only active files are transferable. You need to recall migrated files and recover backup files for them to be active files. Recall any migrated files and reco ver any backup files that are no longer in your catalog and are on the backup tapes if you think you may need them. The TSO commands MAPACCT, HLIST, HRECALL, and HRECOVER will help you locate your files and restore the migrated and backup files to active files. Below are brief descriptions and examples of each command. For complete information on these commands, on TSO type "h" followed by the command-na me, such as "h hlist".
MAPACCT
Example: mapacct Example: mapacct members
HLIST
For many ID's, the number of data sets listed will be greater than the number listed by issuing a catalog node listing. Cross-check the two listings and identify files to recover using the HRECOVER command.
Example: hlist both sysout(a)
HRECALL
For a faster and easier method to recall several data sets, go to ISPF panel 3.4 (Data Set List Utility). Press enter to display the data set list. When the data set list is displayed, type "hrecall" in the Command field by a da ta set name you want to recall. Then enter "=" by additional data sets names you want to recall. The "=" symbol means to execute the previous command.
HRECOVER
Example: hrecover myfile.data
Creating SAS and SPSS Transport Files
SAS System File
At the TSO READY prompt, type:
This creates a file named EXPORT.SAS on your TSO ID. This file is a template of a SAS program to copy a SAS library to a SAS transport file. Modify this file to contain the correct filenames. Initially, EXPORT.SAS contains the following:
Edit EXPORT.SAS:
EXPORT.SAS now contains the following:
Run EXPORT.SAS by typing at the READY prompt:
If EXPORT.SAS does not run successfully, delete the transport file the job created, make any necessary changes to the SAS program and rerun. In the above example, you would delete PAPAY A.CPORT, make changes to the SAS program EXPORT.SAS and rerun.
After EXPORT.SAS successfully, compare the number of observations in the SAS transport file with the SAS system file to verify that the transport file is complete.
Another method of creating a SAS transport file is to use PROC COPY and the XPORT engine. When you want to select specific data sets in a SAS library, you need to use PROC COPY.
SPSS Save File
At the TSO READY prompt, type:
This creates a file named EXPORT.SPSS on your TSO ID. This file is a template of an SPSS program to copy an SPSS save file to an SPSS export file. Modify this file to contain the correct filenames. Initially,
Line #
2 // MSGLEVEL=(1,1),MSGCLASS=H
3 /*JOBPARM TIME=4
4 //* CREATES A SPSS TRANSPORT FILE ON TSO DISK.
5 //* INPUT IS A SPSS SYSTEM FILE ON DISK.
6 // EXEC SPSS
7 //SPSSDATA DD DISP=SHR,DSN=SHIRLEY.TRNACTN.SPSSYS
8 //TRANFILE DD DISP=(NEW,CATLG),
9 // DSN=SHIRLEY.TRNACTN.XPORT,
10 // SPACE=(CYL,(1,2),RLSE),UNIT=TSODA,
11 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
12 GET FILE=SPSSDATA
13 DISPLAY DICTIONARY
14 LIST CASES FROM 1 TO 20
15 EXPORT OUTFILE=TRANFILE /MAP
Edit your EXPORT.SPSS file:
EXPORT.SPSS now contains the following:
Run EXPORT.SPSS by typing at the READY prompt:
The output from the batch job is routed to HELD output for you to view on TSO.
If you need to rerun EXPORT.SPSS, delete PAPAYA.POR first.
Now you can logoff TSO and move your TSO files to your PC using FTP. FTP can transfer both sequential and partitioned (PDS) files.
FTP
FTP is simple to use and allows you to transfer files to or from another system on the network. You can download (copy) the files to your PC from TSO using FTP. Make sure that you have enough disk space on your PC for all the files you plan to transfer . If you do not have an FTP program on your PC, WS_FTP® works on an MS-Windows based computer system and is available from www.hawaii.edu/help/software/pcsoft.html
When you start WS_FTP, the program will display a "Session Profile" screen similar to the following screen.
On this screen specify testmvs.its.hawaii.edu for "Host Name" (the site you wish to connect to), your TSO login ID for "User ID" and your password. Leave the "Host Type:" field set as "auto detect", and the "Accou nt:" field blank. You may want to save this particular combination of site name and account information under a profile name. To do this, specify a "Profile Name" of your choice and then click on the "Apply" button. To use a previously defined profile nam e, click on the drop-down list button to the right of "Profile Name:" then click on the desired profile name. To actually log into TSO, click on the "OK" button. WS_FTP will proceed to connect to your TSO ID.
Logging into TSO will take a few seconds. Once logged in, WS_FTP will display a listing of the current directory for both the local system (your PC) and the remote system (TSO). These lists may also take a few seconds to be displayed. The directories a nd files on your PC are displayed on the left and your TSO files on the right of the WS_FTP screen. TSO partitioned data sets (PDS) are displayed as folders in the TSO directory. If a PDS file is not being displayed as a folder, the file might have been m igrated from the system. A simple listing of the file will recall the data set. It will then display properly as a folder.
The WS_FTP screen looks like this:
How to Use the WS_FTP Screen
Directly below the local and remote directory windows, you will see three buttons labeled ASCII, Binary, and Auto. For most TSO files, you want the transfer mode to be ASCII. The notable exception is SAS transport files which must be transferred in binary mode. Select the format by clicking the button. Remember to select the transfer mode you want before clicking the transfer arrow button.
The next step is to open the directory on your PC to which you want to transfer the files. Above the file names are the subdirectories names within the current directory. To change to one of the subdirectories on your PC, click on the name, then click on the "ChgDir" button. The file listing for that directory will automatically be displayed. If not currently at the top level (or "root") directory, an entry for ". ." will appear as one of the directories. Changing to that directory will place you in th e directory that is the "parent" directory for the previous one. Different disk drives are also indicated on the local system's directory --- changing to "[-a-]" will switch to the A: disk drive.
To transfer (copy) the files to your PC, press the "<-" left transfer arrow button located between the list boxes.
Briefly, these are the steps to transfer files:
WS_FTP has good online documentation. Click on the button marked Help at the middle bottom of the WS_FTP screen for additional information and assistance.
To log off TSO, simply click on the "Close" button in the bottom left corner of the WS_FTP window. The remote system directory information will be cleared from the screen, and the "Close" button will be relabeled as "Connect." Click on the "Exit" butto n in the bottom right corner to end WS_FTP.
Copying Files to a CD-ROM at the Digital Media Center
EXAMINE
To complete the task of moving from TSO to your PC, examine the files that you moved to your PC. Look at your raw data files and program source code files to verify that the entire contents of the files were downloaded. Import (convert) the SAS transpo rt files and the SPSS portable files back to SAS system files and SPSS format data files respectfully and then view the contents.
Importing a SAS Transport File
This is the SAS program to restore the SAS transport file created earlier:
The entire SAS data library is restored to the subdirectory specified on the LIBNAME statement. Once you have verified that the SAS data and catalogs files are OK, you can delete the SAS transport file.
Importing an SPSS Portable File
From the SPSS menus choose:
Under "Files of type:", select from the drop-down list :
Select the file you want to open and then click:
The contents of the SPSS portable file are displayed in the Data Editor window. The next step is to save the data in SPSS format.
From the SPSS menus choose:
Under "Save as type:", select from the drop-down list :
Enter a filename for the new file and then click on:
Once you have verified that the SPSS format data file is OK, you can delete the SPSS portable file.
Now is the time to begin moving from TSO to your PC. If you have questions or need assistance with migration, send e-mail to tsomove@hawaii.edu or call the ITS Help Desk at 956-8883.
"Begin -- to begin is half the work, let half still remain; again begin this, and thou wilt have finished." — Ausonius