Page 1 of 1

ERROR IGYPS0209-W When a FETCH is executed

PostPosted: Tue May 30, 2017 8:29 pm
by YEGM
Hello, I am new to the forum. I am starting to program in Cobol / DB2 under Z / OS with HERCULES.
In my program I declare a cursor called (CUR_EMPLEADO) and when I try to execute the FETCH it gives the error:

IGYPS0209-W DSNH521I DSNHSM3 LINE 138 COL 11 THE FETCH FOR CURSOR 'CUR_EMPLEADO' IS
ASSUMED TO APPLY TO A DYNAMIC ALLOCATE CURSOR STATEMENT

The SQLCODE of OPEN CURSOR and CLOSE CURSOR is 0, but the SQLCODE of FETCH is (SQLCODE: 000000050M)

The error has me confused because it does not seem to be an error code. I hope someone can help or give me an idea.
Thank you.

Re: ERROR IGYPS0209-W When a FETCH is executed

PostPosted: Tue May 30, 2017 9:28 pm
by Robert Sample
1. You might have an OPEN CURSOR but it is NOT for the cursor with the FETCH. The DSNH521I message explicitly states
A FETCH, CLOSE, or DESCRIBE for an undeclared cursor was issued. The cursor is assumed to be defined using a dynamic ALLOCATE CURSOR statement.

2. The COBOL message is a Warning (-W) message; this means the results you get might not be what you expected but does not mean an error occurred. COBOL is telling you it had to interpret something and hence there is some uncertainty about the result you intended. The levels are Informational, Warning, Error, Severe, and Unrecoverable in increasing severity.

3. z/OS is not licensed to run on Hercules. Telling us that you are running z/OS on Hercules is telling us you are using an illegal system and allows IBM to take legal action against you for violating the z/OS license terms.

Re: ERROR IGYPS0209-W When a FETCH is executed

PostPosted: Wed May 31, 2017 3:28 am
by YEGM
Thanks for your help.
Maybe you explain me wrong. I am using HERCULES which I have installed on my personal computer with Windows.
I have found the error, I have declared the cursor name wrong.

Thanks again.

Re: ERROR IGYPS0209-W When a FETCH is executed

PostPosted: Wed May 31, 2017 3:45 am
by enrico-sorichetti
the fact that You are using an emulated hardware has noting to do with the error received.

Re: ERROR IGYPS0209-W When a FETCH is executed

PostPosted: Wed May 31, 2017 8:30 am
by Robert Sample
I think you do not understand. It is perfectly legal to run Hercules on a Windows machine or a Linux machine or whatever. What is illegal is violation of IBM's copyright on the z/OS operating system by running it on Hercules. IBM does not license z/OS to run on Hercules so if you are running z/OS on Hercules then you are violating IBM's license restrictions by definition. IBM does license z/OS on a zPDT system, but zPDT is not Hercules and the license is not transferable.
I have found the error, I have declared the cursor name wrong.
This is not surprising -- the error message told you that you either declared the name wrong or used the wrong name in your FETCH.