Usage
ctunf1 <file name> <new alignment> <new flavor> <confirm> <binflag> [<files>]
Description
ctunf1 reformats a file IN PLACE provided the new alignment restriction does not cause the data record contents to become misaligned. Therefore, FairCom strongly encourages ctunf1 be used only on a copy of your data. ctunf1 takes the place of the UNIFRMAT compile time option; plus it handles data record contents if record definitions have been provided (DODA). ctunf1 is used to port data between different machine architectures.
ctunf1 uses record definitions, if present, to convert the contents of the data records. A record definition is stored as a resource in a data file using the PutDODA() function. In general, the contents of resource records will NOT be converted. Therefore, if you intend to port your files, take care with the resources you directly maintain yourself to ensure they are system independent. However, the resources pertaining to file and record definitions and index alternative collating sequences maintained by FairCom will have their contents automatically converted by ctunf1.
<file name> requires the file extension. For example, to convert a file named cust.dat from Intel to a SPARC platform, issue the following:
ctunf1 cust.dat 4 m
Parameter |
Description |
alignment |
1 (byte) 2 (word) 4 (double word) 8 |
flavor |
L (LSB first, e.g., 8086 form) M (MSB first, e.g., 68000 form) |
confirm |
Y convert file without prompting to continue |
binfllag |
optional c-treeDB binary field attribute B2 binary field data contains length count B3 binary field data does not contain length count |
files is the optional maximum number of files to open. ctunf1 defaults to 32 files, which should be sufficient for most purposes.
ctunf1 runs in single user mode only. It supports data files, index files and superfiles, and must be executed before the file is moved to the target machine.
In V11, a case was added for handling FCRES_ATTR resource type. Prior to that release, the ctunf1 utility failed with DCNV_ERR (439) error on FAIRCOM.FCS.