/* Program that is replacement for getdtablesize() Description This function uses sysconf() API to find out the maximum no of file that can be opened for a job. Choose your browser's option to 'save to local disk' and then reload this document to download this code example. Send the program to your AS/400 and compile it using the development facilities supplied there. This program was tested on V3R1, V3R2, V3R6 and V3R7 systems. This small program that is furnished by IBM is a simple example to provide an illustration. This example has not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of this program. All programs contained herein are provided to you "AS IS". THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. */ /************************************************************************/ /* */ /* test case: getdtablesize.c */ /* */ /* objective: getdtablesize() workaround */ /* */ /* usage notes: Compile this program using CRTCMOD and then bind the */ /* module with other modules using getdtablesize() to */ /* create program object. */ /* */ /************************************************************************/ #include int getdtablesize(void) { return ( (int)sysconf(_SC_OPEN_MAX) ); }