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
 

 

logic error occurs when writing a esds vsam file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Rock Xu

New User


Joined: 04 Dec 2009
Posts: 15
Location: Shanghai China

PostPosted: Tue Dec 14, 2010 8:28 am    Post subject: logic error occurs when writing a esds vsam file
Reply with quote

Hello, Everyone:
I am trying to pass some parameter from JCL to cobol by 'sysin' and then write these info into a vsam file. Return code is 0 but there're nothing in file. I checked the spool.

The warning:IGZ0003W A logic error occurred for file O1 in program TASK1211 at relative loc O1 in program TASK1211 at relative location X'04C8'.

To make sure there's no mistake in my cobol prog I replace the vsam file by flat data set and it works. So it must be something wrong about the VSAM file which I created.

I defined the fd record like this:
FILE SECTION.
FD O1
DATA RECORD IS OUTPUT-RECORD.
01 OUTPUT-RECORD PIC X(5000).


And my ESDS attribute:
Organization: ESDS Write check: NO
KSDS key length: 0 Buffer space: 40960
KSDS key location: 0 Erase on delete: NO
Average record size: 5000 Imbedded index: NO
Maximum record size: 5000 Replicated index: NO

I didn't use vsam files quite a lot. Do I need to calculate the length of such as rdf when try to write a ESDS?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Dec 14, 2010 8:38 am    Post subject:
Reply with quote

What does your SELECT statement look like?
Back to top
View user's profile Send private message
Rock Xu

New User


Joined: 04 Dec 2009
Posts: 15
Location: Shanghai China

PostPosted: Tue Dec 14, 2010 8:41 am    Post subject:
Reply with quote

Hello, Robert:
My SELECT statement:
SELECT O1 ASSIGN TO AS-O1
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL
FILE STATUS IS OUT-STAT.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Dec 14, 2010 9:05 am    Post subject:
Reply with quote

What is the file status code for the OPEN? And for the WRITE?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 14, 2010 1:59 pm    Post subject:
Reply with quote

IGZ0003W

This error is usually caused by an I/O operation request that is not valid for the fileā€”for example, a WRITE into a file opened for INPUT, or a START to a VSAM ESDS.

Does that apply to your program logic?
Back to top
View user's profile Send private message
Rock Xu

New User


Joined: 04 Dec 2009
Posts: 15
Location: Shanghai China

PostPosted: Fri Dec 17, 2010 1:19 pm    Post subject:
Reply with quote

Hello Robert:
Sorry for delaying such a long time. I got some other work to do.
My write file status is 92. Means logic error.

Also thanks Peter, I am checking it now.
Back to top
View user's profile Send private message
Rock Xu

New User


Joined: 04 Dec 2009
Posts: 15
Location: Shanghai China

PostPosted: Fri Dec 17, 2010 1:36 pm    Post subject:
Reply with quote

Hello, Peter:
I don't think so.
1.I need to write file o1 so I should not open it as input.
2.The ESDS is existing, If I open it as an output file, Open file status will be 37.
3.So open the ESDS as i-o is the only choice.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Dec 17, 2010 3:22 pm    Post subject:
Reply with quote

For your open status see :

http://ibmmainframes.com/about39315.html
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Dec 17, 2010 6:11 pm    Post subject:
Reply with quote

Quote:
2.The ESDS is existing, If I open it as an output file, Open file status will be 37.
This would only be true if your JCL is wrong. Normally, the file status should be 00 for an OPEN OUTPUT on an ESDS VSAM file.
Back to top
View user's profile Send private message
Rock Xu

New User


Joined: 04 Dec 2009
Posts: 15
Location: Shanghai China

PostPosted: Fri Jan 07, 2011 6:30 am    Post subject:
Reply with quote

Hello, Robert
I know what's wrong. In the system which I worked on, I must create an esds by model an specific existing esds file. If I create the esds by fileaid by myself, some parameter maybe wrong and the system didn't allow me to write it.

Thank you all and thanks for all of your suggestions.
Regards.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jan 07, 2011 6:51 am    Post subject:
Reply with quote

Glad to hear you got it resolved!
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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