Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

When does File read of VB VSAM file give RC of 04?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Thu Jul 12, 2007 1:38 pm    Post subject: When does File read of VB VSAM file give RC of 04?
Reply with quote

When does File read of VB VSAM file give RC of 04? How can this be fixed?
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 1:55 pm    Post subject:
Reply with quote

Who issued the RC04?
What was the error message text?
If you mead File Status 04:
"A READ statement was successfully executed, but the length of the record being processed did not conform to the fixed file attributes for that file."
Back to top
View user's profile Send private message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Thu Jul 12, 2007 3:10 pm    Post subject:
Reply with quote

The VSAM file read statement returned a status code of 04. I looked this up and this seems to be the error message.
There're a number of other records in my file with the same length as the record causing this error. But they're not erroring out.
Any idea how to find the cause of this error?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 3:14 pm    Post subject:
Reply with quote

Since you say the file is VB and the error seems to pretain to FB, I don't know.....
What does the FD and its associated 01 look like?
Back to top
View user's profile Send private message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Thu Jul 12, 2007 3:56 pm    Post subject:
Reply with quote

In the program, we've two record layouts defined in the FD section. Both of length 6330 and with two variable length tables with occurs of 60 & 20.
The 01 item looks like,
05 Key X(40)
...
05 Tbl1 X(66) occurs 60 times
05 Tbl2 X(80) occurs 20 times
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 4:21 pm    Post subject:
Reply with quote

What does the rest of the FD look like?
Back to top
View user's profile Send private message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Thu Jul 12, 2007 4:25 pm    Post subject:
Reply with quote

It looks like,

FD FILE1
LABEL RECORDS ARE STANDARD.

01 REC1
05 Key X(40)
...
05 Tbl1 X(66) occurs 60 times
05 Tbl2 X(80) occurs 20 times

01 REC2
COPY COPYBOOK2

and the COPYBOOK2 has the same structure as REC1.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 4:50 pm    Post subject:
Reply with quote

If both 01s are the same length and you did not specify a recording mode, COBOL is assuming that the file is fixed which justifies the FS04.
If the file is really VB, specify such in the FD or add another 01 of a different length.
Back to top
View user's profile Send private message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Thu Jul 12, 2007 9:40 pm    Post subject:
Reply with quote

I declared variables in the FD section with the Minimum and the maximum length of the record, but i still got the same problem... :-(
Any other suggestions?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 11:09 pm    Post subject:
Reply with quote

What is the minimum and what is tha maximum length?
I usually just pur an 01 with a different length, usually the length of the primary information.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us