1.Host Variables are nothing but the collecting working storage collections of the data fetched from the tables in database.We use DCLGEN for Host Variable Language specific data type defintions of the database fields.
2.Null Indicator Variables are there to handle situation where we get some null data instead of data if such case how to handle is done thru this by using the value of the Null Indiacor values 0.-1.-2.
Joined: 19 Feb 2005 Posts: 142 Location: South Africa
Hi,
in the following code iam trying to retrieve the employee details in to some cobol structure called dclempanj which is called as the host variable structure.
Code:
EXEC SQL
SELECT EMPID,EFNAME,ELNAME,EMPDOB,EMPSAL,EMPDEPT
INTO :DCLEMPANJ
FROM EMPANJ
WHERE EMPID = 'A0001'
END-EXEC.