IBM Support

Copy from Tape (CPYFRMTAP) Information

Troubleshooting


Problem

This document explains the parameters needed in the CPYFRMTAP command.

Resolving The Problem

Overview

The Copy to Tape (CPYTOTAP) command allows copying of data from the IBM System i system to tape. The Copy from Tape (CPYFRMTAP) command allows copying of data from a tape to the System i system. Generally, these tapes are created for use with non-System i systems as means to transfer data.

Reference Materials

o CL Programmer's Guide

Details

The following are steps on how to use the CPYFRMTAP command for both Standard Label tapes and Non-labeled tapes.

Standard Label Tape

Issue the Display Tape (DSPTAP) command for the *LABEL information. Do the command to *PRINT or write down the following data: volume ID, data file label, record block format, record length, and block length. If it is printed, it would look like the following example:

5738SS1 V2R2M0 920925          TAPE VOLUME INFORMATION                          
Device . . . . . :    TAP01       Volume . . . . . . .: IBM                    
Owner ID . . . . :                     Density  . . . . . .: 6250                    
Type . . . . . . :      *SL            Code . . . . . . . .: *EBCDIC                
                                 Record                                                      
                       File    Block     Recg      Record  Block     File          MVOL                    
Dta File Lbl   Seq    Format  Tech       Length  Length   Length    Ind                    
FILE1            0001    *FB                       00133    01330    000322                        


To create a physical file on the System i system with the same record length as the one on the tape, on the operating system command line, type the following:

CRTPF IBMLIB/TEST RCDLEN(133) MAXMBRS(*NOMAX) SIZE(*NOMAX)

Issue the OVRTAPF command by typing the following on the operating system command line:

OVRTAPF FILE(QSYSTAP) DEV(TAP01) VOL(IBM) +
REELS(*SL) LABEL(FILE1) RCDLEN(133) +

BLKLEN(1330) RCDBLKFMT(*FB)

Then do the CPYFRMTAP command by typing the following on the operating system command line:

CPYFRMTAP FROMFILE(QSYSTAP) TOFILE(IBMLIB/TEST) +
MBROPT(*REPLACE)


Note: All other parameters are filled in from the override command. On the MBROPT parameter, either *REPLACE or *ADD is used.

A message at the bottom of the screen indicates that records are being copied.

Nonlabeled Tapes

These are handled differently. The record length and block length must already be known by the person who created the tape. The DMPTAP command output can be used to retrieve the block length but not record length. Record length is an attribute stored in the volume labels for a standard labeled volume, for *NL tapes there are no labels that tell us what the record length is. If *NL tapes are used, it is the responsibility of the user that created the tape and the one doing the restore to understand the data format, record length and block length used. The DSPTAP command output for a *NL tape will not display label information, only the following appears:

Note: This information is the result of the following command:

DSPTAP *LABELS OUTPUT(*PRINT) )

5738SS1 V2R2M0 920925                 TAPE VOLUME INFORMATION                  
Device . . . . . :   TAP01                Volume . . . .:                      
Owner ID . . . . :                        Density  . . .: 6250                  
Type . . . . . . :      *NL               Code . . . . .:                      

(No file label information available)            

The same commands from above are used. The only change is on the parameters used for the OVRTAPF command. On the operating system command line, type the following:

OVRTAPF FILE(QSYSTAP) DEV(TAP01) REELS(*NL) +
RCDLEN(133) BLKLEN(1330) RCDBLKFMT(*FB)


Press the Enter key.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CMjAAM","label":"Tape"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

5061017

Document Information

Modified date:
29 March 2025

UID

nas8N1013357