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

Error: UNDEFINED or UNUSABLE Host Variable


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandeep_yadav_in

New User


Joined: 26 May 2007
Posts: 13
Location: Noida, India

PostPosted: Mon Sep 03, 2007 12:34 pm
Reply with quote

Hi Guys,

Can anyone please tell me how to resolve this error? "UNDEFINED or UNUSABLE Host Variable"

DSNH312I E DSNHSMUD LINE 41 COL 21 UNDEFINED OR UNUSABLE HOST VARIABLE "HEMPID"
INSERT INTO EMPLOYEE(EMPID,EMPNAME)VALUES(: HEMPID,: EMPNAME)

I've declared these two variables
WORKING-STORAGE SECTION.
01 HEMPID PIC 9(5).
01 HEMPNAME PIC X(20).

This is the procedure division.
A00-MAIN-PARA.
MOVE '11111' TO HEMPID.
MOVE 'SHYAM' TO HEMPNAME.
EXEC SQL
INSERT INTO EMPLOYEE(EMPID,EMPNAME)
VALUES (:HEMPID,:HEMPNAME)
END-EXEC.

Thanks in advance..
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:47 pm
Reply with quote

Hi Sandy,

U have declared HEMPID as numeric but u rmoving string into that

Quote:
MOVE '11111' TO HEMPID.


jusdt change it with

Code:
MOVE 11111 TO HEMPID.


Hope it helps
Back to top
View user's profile Send private message
sandeep_yadav_in

New User


Joined: 26 May 2007
Posts: 13
Location: Noida, India

PostPosted: Mon Sep 03, 2007 1:21 pm
Reply with quote

Thanks Ekta........
icon_smile.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Sep 03, 2007 3:16 pm
Reply with quote

sandy,

Did that work or is EMPID actually declared as a string?
Back to top
View user's profile Send private message
sandeep_yadav_in

New User


Joined: 26 May 2007
Posts: 13
Location: Noida, India

PostPosted: Wed Sep 05, 2007 12:37 pm
Reply with quote

Hi William,

Yeah it worked......

i also changed the pic clause to
PIC 9(5) USAGE IS COMP-3
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top