IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VSAM file NOT Found error while processing in a CICS Program


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
SumaReva

New User


Joined: 10 Apr 2018
Posts: 2
Location: Bangalore

PostPosted: Wed Apr 11, 2018 9:54 pm
Reply with quote

Hello All,
I am trying to trigger a CICS program and I am using VSAM file with Read command in it. Even though I have Defined the VSAM file in FCT and its attributes, the CICS program abends with FILE NOT found issue. Please help if I am missing something.

Code:
 Command  . . . : READ           
 File ID  . . . : VSHIPXXX       
 EIBRESP  . . . : 13 (NOTFND)     
 EIBRESP2 . . . : X'00000050'     
 EIBRCODE . . . : X'810000000000'


Read command in Program CMMXXX:

Code:
SPEC-SAP-SHIPVRY-DS            PIC X(08)  VALUE 'VSHIPXXX'.
SPEC-SAP-SHIPVRY-RL            PIC 9(4) COMP VALUE      700.
SPEC-SAP-SHIPVRY-KEY.       
05  SPEC-SAP-SHIPVRY-EVENXXX   PIC X(18).                                 

Code:
EXEC CICS READ                       
     DATASET ( SPEC-SAP-SHIPXXX-DS )
     INTO ( SHIPVXXX-RECORD)         
     RIDFLD ( SPEC-SAP-SHIPXXX-KEY )
     LENGTH (SPEC-SAP-SHIPXXX-RL)   
     RESP ( WS-LOG-STATUS )         
END-EXEC                             

Abend:

Code:
Program Offsete Function   Resource      Response
--------------------------------------------------
CMMXXX  9D0e     READ      VSHIPXXX      NOTFND
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 11, 2018 11:51 pm
Reply with quote

Did you look at the READ command in the Application Programming Reference manual? I did, and it says
Quote:
13 NOTFND
RESP2 values:

80
An attempt to retrieve a record based on the search argument provided is unsuccessful. For data tables, this condition occurs if an attempt to read a record is unsuccessful because there is no entry with the specified key in the data table. This does not mean that there is no such record in the source data set (if the table was created from one); it may be that such a record is present but was either rejected during initial loading by the user exit XDTRD, or was subsequently deleted from the data table. For remote files, this condition occurs if an attempt to read a record is made without keylength specified either in the application or the file definition, and the actual key is longer than 4 characters.
In other words, the NOTFND condition means the specific record you were looking for was not found and has nothing to do with the file entry (unless you are using a very old version of CICS, the FCT no longer exists as RDO definition replaced it some years back). You specified you wanted to read a single key value AND ONLY THAT KEY VALUE from the data set; what did you think would happen when that record key is not in the data set?
Back to top
View user's profile Send private message
SumaReva

New User


Joined: 10 Apr 2018
Posts: 2
Location: Bangalore

PostPosted: Thu Apr 12, 2018 10:28 pm
Reply with quote

Thank you Robert for your reply.
I did look at the CICS Language Guide. The Dataset has values and the Key specified is (20,0) and the same is specified in RIDFLD while performing READ DATASET.
The VSAM file used was delete Defined and FCT entries were refreshed. Still Facing the same issue.
Please Help:

Time . . . . . : 10:35:42.315309 Function code : 0602
Trace type . . : EXECOUT Command . . . : READ
Program . . . . : CMMXXX File ID . . . : VSHIPVRY
Offset . . . . : 9CA EIBRESP . . . : 13 (NOTFND)
Elapsed time . : 00:06:01.020455 EIBRESP2 . . . : X'00000050'
EIBRCODE . . . : X'810000000000'
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 12, 2018 11:42 pm
Reply with quote

Quote:
The VSAM file used was delete Defined and FCT entries were refreshed.
This has nothing to do with your problem. The NOTFND has NOTHING to do with the definition of the CICS file. Until you accept this, you CANNOT resolve the issue.

Quote:
The Dataset has values and the Key specified is (20,0) and the same is specified in RIDFLD while performing READ DATASET.
What does this mean? Your RIDFLD would have to be a 20-byte variable, so that's not an issue.

If you really want to resolve this issue, use CEDF to step through the code and display the full 20-byte value being used in the EXEC CICS READ statement. Then dump the VSAM KSDS and look for that exact same 20-byte value in the keys. If you find a match, post the screen shot of the CEDF screen after the READ executes, and post at least enough of the VSAM dump to show the key is in the data set. Post the data using the CODE button so spaces are preserved. Until and unless you do this, there is nothing we can do to help you since the problem is -- quite clearly -- being stated that the key you are attempting to read does not exist in the data set.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Sat Apr 14, 2018 2:35 am
Reply with quote

Verify the CICS partition JCL for the file label and the file name on that label must be the same as the one you defined.
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Wed Apr 18, 2018 2:06 am
Reply with quote

If the VSAM file was created in batch, you may need to close and reopen the file in CICS. CICS dies not refresh VSAM buffers unless forced to do so.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts Error when install DB2 DB2 2
Search our Forums:

Back to Top