Skip to main content

Problem:

COBOL program uses the external file handler with CALL "EXTFH". The program works ok in 32 bits, but in 64 bit it returns a file status of 9/161 on file open.

Resolution:

FCD-VERSION needs to be initialized to fcd--version-number.

When it works in 32 bits is normally because the whole fcd is initialized to low-values and 0 happens to be the right value for FCD-VERSION there.

When compiling and running in 64 bits,  P64 is set, and therefore the value for FCD-VERSION is different (see $COBDIR/cpylib/XFHFCD.CPY).

The following should be added to the program's initialization procedure for it to work in any environment:

              MOVE  fcd--version-number TO FCD-VERSION

Old KB# 2081

#AcuCobol
#netexpress
#ServerExpress
#RMCOBOL
#COBOL