- java.lang.Object
-
- com.ibm.jzos.sample.nonvsam.file.CopyFile
-
public class CopyFile extends java.lang.Object
This sample demonstrates how to copy data from one file to another, appending to the second file if it already exists. The file names are given as arguments.- Since:
- 2.4.0
- See Also:
ZFile
-
-
Constructor Summary
Constructors Constructor Description CopyFile()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copy(java.lang.String source, java.lang.String destination)
Copies a non-VSAM file as source to the other non-VSAM file as destination.static void
main(java.lang.String[] args)
The main method accepts two file names as the only arguments and callscopy(String, String)
to copy records from the source file to the destination file.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
The main method accepts two file names as the only arguments and callscopy(String, String)
to copy records from the source file to the destination file.- Parameters:
args
- The names of the files to read from and write to
-
copy
public static void copy(java.lang.String source, java.lang.String destination)
Copies a non-VSAM file as source to the other non-VSAM file as destination.- Parameters:
source
- The name of the file to read fromdestination
- The name of the file to create and copy to
-
-