Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
COBOL/DB2 precompilation error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
thesexyone

New User


Joined: 02 Jan 2006
Posts: 7

PostPosted: Sun Jan 29, 2006 4:35 am    Post subject: COBOL/DB2 precompilation error
Reply with quote

Hi guys and gals,

Any ideas about this:

I have a simple COBOL/DB2. In working storage I have a declare cursor c1 for select emp from employees.

I compile in batch - but I get a pre-complilation error:

DSNH520I E DSNHSMUD LINE 72 COL 22 THE OPEN STATEMENT FOR CURSOR 'EMP_CUR' IS INVALID BECAUSE THE CURSOR WAS DEFINED BY AN ALLOCATE CURSOR STATEMENT.

Can't understand why..any ideas much appreciated!

Thanks
Back to top
View user's profile Send private message

thesexyone

New User


Joined: 02 Jan 2006
Posts: 7

PostPosted: Sun Jan 29, 2006 4:37 am    Post subject: Re: COBOL/DB2 precompilation error
Reply with quote

sorry not c1 it's emp_cur in working storage. Typo
Back to top
View user's profile Send private message
senthilssg

New User


Joined: 09 Dec 2005
Posts: 64
Location: USA

PostPosted: Mon Jan 30, 2006 9:30 am    Post subject:
Reply with quote

Hi ,

The cursor is not defined properly .. Please check with the declaration of cursor .

I hpoe that this help you..

Regards ,
senthil
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Jan 30, 2006 9:12 pm    Post subject: Re: COBOL/DB2 precompilation error
Reply with quote

thesexyone,

Can you please supply us with the exact cursor declare and the exact OPEN statement(s) for the cursor?

Thanks,

Dave
Back to top
View user's profile Send private message
thesexyone

New User


Joined: 02 Jan 2006
Posts: 7

PostPosted: Thu Feb 02, 2006 10:42 pm    Post subject: Re: COBOL/DB2 precompilation error
Reply with quote

Hi chaps and chapesses,

I've actually got past this problem now. I've realized I was using version 5 of DB2 and consequently you can't declare a cursor in the working storage section. It has to be declared in the procedure division.

Thanks
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us