Backbutton

Example 51

Example 51 - Copying contents of one Archive Volume file into another Archive Volume file
 
    COPY *METALOGIC/COPYWRITE                                                     
      TO #MYTESTVOLUME(CD,HOSTNAME=LOCAL)[T];                                     
    IF (T(TASKVALUE) = 0) THEN                                                    
    BEGIN                                                                         
      T(STATUS=NEVERUSED);                                                        
      COPY *VOLUME                                                                
        FROM #MYTESTVOLUME(CD,SCRATCHPOOL=LMCD,                                   
                           LOCKEDFILE,HOSTNAME=LOCAL)                             
        TO   #(MYTESTVOLUME & "A")(DISK)[T];                                      
    END;                                                                          
 
  1. An archive volume file may be copied to another archive volume file. The copy is a copy of the physical sectors in the volume, without reference to the file systems contained within.
  2. The LOCKEDFILE attribute indicates that the source is an archive volume on disk, and the SCRATCHPOOL selects a file system, from which to learn the size of the volume in sectors. All file systems have the same value for the size of the volume, so any one can be selected.
  3. A normal LIBRARY/MAINTENANCE copy of the volume does the same thing and much faster.