SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Invalid Datatype Error

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Invalid Datatype Error
Author Message
M. Chappell



Joined: 30 Jun 2000
Posts: 6

Post Invalid Datatype Error Reply with quote

I have a job similar to the following that needs to retrieve a process date from a database table by calling a user-defined statement. If there was an error while retrieving the date, the returned string will be equal to "ERROR".

After the user-defined statement has executed and returned the string representing the process date (or "ERROR" string), I receive an "Invalid Datatype" error while processing the "IsEqual" line in the job.

Do you have any ideas on what is causing this?

Thanks.

--Job--
Dim process_date, String
Dim error_message, String, "ERROR"

// Retrieve the current process date
retrieve_process_date( process_date )
IsEqual( process_date, error_message, check )
IfThen( check, ERROR_DATE )

(Code omitted...)

--------------------------

--User-Defined Statement--

(Code omitted...)

DatabaseGet( 1, 1, process_date_time )
Format( process_date_time, "mm-dd-yyyy", process_date )
GoTo( done )

ERROR:
Set process_date, "ERROR"

DONE:
DatabaseDisconnect
Return process_date
-------------------------

Fri Jun 30, 2000 4:32 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Re: Invalid Datatype Error Reply with quote

Is there a declaration of "check" variable in your script?

: I have a job similar to the following that needs to retrieve a process date
: from a database table by calling a user-defined statement. If there was an
: error while retrieving the date, the returned string will be equal to
: "ERROR".

: After the user-defined statement has executed and returned the string
: representing the process date (or "ERROR" string), I receive an
: "Invalid Datatype" error while processing the
: "IsEqual" line in the job.

: Do you have any ideas on what is causing this?

: Thanks.

: --Job--
: Dim process_date, String
: Dim error_message, String, "ERROR"

: // Retrieve the current process date
: retrieve_process_date( process_date )
: IsEqual( process_date, error_message, check )
: IfThen( check, ERROR_DATE )

: (Code omitted...)

: --------------------------

: --User-Defined Statement--

: (Code omitted...)

: DatabaseGet( 1, 1, process_date_time )
: Format( process_date_time, "mm-dd-yyyy", process_date )
: GoTo( done )

: ERROR: Set process_date, "ERROR"

: DONE: DatabaseDisconnect
: Return process_date
: -------------------------

Fri Jun 30, 2000 4:45 pm View user's profile Send private message
M. Chappell



Joined: 30 Jun 2000
Posts: 6

Post Re: Invalid Datatype Error Reply with quote

Yes, it is a boolean type.

Dim check, Boolean

: Is there a declaration of "check" variable in your script?

Fri Jun 30, 2000 5:32 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Re: Invalid Datatype Error Reply with quote

It appears that process_date is recognized as a date and the script engine does not want to compare it to a string. The easiest workaround is to use
InStr( process_date, error_message, position )
instead of isEqual( process_date, error_message, check )

Then you would continue with IfThen( position, ERROR_DATE )

: Yes, it is a boolean type.

: Dim check, Boolean

Sat Jul 01, 2000 1:09 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.