View previous topic :: View next topic
|
Author |
Message |
gv_narayana_rao
New User
Joined: 21 Feb 2004 Posts: 10
|
|
|
|
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 |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
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 |
|
|
gv_narayana_rao
New User
Joined: 21 Feb 2004 Posts: 10
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
gv_narayana_rao
New User
Joined: 21 Feb 2004 Posts: 10
|
|
|
|
Hi Jack,
Thanx for the reply. Its very helpful.
Regards
GVNRao |
|
Back to top |
|
|
|