SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Strange 'Bug' When Parsing Job IDs

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Strange 'Bug' When Parsing Job IDs
Author Message
Loril



Joined: 21 Feb 2007
Posts: 82

Post Strange 'Bug' When Parsing Job IDs Reply with quote
Hi,

I am trying to parse a string of 24x7 scheduler job ids and output certain job properties to a text file. The script runs fine until it hits the last two job ids. For some reason, 24x7 scheduler will generate the type mismatch error when the job id variable contains only number. This type mismatch error, I am assuming, occurs because the scheduler sees the value in the variable as a number versus a string. How can I get around this? Thanks.

Here's an excerpt of the script:

LoopUntil( no_more, END_LOOP )

// get next job ID
GetToken(",", job_list, job_id )
isEqual( job_list, "", no_more ) <====This is where the error occurs when the variable job_list only contains one job_id.
Mon Aug 13, 2007 10:30 pm View user's profile Send private message
Loril



Joined: 21 Feb 2007
Posts: 82

Post Reply with quote
bump....any updates on this? Thanks!
Tue Aug 21, 2007 8:23 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Sorry for delays with response. We got affected by widespread Internet outage, which started yesterday and caused by some telecom repairs in US. Our systems were not working and alerts and emails didn't function properly.

----
The issue you are encountering is causing by automatic data type conversion feature. In your case, numeric strings are automatically converted to numbers. When trying to compare a number against empty string a data-type mismatch occurs. If you want you can search the forum for "mismatch" and you will find a number of topics discussing this issue. In brief, the simplest solution in your case is to append some "end marker" value to the end of the list.

Concat( no_more, "*done*", no _more)

isEqual( job_list, "*done*", no_more )

PS. job_id should be declared as a string.
Wed Aug 22, 2007 9:55 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.