IBM Support

Transferring a SAVF from one IBM i to another IBM i Using FTP

Troubleshooting


Problem

The following document describes how to transfer a SAVF from a library on one IBM i to a library on a different IBM i using FTP.

Resolving The Problem

If the SAVF exists on the source system, skip to Step 3.

Step 1: To create an empty SAVF on source system, run the following command:

CRTSAVF FILE(SOURCELIB/SAVEFILE)

Step 2: To save the object or library to the empty SAVF, run the following command:

SAVLIB LIB(JTEST) DEV(*SAVF) SAVF(SOURCELIB/SAVEFILE)

Step 3: To create an empty SAVF on the target system, run the following command:

CRTSAVF FILE(TARGETLIB/SAVEFILE)

Step 4: Display the library in which you created the save file to see its size.

                                Display Library                                
                                                                               
 Library  . . . . . . :   SOURCELIB         Number of objects  . :   8            
 Type . . . . . . . . :   PROD            Library ASP number . :   1            
 Create authority . . :   *USE            Library ASP device . :   *SYSBAS      
                                                                               
 Type options, press Enter.                                                    
   5=Display full attributes   8=Display service attributes                    
                                                                               
 Opt  Object              Type         Attribute               Size                    

      SAVEFILE           *FILE      SAVF                   16384                       
      TEST                   *FILE     SAVF                   16384                        

Step 5: Transfer the SAVF from the source to the target system by using FTP. From the source system, FTP to the target system name or TCP/IP address and log in.

Sample FTP procedure

lcd SOURCELIB   (changing local directory to the library where the SAVF exits on the source system)                                                      
Local working directory is SOURCELIB                                    
cd TARGETLLIB     (changing directory on target system to the library where the empty target SAVF exists)                                                        
250 "TARGETLIB" is current library.                                      
bin    (you must transfer a SAVF in binary mode)                          
200 Representation type is binary IMAGE.                                
put savefile  (put the name of the SAVF, in this case savefile, from target to source)                                                          
250  Now using naming format "0".                                      
257 "TARGETLIB" is current library.                                      
227 Entering Passive Mode (9,5,4,155,11,65).                            
150 Sending file to member SAVEFILE in file SAVEFILE in library TARGETLIB.
226 File transfer completed successfully                                
76032 bytes transferred in 0.117 seconds. Transfer rate 648.806 KB/sec.

Step 6: On the target system, again display the library where you created and transferred the save file to see its size.

                                    Display Library                                
                                                                               
Library  . . . . . . :   TARGETLIB         Number of objects  . :   8            
Type . . . . . . . . :   PROD            Library ASP number . :   1            
Create authority . . :   *USE            Library ASP device . :   *SYSBAS      
                                                                               
Type options, press Enter.                                                    
  5=Display full attributes   8=Display service attributes                    
                                                                               
Opt  Object        Type        Attribute               Size                  
     PRINT2        *FILE        PF                    8445952                        
     SAMPLE      *FILE        PF                    65536                        
     SAVEFILE    *FILE       SAVF                94208                        
     TEST             *FILE      SAVF                 16384        

Notice that the size increased. The SAVF has been successfully transferred.

Step 7: Restore object or library from the transferred SAVF.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CLbAAM","label":"Communications->FTP"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

477476577

Document Information

Modified date:
13 October 2021

UID

nas8N1013889