Add a Copy Statement to a Process

About this task

Use the Copy statement to create a new file or append data to an existing file. To use the Copy statement in a Process, identify the PNODE and the SNODE. Identify the source file and, if symbolic variables are used, assign values to the variables or specify built-in variables before the Process is submitted.

Connect:Direct® for Microsoft Windows supports the string (*) and character (?) wildcards, allowing you to copy multiple files from a source directory to a target directory with a single copy statement.
Note: The list of files to be copied is generated at the start of a wildcard copy. When a Process restarts, in a wildcard copy statement, the step restarts with the first file that is not completely copied. If you are using checkpointing, the statement restarts at the last checkpoint of the file that is not completely copied.

Procedure

  1. Click on New transfer > Build a transfer > Browse Script to open a Process file.
  2. Under Transfer Settings, select Add Step > Copy.
  3. To identify the step within the Process, type a label of up to 8 alphanumeric characters in Copy Statement Label.
  4. Select one of the following actions:
    • To copy a file to the SNODE, select Send.
    • To copy a file from the SNODE, select Receive.
  5. Type the name of the source file in the Source Filename field.
  6. Enter the name of the file in the Destination Filename field.
  7. Select one of the following destination disposition options:
    • NEW—To create a new file at the destination
    • RPL—To replace the information in an existing file if it exists or to create a new file if the file does not already exist.
    • MOD—To append the transferred information to an existing file.
    • SHR—To replace the information in an existing file.
  8. To enter compression and checkpoint restart options, click the Transfer tab and select from the following options:
    • To use compression, select one of the following compression types in the Compression window:
    Compression Option Description Valid Values

    None

    Turn on this option if you do not want compression.

    None

    Primary Char

    Turn on this option to compress repetitive characters. Specify the primary character to compress. If the character is repeated 2–63 times, the characters are compressed to one byte. If other characters are repeated 3–63 times in succession, the characters are compressed to two bytes.

    The hex or character to compare
    Extended

    Turn on this option to compress repetitive strings. Extended compression produces the best compression results. Specify this type of compression when lines are limited and data is repetitive.

    The Window value identifies the compression for windows. The greater the window size, the greater the degree of compression. A window size of 8 uses 1K of memory while a window size of 15 uses 128K of memory.

    Memory identifies how much virtual memory is allocated to maintain the internal compression state.

    Comp Level—Select the level of compression from 1–9.

    Window—Select the window size level from 9–15. The Default is 13.

    Memory—Select a memory compression from 1–9. The Default is 4.

    • To use checkpoint restart, select one of the following options:
      • Default—To use checkpoint restart options defined in the default Process.
      • None—To turn off checkpoint restart.
      • Check—To eliminate the need to retransmit an entire file in the event of a transmission failure. If a copy procedure is interrupted, Connect:Direct restarts that copy at the last checkpoint. If you turn on this option, type the interval at which to mark a checkpoint restart and turn on either Kilobytes or Megabytes to indicate the measurement to use.
  9. To override the preferences or provide additional parameters to describe the sending and receiving files, select one of the following:
    • To define options for the sending file, click the From <Operating system> tab, and type the sysopts parameters. Refer to the online help for more information.
    • To define options for the receiving file, click the To <Operating system> tab, and type the sysopts parameters. Refer to the online help for more information.
    Note: These tabs reflect the operating system of the sending and receiving file location.
  10. Click the Comment tab and add an optional description of the statement.
  11. Click OK.