Page 1 of 1

join error

PostPosted: Fri Mar 04, 2016 11:10 pm
by KBS_123
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"

Re: join error

PostPosted: Fri Mar 04, 2016 11:20 pm
by enrico-sorichetti
it is not a join error,

UNDEFINED OR UNUSABLE HOST VARIABLE "DEPT-NUM"


what does the message hint ?

Re: join error

PostPosted: Wed Jun 15, 2016 10:07 pm
by Raja190
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 "-" "_" )