Skip to main content

Our application uses pure C/C with EXTFH Callable File Handler such as in ftp://ftp.suportesg.com/pub/download/COBOL/DEMO/EXTFHRD.C. We will work for FCD3 structure defined in fcd3.h file. It is really helpful if you have such C/C samples and documentations. Thanks!

Our application uses pure C/C with EXTFH Callable File Handler such as in ftp://ftp.suportesg.com/pub/download/COBOL/DEMO/EXTFHRD.C. We will work for FCD3 structure defined in fcd3.h file. It is really helpful if you have such C/C samples and documentations. Thanks!

I am including here the updated example for accessing the Micro Focus file handler from a C program using the FCD3 layout. If you used the previous FCD2 header file to define the variable names to use in the structure then there are very few changes required as only one new field has been added, "version" and only a few field sizes have changed.

The only changes I made in the sample to go from using FCD2 to FCD3 are:

Change:
#include "fcd.h"
To
#include "fcd3.h"
Change:
   cobput_x2_compx(&fcd.reclen_maximum,31);          /* 31 bytes */
   cobput_x2_compx(&fcd.reclen_minimum,31);          /* 31 bytes format */
   cobput_x2_compx(&fcd.reclen_current,31);
to:
   cobput_x4_compx(&fcd.reclen_maximum,31);          /* 31 bytes */
   cobput_x4_compx(&fcd.reclen_minimum,31);          /* 31 bytes format */
   cobput_x4_compx(&fcd.reclen_current,31);
 
and add:
cobput_x1_compx(&fcd.version, 1);
 

We have sent you the same example thru the support incident that you opened for this.

Thanks.