View previous topic :: View next topic
|
Author |
Message |
Rock Xu
New User
Joined: 04 Dec 2009 Posts: 15 Location: Shanghai China
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
What does your SELECT statement look like? |
|
Back to top |
|
|
Rock Xu
New User
Joined: 04 Dec 2009 Posts: 15 Location: Shanghai China
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
What is the file status code for the OPEN? And for the WRITE? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
|
Rock Xu
New User
Joined: 04 Dec 2009 Posts: 15 Location: Shanghai China
|
|
|
|
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 |
|
|
Rock Xu
New User
Joined: 04 Dec 2009 Posts: 15 Location: Shanghai China
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rock Xu
New User
Joined: 04 Dec 2009 Posts: 15 Location: Shanghai China
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Glad to hear you got it resolved! |
|
Back to top |
|
|
|