Transferring Mainframe Data to AIX


Contents

About this document
Limitations
Reading a tape
Troubleshooting

About this document

This document describes how to transfer data from a mainframe to an AIX system. Information in this document is valid for AIX Versions 3.2.5 through 4.2.0.

WARNING: Please note that due to the nature and differences between mainframe data and AIX data, IBM does NOT guarantee that any data will be recoverable using any AIX commands.


Limitations

Standard label format

Mainframe tapes can be created with or without a standard label. A standard label means that there is a header image, a data image and then a trailer image. You will need to know if your tape was created with or without a standard label. This information will be used later in this document.

Field padding

If the data is actually a database, it must NOT have packed fields. Only fields padded with spaces can be transferred properly to AIX.

Record length

One major difference between mainframe and UNIX is the ability for the mainframe to have either fixed or variable length records. Only data with record lengths that are fixed can be transferred to AIX.

Block size

The blocks on the tape may be variable-length. If the block size is not variable, it will use a multiple of the record length. Block size is important and this information will be used later in this document.


Reading a tape

Standard label

First, determine if the tape is in standard label format. If the first file is not 3 records in length with a size of 80, then this tape is not in standard label format.

Enter:

        chdev -1 rmt0 -a block_size=0 
        tcopy /dev/rmt0 

The following is an example with the standard label:

        tcopy:  Tape File: 1; Records: 1 to 3; Size 80. 
        tcopy:  File:1; End of File after: 3 Records, 240 Bytes. 
        ... 

The following is an example without the standard label:

        tcopy: File:1; End of File after: 3 Records, 240 Bytes. 
        ... 

Extracting data

        EBCDIC 
        dd if=/dev/rmt0 bs=128k fskip=N conv=ascii | fold -bw R\ 
             > file.out le.out 
        ASCII 
        dd if=/dev/rmt0 bs=128k fskip=N | fold -bw R> file.out 
        Raw or Binary 
        dd if=/dev/rm0 of= file.out bs=128k fskip=N 

In the preceding example, the following values and meanings apply:

        N = 0 if the tape is not in standard label format 
            1 if it is in standard label format 
        R = record length 

Troubleshooting

The following are some known problems for which to check.

     Problem                 Resolution or Reason
-----------------------------------------------------------------------------
dd command fails       Try using a larger block size.  If you are
                       using bs=128k, try bs=512k.
data is unusable       The fields may be packed; recreate the mainframe
                       tape with padded fields.
                                            OR
                       The record length is wrong; verify the record length.




[ Doc Ref: 90605224514672     Publish Date: Mar. 02, 2001     4FAX Ref: 7463 ]