The -std=<dialect> parameter for xddgen determines which configuration file controls the conversion. The conf directory contains one configuration file for each value of <dialect> (e.g., for ACUCOBOL, specify ‑std=acu when running xddgen acu.conf is used). The file default.conf is used if ‑std= is not specified.
You can make customized copies of these files and give them new names. Use those names when running xddgen. For example, you could make a copy of acu.conf and call it myacu.conf. Use xddgen -std=myacu to use this file.
Configuration Options
When using xddgen to create an XDD file for an FD containing a COMP‑1 field, the correct mapping depends on the COBOL compiler being used. It should be mapped into a Float for most compilers. However, the ACUCOBOL compiler defines COMP‑1 as a 16-bit signed integer, so it should be mapped to BinarySigned. To achieve this, use the following configuration property:
comp-1-16bit-signed-binary: yes
Value: signed unsigned bytes
------ -------- -----
'2-4-8' 1 - 4 2
5 - 9 4
10 - 18 8
'1-2-4-8' 1 - 2 1
3 - 4 2
5 - 9 4
10 - 18 8
'1--8' 1 - 2 1 - 2 1
3 - 4 3 - 4 2
5 - 6 5 - 7 3
7 - 9 8 - 9 4
10 - 11 10 - 12 5
12 - 14 13 - 14 6
15 - 16 15 - 16 7
17 - 18 17 - 18 8
Handling Names Larger Than 31 Characters
The xddgen utility is able to generate the XDD if a field name is larger than 31 characters to allow more flexibility in generating the XDD. Two configuration entries accommodate this situation:
The behavior when names larger than user-defined-names-len is encountered has been changed so that, instead of generating an error, it produces a warning and truncates the name to the maximum allowed length.
More xddgen enhancements
Several enhancements have been made to the latest version of xddgen:
Generate an XDD for EXTERNAL files
Support was added xddgen to generate an XDD for files defined as EXTERNAL. By default, xddgen does not generate XDD files for external files, but it is now possible to change the xddgen configuration file follows to instruct xddgen to generate XDD files for EXTERNAL files:
# If yes, generates xdd file also for "external files"
# Value: 'yes', 'no'
consider-external-file: yes
Now when an external file is ignored, xddgen generates a warning message to inform about it.
Key based on a redefine
The xddgen utility used to return an error if a key was based on a redefine of a field or, in case of split keys, if one of the specified fields was a redefine. Now the logic has been changed to allow these conditions and produce a warning indicating the situation.
It is possible to change the behavior from the default of generating a warning to the old behavior of getting an error (or even to allow it without any warning) by changing the xddgen configuration entry:
# behaviour when a key is based on a redefine of a field.
# Value: 'ok', 'error', 'warning'
key-on-redefines: warning
Rationalized xddgen behavior on error
If an error occurs while generating an XDD, the XDD will not be generated (although other XDDs may be generated). The xddgen utility will always return a value different than 0 on the occurrence of an error. This implies it is sufficient to check the return code to see if something failed during xddgen execution.
See Also: