INVALID FILE NUMBER - Error code 72 while reading KSAM file

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
nitika
Member
Posts: 3
Joined: Mon Feb 15, 2016 9:40 am

INVALID FILE NUMBER - Error code 72 while reading KSAM file

Post by nitika » Mon Feb 15, 2016 1:19 pm

Hi Everyone,

I am facing INVALID FILE NUMBER error no. 72 with STATUS 9H while using CKREADBYKEY for KSAM file. File is opened properly with STATUS = 0 and file number(00015) is correct at the time of open but when control is coming to READBYKEY its changing FILE NUMBER(08224) somehow and failing there showing READ ERROR like below -:
IMF-STATUS:9H
IMF-STATUS1:9
(70/85) Continue?
IMF-STATUS2:H
IMF-FILENO:08224
IMF READ ERROR 0072
IMF STATUS 9H

Also below is the syntax coded for CKREADBYKEY -
CALL "CKREADBYKEY" USING IMF-FILETABLE, IMF-STATUS,
IMF-REC, IMF-NOM-KEY, IMF-KEYLOC, IMF-RECLEN.

Please suggest how to correct this, any thoughts?

Awaits responses!!

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Feb 15, 2016 11:13 pm

You have a site-specific program. You have to look at that. What is KSAM? Are you even using a Mainframe?

nitika
Member
Posts: 3
Joined: Mon Feb 15, 2016 9:40 am

Post by nitika » Tue Feb 16, 2016 9:24 am

KSAM is nothing but indexed file to store data.
I can see error everywhere but no action/resolution on that.
Yes its Mainframe running on hp-unix platform, behave abit different.

Please suggest.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Feb 16, 2016 12:20 pm

Well, HP do not make Mainframes. IBM does. KSAM might be "nothing but indexed" but I don't know anything about it. Plus only you can see the code in it.

Apart from a pornographic spammer and myself, there is no-one active on this site. So contact your site support (if you have such a thing), colleagues, HP technical support, or find a forum for HP COBOL with KSAM or even just get down and work it out yourself.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others