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.
Mainframe tapes can be created with or without a standard label. A standard label means that there are a header image, the 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.
If the data is actually a database, it must NOT have packed fields. Only fields padded with spaces can be transferred properly to AIX.
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.
The blocks on the tape may be variable-length. If the blocksize is not variable, it will use a multiple of the record length. Blocksize is important and this information will be used later in this document.
First we must know 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 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. ...
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
The following are some known problems for which to check.
Problem | Resolution or Reason |
dd command fails | Try using a larger blocksize. If you are using bs=128k, try bs=512k. |
data is garbaged | The fields may be packed; recreate the mainframe tape with padded fields. |