Class CopyFile

java.lang.Object
com.ibm.jzos.sample.nonvsam.file.CopyFile

public class CopyFile extends 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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    copy(String source, String destination)
    Copies a non-VSAM file as source to the other non-VSAM file as destination.
    static void
    main(String[] args)
    The main method accepts two file names as the only arguments and calls copy(String, String) to copy records from the source file to the destination file.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CopyFile

      public CopyFile()
  • Method Details

    • main

      public static void main(String[] args)
      The main method accepts two file names as the only arguments and calls copy(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(String source, 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 from
      destination - The name of the file to create and copy to