join error



IBM's flagship relational database management system

join error

Postby KBS_123 » Fri Mar 04, 2016 11:10 pm

EXEC SQL                                    
    SELECT A.EMP_NUM,A.EMP_STATUS,A.LAST_NAME, B.DEPT_NUM,B.DEPT_NAME                  
      INTO :EMP-NUM, :EMP-STATUS, :LAST-NAME, :DEPT-REC.DEPT-NUM, :DEPT-NAME                      
      FROM EMPL1, DEPT1                        
      WHERE  A.EMP_NUM = :WS-EMP-NUM      
      AND    A.DEPT_NUM = B.DEPT_NUM  
END-EXEC


Error messages
UNDEFINED OR UNUSABLE HOST VARIABLE "DEPT-REC"
UNDEFINED OR UNUSABLE HOST VARIABLE "DEPT-NUM"
KBS_123
 
Posts: 4
Joined: Thu Mar 03, 2016 12:54 pm
Has thanked: 4 times
Been thanked: 0 time

Re: join error

 

Re: join error

Postby enrico-sorichetti » Fri Mar 04, 2016 11:20 pm

it is not a join error,

UNDEFINED OR UNUSABLE HOST VARIABLE "DEPT-NUM"


what does the message hint ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2572
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 123 times

Re: join error

Postby Raja190 » Wed Jun 15, 2016 10:07 pm

check for the for correct host variable names generated in the DCLGEN.

refer your DCLGEN copy book and updated the variable names. (there might be discrepancies in "-" "_" )
Raja190
 
Posts: 35
Joined: Mon Dec 14, 2015 8:13 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post