View previous topic :: View next topic
|
Author |
Message |
mkiranmai Warnings : 1 New User
Joined: 31 May 2005 Posts: 5 Location: hyd
|
|
|
|
about host and indicator variables in db2
i req more information. |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi mkiranmai,
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.
Tell me What else you want on this.
Hope this would help. |
|
Back to top |
|
|
jkbytes
Active User
Joined: 19 Feb 2005 Posts: 139 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. |
Code: |
01 DCLEMPANJ.
10 EMPID PIC X(5).
10 EFNAME PIC X(15).
10 ELNAME PIC X(15).
10 EMPDOB PIC X(10).
10 EMPSAL PIC S9(5)V9(2) USAGE COMP-3.
10 EMPDEPT PIC X(5). |
where this host structure can be created by means of dclgen. |
|
Back to top |
|
|
|