View previous topic :: View next topic |
Author |
Message |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Thu May 03, 2007 6:45 am Post subject: Problem in specifying Null indicator in eazytrieve |
|
|
Hi,
I have a requirement in EZT wherein I need to fetch some records based on a criteria obtained from a table. (Key fields are obtained from the table and fed in the Where Clause of the query).
There are some fields with default NULL in the table. So When I run the EZT pgm, It throws -305 sqlcode (Fields are not Null terminated).
So I tried specifying null indicator in the working storage as
Code: | W-FIELD1-NULL-IND W 02 B |
When I run the pgm, it throws RC = 16. Following is the error message:
Code: | B055 INVALID LENGTH, TYPE OR DECIMAL PLACES - W-FIELD1-NULL-IND |
Please help in resolve the null indicator problem.
Thanks in advance
Vivek.G
Note: I am supposed to do the above requirement in EZT only though the same can be accomplished in many ways. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Thu May 03, 2007 7:30 am Post subject: |
|
|
vivek1983,
You are supposed to define the binary field as follows. You need to specify the decimals even though you don't have any.Notice the 0 at the end
Code: |
W-FIELD1-NULL-IND W 02 B 0
|
and unlike in cobol the null indicator in ezt is at the end of the receiving host variable.
ie.
Code: |
:DB2-COL-HOST-VAR:W-FIELD1-NULL-IND
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vivek1983 Intermediate

Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Thu May 03, 2007 7:40 am Post subject: |
|
|
kolusu,
Its working fine.
Thanks much.
Vivek.G _________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
 |
|
|