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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 2 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm
No new posts Error in SQL-PLIST3 'Above value tru... rikdeb DB2 4 Wed Sep 06, 2017 1:34 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

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