Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error: UNDEFINED OR UNUSABLE HOST VARIABLE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
View previous topic :: :: View next topic  
Author Message
sandeep_yadav_in
Currently Banned

New User


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

PostPosted: Mon Sep 03, 2007 12:34 pm    Post subject: Error: UNDEFINED OR UNUSABLE HOST VARIABLE
Reply with quote

Hi Guys,

Can anyone please tell me how to resolve this error?

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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 12:47 pm    Post subject:
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
Currently Banned

New User


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

PostPosted: Mon Sep 03, 2007 1:21 pm    Post subject: thanks........Ekta
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: 3158
Location: Tucson AZ

PostPosted: Mon Sep 03, 2007 3:16 pm    Post subject:
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
Currently Banned

New User


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

PostPosted: Wed Sep 05, 2007 12:37 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us