IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

about host and indicator variables in db2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mkiranmai
Warnings : 1

New User


Joined: 31 May 2005
Posts: 5
Location: hyd

PostPosted: Wed Jun 01, 2005 7:28 pm
Reply with quote

about host and indicator variables in db2
i req more information.
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Thu Jun 02, 2005 11:02 am
Reply with quote

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
View user's profile Send private message
jkbytes

Active User


Joined: 19 Feb 2005
Posts: 139
Location: South Africa

PostPosted: Thu Jun 02, 2005 2:22 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Adding 'ODD' and 'EVEN' indicator at ... DFSORT/ICETOOL 6
No new posts access the last host command CLIST & REXX 2
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
Search our Forums:

Back to Top