ERROR IGYPS0209-W When a FETCH is executed



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

ERROR IGYPS0209-W When a FETCH is executed

Postby YEGM » Tue May 30, 2017 8:29 pm

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.
YEGM
 
Posts: 2
Joined: Tue May 30, 2017 1:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ERROR IGYPS0209-W When a FETCH is executed

 

Re: ERROR IGYPS0209-W When a FETCH is executed

Postby Robert Sample » Tue May 30, 2017 9:28 pm

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.
Robert Sample
Global moderator
 
Posts: 3419
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 235 times

Re: ERROR IGYPS0209-W When a FETCH is executed

Postby YEGM » Wed May 31, 2017 3:28 am

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.
YEGM
 
Posts: 2
Joined: Tue May 30, 2017 1:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ERROR IGYPS0209-W When a FETCH is executed

Postby enrico-sorichetti » Wed May 31, 2017 3:45 am

the fact that You are using an emulated hardware has noting to do with the error received.
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2684
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 135 times

Re: ERROR IGYPS0209-W When a FETCH is executed

Postby Robert Sample » Wed May 31, 2017 8:30 am

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.
Robert Sample
Global moderator
 
Posts: 3419
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 235 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post