The copy utility can be run either three ways:
When you a start the copy utility, the following screen is displayed:
The options are:
This option will copy a file from one format (defined in a record-layout) to another format (defined by a different record-layout). It can
File Definition Screen: This screen lets you define a file and its Record Layout. It is displayed for both input File and the output file.
Field Definition: After entering the Input / Output Files, the Field definition screen is display. On this screen you define which Record & Field are to be copied an where they should be copied to.
The final screen lets you
This option copies a file from one Cobol Dialect to another Cobol dialect.
Fields are
Old File | Existing file to be converted |
New File | Output File name |
Copybook | Cobol Copybook for the file |
Input File Structure | The format of the file, uuse normal for line sequential, Fixed length Binary for file with all records the same length or the appropriate VB format for other files. |
Input Numeric Format | Choose the numeric format appropriate to your version of Cobol.
|
Input File Structure | The format of the file, uuse normal for line sequential, Fixed length Binary for file with all records the same length or the appropriate VB format for other files. |
Input Numeric Format | Choose the numeric format appropriate to your version of Cobol. |
The next screen displayed is the "final screen" where you can
File definitions: On the first screen you enter the input & output files, Record Layout of the input file + delimited file details.
Field Selection: The second screen is the field Selection screen:
On the final screen you can:
Also provided is the batch copy (either runBatchCopy.bat or runBatchCopy.sh) utility.
Usage
runBatchCopy.sh savedCopyDefinition.xml or runBatchCopy.sh savedCopyDefinition.xml -i Input_File -o Output_File
There are actually 2 ways to copy a Fixed / Delimited file to a Delimted file:
There are 4 important parts to defining files where fields are separated by a certain character:
Default | For standard Comma delimited files with names stored in the Record Layout Tables |
Delimited, names on first row | For files where the first line holds the field names |
While the package can copy from XML to fixed / delimited; The fixed / delimited layout must be setup to match the input Xml exactly.
At present, you can not copy from Fixed / Delimited to Xml but in the Editor you can:
To Copy an XML file, you should Select option 1 "Standard Copy" and the layout for the Xml file should be Xml - Build Layout (or a specific XML layout can also be used). After this it is, it is like a normal copy.