IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DSNH312I error is coming .... what to do?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gv_narayana_rao

New User


Joined: 21 Feb 2004
Posts: 10

PostPosted: Sun Sep 26, 2004 1:37 pm
Reply with quote

Hi,

I defined the appropriate host variables in the working storage section and i'm using the same variables in the "WHERE CLAUSE" and "SET CLAUSE" of an UPDATE Statement.

EXEC SQL
UPDATE <Table-Name>
SET <Col1> = <:HV1>
WHERE
<Col1> = :<Hv2>;
End-Exec.

Kindly help me as soon as possible. I'm getting this error "Unused or Undefined Host Variable " even though i defined them in the working storage section. This is actually a COBOL, DB2 and CICS Program.

Regards,

GVNRao.
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Mon Sep 27, 2004 2:01 pm
Reply with quote

Hi Narayana,

Did u check whether the length of host variable is same as DB2 column?Better way i suggest is use the DCLGEN variables instead of using seperate variables.

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

New User


Joined: 21 Feb 2004
Posts: 10

PostPosted: Mon Sep 27, 2004 4:46 pm
Reply with quote

Hi,

Thanx for ur reply. But i fixed it. But I have small doubt in that.
Earlier, i'm using a group data item at "01" Level in cobol say ws-exp-date, which is subdivided into DD, MM, YY. I moved this value to a host variable which is defined at "77" Level Number and i'm able to remove the problem. How this can happen?

Can anyone plz spend time to clear my doubts. Thanking you in anticipation.

Yours
GVNRao
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Sep 28, 2004 12:23 am
Reply with quote

Hi GV,

01 levels generally define the Host STRUCTURE for the row, not a column. You could have defined the host variable as an 05 level with no problem.

As Anu suggested it's better to INCLUDE the DCLGEN generated structure and use those Host variable names, because you can be sure they're defined properly.
Back to top
View user's profile Send private message
gv_narayana_rao

New User


Joined: 21 Feb 2004
Posts: 10

PostPosted: Wed Oct 06, 2004 9:14 am
Reply with quote

Hi Jack,

Thanx for the reply. Its very helpful.

Regards
GVNRao
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top