Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to release i/o PCB

Status
Not open for further replies.

lafalafa

Programmer
Sep 8, 2010
18
CA
Hi I would like to say thanks for the suggestion you are going to give me.

when i read an i/o file in lock mode for more than 1661 times,i got an error at 1662nd read.The description of the error is:
"All I/O process control blocks are in use, or a requester tried to acquire too many record locks or file locks. This message is returned for a privileged operating system call."

What iam thinking is if we release those used process control blocks(PCB) without ending the process then problem is resolved.

Can you please suggest me whether my approach is correct or not?
If correct can you tell me how to release PCB?

Can you please teach me more on PCB?

The read statement i used is
"READ NETDFILE WITH LOCK KEY IS PRIMARY-ID OF NETD-REC"

This read operation was performed in a loop which iterates for 2000 times.


Thanks,
Lafalafa



 
we used unlock verb,even then i got the error.We resolved the problem by using "filelock" instead of "recordlock".But filelock is not advisable.So can you please suggest me how i can proceed further?

the code we used is:

READ NETDFILE WITH LOCK KEY IS PRIMARY-ID OF NETD-REC
........some move statements..............
REWRITE NETD-REC WITH UNLOCK END-REWRITE
 
A few thoughts. . .

Change the 2000 to 1000.

Change the locking strategy.

Convert the data to some database rather than a file.
 
Thanks for your valuable suggestion.

We are not using any database.

We are sure that there is some limit on locking for a single process.How to increase that limit is the question.

We are doubtful on whether we have to change any Operating system properties or in some other way.

One solution we thoght is as you said change the loop from 2000 to 1000 and process the remaining deals in another process.

Thanks for the suggestion you have given.

Please tell me your valuable thoghts.

Thanks,
Lafalafa
 
It appears that the COBOL internals are not fully releasing the locks. Perhaps it would be suffient to close, then reopen the output file every 1500 records.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top