Cadet 3rd Class
Cadet 3rd Class

Need help for using extfh, Micro Focus callable file handler in C/C++

Our application uses pure C/C++ with EXTFH Callable File Handler such as in 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!

1 Reply
Micro Focus Expert
Micro Focus Expert

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:

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

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


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.