MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem in specifying Null indicator in eazytrieve

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Thu May 03, 2007 6:45 am    Post subject: Problem in specifying Null indicator in eazytrieve Reply with quote

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


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu May 03, 2007 7:30 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Thu May 03, 2007 7:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group