The DFCONV call batch interface

Restriction: This topic applies to Windows environments only.

Calling the Data File Converter from a COBOL program

If a profile for a conversion exists, you can invoke the Data File Converter to do the conversion using the following interface:

call dfconv using dfconv-params

where:

 01 dfconv-params   PIC X(n).
dfconv-params can be up to 1024 characters and contains the following parameters. These must be separated by spaces in the call, and file names that include spaces should be put in straight quotation marks. File names can be up to 255 characters in length.
profile-filename
The name of the profile file containing the details of the data file conversion.
-d or -D
Optional. Stops information about the call being displayed in the console. If you specify this option, do not also specify -f or -F.
-f or -F
Optional. Only displays the fixed text output; no dynamic updates displayed to the console after each record is processed. If you specify this option, do not also specify -d or -D.
input-filename
The name of the input file. Optional, but must have a value if you want to specify output-filename.
output-filename
Optional. The name of the output file. You must also specify a value for input-filename.

If you specify file names in the parameter fields as well as in the profile file, those in the parameter fields take precedence.

On return from the Data File Converter, RETURN-CODE is set to non-zero if an error occurred, and the error number is returned in the first two characters of dfconv-params.

Using the entry point DFCONVXL

Previous versions of the Data File Converter only supported file names of 65 characters, so an entry point DFCONVXL was included to support filenames of up to 255 characters. The entry point DFCONVXL is still provided and uses the same dfconv-params parameters described above.

Calling the Data File Converter from a non-COBOL program

The Data File Converter can be called from a non-COBOL program using an entry point DFCONVC, provided within the Data File Converter .dll. The dfconv-params parameters are space terminated as for the COBOL call but the parameter list is NULL terminated.