SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Problem Using JOB_ID in User Defined JAL Statement

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Problem Using JOB_ID in User Defined JAL Statement
Author Message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post Problem Using JOB_ID in User Defined JAL Statement Reply with quote
I have a problem with the job_id macro value in a user defined JAL script. The user defined script uses the @V"job_id" macro function. When I call the user defined JAL script, the macro always returns 0 for the job_id, which is not the job_id for the calling job.

If I run the process through the debugger, it returns the correct job_id value. Additionally, the same process works fine if I call the job_name macro value, it seems to only be a problem with the job_id value when being called in a user defined JAL script.

The user defined JAL script is a custom error-checking process that I call from a lot of different jobs, it has always worked fine in 3.4.33 version but is not working in the newer 5.1.402 version I am testing.


Thanks,
Jeff
Mon Apr 22, 2013 3:19 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
Does it work if you pass it as a parameter from the job script?

Thanks
Mon Apr 22, 2013 3:57 pm View user's profile Send private message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post Reply with quote
Yes, I tested passing it as a parameter from the job and that works.

That is a good workaround, however is the behavior I'm seeing a bug and will it be fixed?
Thanks
Jeff
Mon Apr 22, 2013 4:27 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
I don't have enough data yet to answer your questions here. . I'm still researching it and will get back to you as soon as possible.

One thing that is kind of clear now that code-substitution macros should not be used in non-job specific code libraries. There is no guarantee that it would work in current or future versions.
Script library functions are supposed to be generic and abstract from job logic and variables. Job specific variables should be passed as parameters. So I think it's better to start changing that code sooner than later. Hopefully this doesn't require big changes on your part.
Mon Apr 22, 2013 5:32 pm View user's profile Send private message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post Reply with quote
In that case, I will make the changes. I do have a lot of job scripts that call that user defined script library function, however it is just one line that will need replaced in those jobs so that is not too bad.
Thanks,
Jeff
Mon Apr 22, 2013 5:39 pm 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.