Hi All:
I'm using a customized version of Scott Klement's send email programs to send messages/attachments via email.
It has been working great for at lease 5 years.
I just got a request to process a file of > 110 records where each record will generate an email.
While in test my email program blows up on the second running of the group of 110 with CPE3452.
If I sign off and back on i can run the 110 thru but it blows up on the second run (probably around the 200th email).
I can't determine how to view or set the OPEN_MAX value.
I can't even determine what files are open (they are in the IFS).
IBM's manual has "pseudo code" but that seems to be written in Java.
Any suggestions as to a starting point would be appreciated. I'm at V6R1.
Thanks in advance
GLS
I'm using a customized version of Scott Klement's send email programs to send messages/attachments via email.
It has been working great for at lease 5 years.
I just got a request to process a file of > 110 records where each record will generate an email.
While in test my email program blows up on the second running of the group of 110 with CPE3452.
PHP Code:
Message ID . . . . . . : CPE3452 Severity . . . . . . . : 10
Message type . . . . . : Escape
Date sent . . . . . . : 04/22/15 Time sent . . . . . . : 14:52:19
Message . . . . : Too many open files for this process.
Cause . . . . . : An attempt was made to open more files than allowed by the
value of OPEN_MAX. The value of OPEN_MAX can be retrieved using the
sysconf() function.
I can't determine how to view or set the OPEN_MAX value.
I can't even determine what files are open (they are in the IFS).
IBM's manual has "pseudo code" but that seems to be written in Java.
Code:
#include <stdio.h> #include <unistd.h> #include <errno.h> main() { long result; errno = 0; puts("examining OPEN_MAX limit"); if ((result = sysconf(_SC_OPEN_MAX)) == -1) if (errno == 0) puts("OPEN_MAX is not supported."); else perror("sysconf() error"); else printf("OPEN_MAX is %ld\n", result); } [B]Output:[/B] examining OPEN_MAX limit OPEN_MAX is 200
Thanks in advance
GLS
Comment