View previous topic :: View next topic
|
Author |
Message |
Richa Jain
New User
Joined: 18 Mar 2008 Posts: 35 Location: Gurgaon
|
|
|
|
The query in the db2-cobol program is as follows -
SELECT COL1
INTO T1-COL1:WS-COL1-IND
FROM T1
COL1 is defined as CHAR(1)
T1-COL1 is defined as PIC X(1) in cobol program
WS-COL1-IND is defined as PIC S9(4) COMP in working storage section
COL1 = '4'
T1-COL1 = 4
WS-COL1-IND = 0000
I do not understand why is WS-COL1-IND equal to 0000. Can anyone explain?
Thanks in advance |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
Back to top |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
WS-COL1-IND is a null indicator. If the value of the column retrieved is null then WS-COL1-IND will be -1, or else it will be zero. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Please try this
Code: |
INTO :T1-COL1:WS-COL1-IND |
|
|
Back to top |
|
|
Richa Jain
New User
Joined: 18 Mar 2008 Posts: 35 Location: Gurgaon
|
|
|
|
Thanks. |
|
Back to top |
|
|
|