 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
Problem Using JOB_ID in User Defined JAL Statement |
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Does it work if you pass it as a parameter from the job script?
Thanks
|
|
Mon Apr 22, 2013 3:57 pm |
|
 |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
|
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
|
|
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 |
|
 |
|
|
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
|
|
|