VSAM File status 23 ,but records are present in the file

Post your questions related to VSAM

Moderator: Moderator Group

Post Reply
neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

VSAM File status 23 ,but records are present in the file

Post by neo_charan7 » Mon May 11, 2009 9:46 pm

Hi,
I am reading a VSAM file and writing all the records into output file.

But my job is running without completion.

I am getting file status 23 but records are present in the input file.

Please find the psedo code below

1000-INITIALIZATION

PERFORM OPEN 1200-VSAM-FILE
THRU 1200-EXIT.

PERFORM 1250-READ-VSAM-FILE
THRU 1250-EXIT.

MOVE SPACES TO WS-AMCK002-FILE-STATUS
1000-EXIT

IF WS-NO-DETAILS-EXIST
PERFORM 2100-PROCESS-ZERO-DTL-RECS
THRU 2100-EXIT
ELSE
PERFORM 2000-PROCESS-SEC-RECORDS
THRU 2000-EXIT
END-IF.

2000-PROCESS-SEC-RECORDS.

PERFORM UNTIL WS-VSAM-END-OF-FILE

PERFORM 2200-SEC-POS-PROCESS
THRU 2200-EXIT

PERFORM 1250-READ-VSAM-FILE
THRU 1250-EXIT

END-PERFORM
.
2000-EXIT.
EXIT.

Any thoughts?????

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue May 12, 2009 12:09 am

An attempt was made to randomly access
a record that does not exist in the
file,
or
a START or random READ
statement was attempted on an optional
input file that was not present.
if you are unable to determine the problem,
we will need the following info
SELECT
FD
file I/O instructions
after which instruction did you encounter the 23?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

Post by neo_charan7 » Tue May 12, 2009 12:53 pm

Thanks dbZ

I have modified the select clause.

Access mode was given dynamic instead of sequential.

Now I am able to read records.

neo_charan7
Member
Posts: 22
Joined: Wed Apr 15, 2009 11:51 pm
Location: london

Post by neo_charan7 » Tue May 12, 2009 4:36 pm

Hi Dbz,

This issue is resolved

File status 23 was issued because access mode specified in the SELECT clause is wrong.

I have given DYNAMIC for a sequential read

Now i am able to read the file

Thanks

academyindia4

Topic deleted by Admin

Post by academyindia4 » Tue Jan 19, 2016 7:48 pm

<< Content deleted By Admin >>

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Feb 01, 2016 1:12 am

<< Content deleted By Admin >>

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