Operating System - HP-UX
1753993 Members
7397 Online
108811 Solutions
New Discussion юеВ

Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

 
SOLVED
Go to solution
Michael Mike Reaser
Valued Contributor

Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

I'm grasping at straws, so I figured I'd throw this out to the Assembled Multitudes to see if anyone has any ideas.

We're running Micro Focus COBOL 4.0:

$ cob -V
version @(#)cob.c 1.313
PRN=RXCPR/AAD:9i.T4.40.04
PTI=SP2
I see no work
$ cobrun
V4.0 revision 0 build 10/10/2 G; 14705. Run Time System RXCPR/AA0/00000D

Intermittently and unpredictably, we've got a program aborting on an OPEN statement with the following:

I/O error : file 'RECOOUT1'
error code: 9/181 (ANS74), pc=0 call=1 seg=0
181 Invalid parameter error

The SELECT statement for the failing file is

SELECT RECOOUT-FILE ASSIGN TO RECOOUT1.

The OPEN statement is

OPEN INPUT RECOIN-FILE
OUTPUT RECOOUT-FILE

Before the program is run, we set an environment variable RECOOUT1 as

export RECOOUT1=/absolute/path/to/file

This error only seems to occur when the system is "busy" - lots of other programs all running simultaneously, all beating up on the system, but none of which are *supposed* to be accessing /absolute/path/to/file. We've never seen the error occur when the system is "calm", only when it's being hammered.

I think the 181 is bogus, since we're not directly calling anything where we'd need to move around a "parameter". My gut tells me that this is likely one or more kernel parameters that need to be increased, but since I can't tell what the message is trying to communicate to us, I can't tell which parameter(s) need to be tweaked.

Does anyone have *any* idea where I could even start with this?

Thanks!
There's no place like 127.0.0.1

HP-Server-Literate since 1979
7 REPLIES 7
OldSchool
Honored Contributor
Solution

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

don't know which OS version you're at, but nfiles, maxfiles maxfiles_lim might show something of interest.

I doubt if "ulimit" is involved, as you say it only happens when the system is loaded. Glance might give you some info if you can reproduce the behavoiur readily.
Michael Mike Reaser
Valued Contributor

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

Duhr. We're an RP4440 running HPUX 11.11. The suggestions about the file parameters are where my mind was taking me, so I'm glad to know that I was likely thinking "down the right path". :-)
There's no place like 127.0.0.1

HP-Server-Literate since 1979
James R. Ferguson
Acclaimed Contributor

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

Hi:

I would guess that you might look at 'nfile' which limits the system-wide maximum number of open files. I doubt that 'maxfiles' is involved since this limits the number of open files on a *per process* basis. I suspect that you receive the error when your COBOL program begins execution and that the number of files and their opens are rather limited.

I assume, too, that value you assign to RECOOUT1 represents a valid absolute path. If not, this might be the root of the error.

If you suspect that 'nfile' has been met, monitor it with:

# sar -v

...or use 'glance's [t]able query.

Regards!

...JRF...
Michael Mike Reaser
Valued Contributor

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

Hi, JRF,

Thankee! As I replied to OldSchool, I suspected that it was one of the "file" kernel parms, but two years away from wearing my System Administrator hat, I couldn't remember the Likeliest Suspects. :-)
There's no place like 127.0.0.1

HP-Server-Literate since 1979
Dennis Handly
Acclaimed Contributor

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

>Does anyone have *any* idea where I could even start with this?

If you could duplicate it, you could use tusc to trace system calls. Perhaps only the open one. The error return may help identify the problem.
Michael Mike Reaser
Valued Contributor

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

Unfortunately, I can't tusc it even though that was one of my first thoughts. The combination of the intermittent nature of the abort, along with the fact that it's occurring on a machine to which I have no access, makes it durned near impossible for me to watch the problem occur in real-time. :-(
There's no place like 127.0.0.1

HP-Server-Literate since 1979
Michael Mike Reaser
Valued Contributor

Re: Micro Focus COBOL Error 181 "Invalid parameter error" on OPEN

We are gonig to increase nfile and monitor. Thank you to JRF, OldSchool and Dennis for their help.
There's no place like 127.0.0.1

HP-Server-Literate since 1979