Posted: Tue Mar 11, 2003 2:17 pm Post subject: ELSE IF always defaulting
Master
Joined: 21 Nov 2002 Posts: 200
HI!
I have to check for required fields and throw a user eror if they are missing from the XML coming into my flow. My code always goes to the last ELSE IF and throws the last error (2592) even though my XML has valid values in the incoming tags. Can someone look at the following code and see if I messed up somehow? I appreciate it!!
IF ((InputRoot.XML.CreateJob.DataArea.Job.AgencyCode IS NULL) or
(InputRoot.XML.CreateJob.DataArea.Job.AgencyCode = '')) and
(InputRoot.XML.CreateJob.DataArea.Job.Location.Address.Streets.Name [1] IS NULL or
InputRoot.XML.CreateJob.DataArea.Job.Location.Address.Streets.Name[1] = ''))
THEN
Throw user exception message 2590 values ('Agency Code and Street Name Missing');
ELSE
IF (InputRoot.XML.CreateJob.DataArea.Job.AgencyCode IS NULL) or
(InputRoot.XML.CreateJob.DataArea.Job.AgencyCode = '')
THEN
Throw user exception message 2591 values ('Agency Code Missing');
ELSE
IF ((InputRoot.XML.CreateJob.DataArea.Job.Location.Address.Streets.Name[1] IS NULL) or
(InputRoot.XML.CreateJob.DataArea.Job.Location.Address.Streets.Name[1] = '')) THEN
Throw user exception message 2592 values ('Street Name Missing');
END IF;
END IF;
END IF;
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
Can you post your input message here? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
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