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
 
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm

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