Problem:
Under Windows Operating Systems, text files have a record terminator of Carriage Return-Line Feed (hex'0D0A), under UNIX, the record terminator is only a Line Feed (hex'0A').
If you need to share these files between UNIX and Windows, you have to convert the record terminator after each transfer (or FTP the file as ASCII).
What happens if the file needs to be shared simultaneously between the two environments via a shared network drive?
Resolution:
There is a file handler configuration option called 'LSRECDELIM' which allows you to specify what record delimiter to use for Line Sequential files.
The default for Windows is LSRECDELIM=0D0A and LSRECDELIM=0A for UNIX.
This is defined in the extfh.cfg file as follows:
[XFH-DEFAULT]
LSRECDELIM=0D0A
If you want to configure this on a file-by-file basis, you can specify for which file as follows:
[XFH-DEFAULT]
BASENAME=ON
[file1.dat]
LSRECDELIM=0D0A
[file2.dat]
LSRECDELIM=0A
The extfh.cfg file can be located in the current directory, in $COBDIR/etc or you can specify it's location and filename via the EXTFH environment variable (ex. EXTFH=/home/config/mytest.cfg).
#COBOL
#netexpress
#AcuCobol
#RMCOBOL
#ServerExpress
