Moving Files from TSO to a PC WIN9X004

Ginger Carey October 1999
University of Hawaii Information Technology Services


"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.

L ogon
I dentify
F TP
E xamine

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

submits a batch job which generates a listing of the names of the active and migrated data sets for your TSO ID. For each active data set, the report lists volume serial identification, date of creation, date of last reference, DCB information, and space utilization information. Include the MEMBERS operand to list members of partitioned data sets in the report. The number and names of data sets listed will be the same as obtained by issuing a catalog node listing on TSO.

Example: mapacct
Example: mapacct members

HLIST

lists information about migrated files as the default. The more important information that you can obtain is a listing of all backup data sets by specifying the BCDS(Backup Control Data Set) operand or the BOTH (migrated and backup) operand. For a printed copy, also specify the operand SYSOUT(A). Pick up the printed copy in the ITS Keller Hall first floor lobby. You may specify SYSOUT(H) instead of SYSOUT(A) if you prefer the output go to HELD output. This command may take a few minutes to execute.

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

recalls one or more migrated data sets.

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

recovers a data set from a backup version or restores a data set from a dump copy. DSNAME is a required positional parameter and is the name of the data set to recover.

Example: hrecover myfile.data

Creating SAS and SPSS Transport Files

The files you want to move need to be in a format that is readable by another operating system. There is no conversion necessary to move your raw data files and your program source code files to your PC. However, if you are moving any SAS® or SPSS® system files, you will first need to export (convert) the files to a transport format. To create a SAS Version 6 transport file or an SPSS portable file, follow the instructions in the following examples. If you also have SAS Versi on 5 files to move, you first need to convert the Version 5 files to Version 6 using PROC V5TOV6.

SAS System File

These are the instructions to export a SAS system file into a SAS transport file using an example where the TSO ID is SHOWME and the SAS system file is named PAPAYA.SSD. A SAS t ransport file named PAPAYA.CPORT is created. When using these instructions to convert your files, substitute your TSO ID and file names.

At the TSO READY prompt, type:

copy 'sys2.migrate.sas.cport' export.sas nonum

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:

LIBNAME SASAV 'SHIRLEY.ANYFILE.SSD01';
FILENAME TRANFILE 'SHIRLEY.ANYFILE.CPORT'
SPACE=(CYL,(1,2),RLSE) DISP=(NEW,CATLG)
LRECL=80 BLKSIZE=8000 RECFM=FB;
PROC CPORT LIBRARY=SASAV FILE=TRANFILE;

Edit EXPORT.SAS:

On line 1, replace SHIRLEY.ANYFILE.SSD01 with .PAPAYA.SSD
On line 2, replace SHIRLEY.ANYFILE.CPORT with .PAPAYA.CPORT
Be sure to leave in the single quotes and prefix the file name with a period.
If your SAS file is extremely large, increase the (1,2) on line 3.

EXPORT.SAS now contains the following:

LIBNAME SASAV '.PAPAYA.SSD';
FILENAME TRANFILE '.PAPAYA.CPORT'
SPACE=(CYL,(1,2),RLSE) DISP=(NEW,CATLG)
LRECL=80 BLKSIZE=8000 RECFM=FB;
PROC CPORT LIBRARY=SASAV FILE=TRANFILE;

Run EXPORT.SAS by typing at the READY prompt:

sas inp(export.sas)

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

These are the instructions to export an SPSS save file into an SPSS portable file using an example where the TSO ID is SHOWME and the SPSS save file is named PAPAYA.SPSSYS. An SPSS portable file named PAPAYA.POR is created. When using these instructions to convert your files, substitute your TSO ID and file names.

At the TSO READY prompt, type:

copy 'sys2.migrate.spss.xport' export.spss nonum

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, EXPORT.SPSS contains the following:
Line #

 1 //SHIRLEYS JOB ,'MKE SPSS TRANSPORT',NOTIFY=SHIRLEY,
 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:

On line 1, change SHIRLEYS to SHOWMES and SHIRLEY to SHOWME
On line 7, change SHIRLEY.TRNACTN.SPSSYS to SHOWME.PAPAYA.SPSSYS
On line 9, change SHIRLEY.TRNACTN.XPORT to SHOWME.PAPAYA.POR
Note: use the file type of POR as the file name extension
On line 10, only if you have an exceptionally large SPSS save file, increase 1,2.

EXPORT.SPSS now contains the following:

 1 //SHOWMES JOB ,'MKE SPSS TRANSPORT',NOTIFY=SHOWME,
 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=SHOWME.PAPAYA.SPSSYS
 8 //TRANFILE DD DISP=(NEW,CATLG),
 9 // DSN=SHOWME.PAPAYA.POR,
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

Run EXPORT.SPSS by typing at the READY prompt:

sub export.spss

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

To select a file to copy from TSO to your PC, simply select the file name on the remote system's directory by clicking on it. If you have a PDS file on TSO, click on the folder to open the PDS and display the member names. Select the member you want to mo ve by clicking on the member name. You may select multiple file and member names to move (copy) several files and members rather than moving one at a time. Use the standard windows method of selecting multiple files with the SHIFT or CTRL key. When transf erring multiple files, the transfer mode (ASCII or binary) must be the same for all the files selected.

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:

  1. Select the TSO files to transfer.
  2. Select the file transfer mode.
  3. Open the PC directory where you want to transfer the files.
  4. Click on the left arrow button.
  5. Repeat steps 1-4, if necessary.

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

It is also possible for you to burn (copy) your TSO files to a CD-ROM. ITS's Digital Media Center (DMC) has set up a TSO download station for you to burn your files to a CD-ROM. The DMC is located in Kuykendall 105 and the telephone number is 956-9818. C all the DMC to make an appointment to use the TSO download station. You will need to bring blank CD-ROMs and have your TSO files ready to move. A CD-ROM can hold about 650 megabytes. A DMC staff member will assist you.


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

The SAS procedure PROC CIMPORT must be used to restore a SAS transport file created by the CPORT procedure. If you used the XPORT engine to create the transport file instead of PROC CPORT, you cannot use PROC CIMPORT to restore it.

This is the SAS program to restore the SAS transport file created earlier:

LIBNAME MYLIB 'C:\THESIS\';
FILENAME TRANFILE 'C:\THESIS\PAPAYA.CPORT';
PROC CIMPORT LIBRARY=MYLIB INFILE=TRANFILE;
RUN;

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

SPSS 9.0 for Windows can open an SPSS portable file. Then you just need to save the contents in SPSS format.

From the SPSS menus choose:

File
  Open

Under "Files of type:", select from the drop-down list :

SPSS portable (*.por)

Select the file you want to open and then click:

Open

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:

File
  Save As...

Under "Save as type:", select from the drop-down list :

SPSS (*.sav)

Enter a filename for the new file and then click on:

Save

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