HPE NonStop Compute
1859619 Members
7460 Online
110403 Solutions
New Discussion

sql/mp error -8412

 
SOLVED
Go to solution
Hireme
Visitor

sql/mp error -8412

I get a sqlcode -8412 on a FETCH in a COBOL program.  Manual is not a help; manual says there is a type incompatability.
I define a cursor to select all columns.  I use an INVOKE AS statement to create a buffer for retrieved rows.  I use a FETCH INTO operation.  The OPEN is successful.  The FETCH fails on the first execution.

I used an INVOKE statement (with some editing, of course) to create both the SELECT list of columns and the buffer into which the FETCH will deposit each row. 

I don't see what is wrong.

Any thoughts to send my way?

Thanks!

2 REPLIES 2
Hireme
Visitor
Solution

Re: sql/mp error -8412

Problem resolved. I experimented and found the following:  I used the group level expecting that each column would be moved into each field.  SQL doesn't work that way, I discovered.  Each column must be identified in a FETCH.

Thaufique_Mod
Community Manager

Re: sql/mp error -8412

Hello @Hireme,

Thanks for posting in HPE Community.

We are glad to know that the issue is resolved, thanks for sharing the solution with community.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo