SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
MSG_Actions and JAL Scripts
Goto page 1, 2  Next
 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
MSG_Actions and JAL Scripts
Author Message
Tim



Joined: 09 Oct 2001
Posts: 36

Post MSG_Actions and JAL Scripts Reply with quote

Hi,

I want to dynamically change job properties.
I can set the MSG_Actions property to SS,FS (on start-run script, on finsih-run script)
however, im not quite sure how to use the SCRIPT command to set the seperate JAL scripts for both start and finish.

Regards,
Tim.


Wed Nov 10, 2004 1:40 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

You cannot because there is only one notification script. What you can do is to put an IF logic in the script and perform different actions for different events. Tip: use @V"event" macro-parameter in the script to figure out which event is fired.

ChooseCase "@V"event"", END_CHOOSE
Case "START"
....
Case "FINISH"
...
Case ... or CaseElse
...
END_CHOOSE:

: Hi,

: I want to dynamically change job properties.
: I can set the MSG_Actions property to SS,FS (on start-run script, on
: finsih-run script)
: however, im not quite sure how to use the SCRIPT command to set the seperate
: JAL scripts for both start and finish.

: Regards,
: Tim.

Wed Nov 10, 2004 2:12 am View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote

: You cannot because there is only one notification script. What you can do is
: to put an IF logic in the script and perform different actions for
: different events. Tip: use @V"event" macro-parameter in the
: script to figure out which event is fired.

: ChooseCase "@V"event"", END_CHOOSE
: Case "START"
: ....
: Case "FINISH"
: ...
: Case ... or CaseElse
: ...
: END_CHOOSE:

Thanks that works.
However, im not quite sure how to set the script
i have:

jobmodify (428, "MSG_SCRIPT", "Y")

jobmodify (428, "MSG_SCRIPT_TYPE", "JAL")

jobmodify (428, "MSG_ACTIONS", "SS,FS")

jobmodify (428, "SCRIPT", "D:\automation.jal")

the first 3 work, but the last one doesnt.
At first judging by the documentation i would have thought MSG_SCRIPT is the script you want to run, but it only seems to take Y or N

where am i going wrong?

Thanks.

Wed Nov 10, 2004 8:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

The "SCRIPT" is not a reference to a file. It is the actual script (see below)

Dim( my_script, string )
FileReadAll( "D:\\automation.jal", my_script )
JobModify (428, "SCRIPT", my_script )

: Thanks that works.
: However, im not quite sure how to set the script
: i have: jobmodify (428, "MSG_SCRIPT", "Y")

: jobmodify (428, "MSG_SCRIPT_TYPE", "JAL")

: jobmodify (428, "MSG_ACTIONS", "SS,FS")

: jobmodify (428, "SCRIPT", "D:\automation.jal")

: the first 3 work, but the last one doesnt.
: At first judging by the documentation i would have thought MSG_SCRIPT is the
: script you want to run, but it only seems to take Y or N

: where am i going wrong?

: Thanks.

Wed Nov 10, 2004 9:41 pm View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote

: The "SCRIPT" is not a reference to a file. It is the actual script
: (see below)

: Dim( my_script, string )
: FileReadAll( "D:\\automation.jal", my_script )
: JobModify (428, "SCRIPT", my_script )

Hi,
the following code does not seem to work properly for me. It worked once, but for some reason i cant recreate the outcome:

jobmodify (257, "MSG_SCRIPT", "Y")

jobmodify (257, "MSG_SCRIPT_TYPE", "JAL")
jobmodify (257, "MSG_ACTIONS", "SS,FS")

Dim( my_script, string )
FileReadAll( "D:\CognosData\CubePoint\automation.jal", my_script )
JobModify (257, "SCRIPT", my_script )

The MSG_SCRIPT and MSG_SCRIPT_TYPE Work fine, however in the properties view in 24x7 the Start and Finish notifiations are set to "NO" but when i double click the job and go through its properties, the Start and Finsih boxes are checked for Script.
The Script doesnt work at all, the properties item remains blank. However, if i changed the jobType from Run Program to Run Script, the script then appears.


Wed Nov 10, 2004 11:43 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

If you want to set notification action script use "MSG_SCRIPT_CODE" instead of "SCRIPT" property.
If you want to set job script rather the action script don't forget to set the job type to script ("S").

I also suggest that you set "MSG_START" and "MSG_FINISH" to "Y" before setting "MSG_ACTIONS", "MSG_ACTIONS" is simply a mapping value (in your case ("SS,FS") that says "start and finish events are set and script notification entered then link it to specified events.

: Hi,
: the following code does not seem to work properly for me. It worked once, but
: for some reason i cant recreate the outcome: jobmodify (257,
: "MSG_SCRIPT", "Y")

: jobmodify (257, "MSG_SCRIPT_TYPE", "JAL")
: jobmodify (257, "MSG_ACTIONS", "SS,FS")

: Dim( my_script, string )
: FileReadAll( "D:\CognosData\CubePoint\automation.jal", my_script )
: JobModify (257, "SCRIPT", my_script )

: The MSG_SCRIPT and MSG_SCRIPT_TYPE Work fine, however in the properties view
: in 24x7 the Start and Finish notifiations are set to "NO" but
: when i double click the job and go through its properties, the Start and
: Finsih boxes are checked for Script.
: The Script doesnt work at all, the properties item remains blank. However, if
: i changed the jobType from Run Program to Run Script, the script then
: appears.

Thu Nov 11, 2004 12:11 am View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote

: If you want to set notification action script use "MSG_SCRIPT_CODE"
: instead of "SCRIPT" property.
: If you want to set job script rather the action script don't forget to set
: the job type to script ("S").

: I also suggest that you set "MSG_START" and "MSG_FINISH"
: to "Y" before setting "MSG_ACTIONS",
: "MSG_ACTIONS" is simply a mapping value (in your case
: ("SS,FS") that says "start and finish events are set and
: script notification entered then link it to specified events.

Thanks, that worked well.

However, is there a size character size limit to the notification script?
It retrieves the JAL script from the external file and puts it into the job properties, however, every time i try it, the JAL script gets cut off.
I thought it was the length of a SQL statement that i had in there, so i cut it up, but it still happens.


Thu Nov 11, 2004 12:41 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

The limit is 32K for interbally stored scripts. Most likely you have a mailformed file that's why it does not read it completely. Have you pasted text from MS Word or other editor?
Another solution is to use an off-line script. Here is how

JobModify (257, "SCRIPT", "@@SCRIPT:D:\\CognosData\\CubePoint\\automation.jal" )

: Thanks, that worked well.

: However, is there a size character size limit to the notification script?
: It retrieves the JAL script from the external file and puts it into the job
: properties, however, every time i try it, the JAL script gets cut off.
: I thought it was the length of a SQL statement that i had in there, so i cut
: it up, but it still happens.

Thu Nov 11, 2004 1:05 am View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote

: The limit is 32K for interbally stored scripts. Most likely you have a
: mailformed file that's why it does not read it completely. Have you pasted
: text from MS Word or other editor?
: Another solution is to use an off-line script. Here is how

: JobModify (257, "SCRIPT",
: "@@SCRIPT:D:\\CognosData\\CubePoint\\automation.jal" )

\should it be MSG_SCRIPT_CODE instead of SCRIPT in my case?

Thu Nov 11, 2004 1:13 am View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote


i tried using:

dim mystring, string
concatex("@SCRIPT:D:\CognosData\CubePoint\automation.jal",mystring)
Jobmodify (428, "MSG_SCRIPT_CODE", mystring)

i get the a pop-up error saying: "Line 0: ." that is all. Same happens when i put the @SCRIPT line in the jobmodify line.
However, when i take the @ symbol out. It says no syntax errors and its fine.

Thu Nov 11, 2004 1:38 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

JobModify (428, "MSG_SCRIPT_CODE", "@@SCRIPT:D:\\CognosData\\CubePoint\\automation.jal")

Also, I suggest using the debugger tool. It should help you troubleshoot job executuon problems especially problems with macro-parameters.

: i tried using: dim mystring, string
: concatex("@SCRIPT:D:\CognosData\CubePoint\automation.jal",mystring)
: Jobmodify (428, "MSG_SCRIPT_CODE", mystring)

: i get the a pop-up error saying: "Line 0: ." that is all. Same
: happens when i put the @SCRIPT line in the jobmodify line.
: However, when i take the @ symbol out. It says no syntax errors and its fine.

Thu Nov 11, 2004 10:56 am View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote

i have the code:

jobmodify (428, "MSG_SCRIPT", "Y")

jobmodify (428, "MSG_SCRIPT_TYPE", "JAL")
jobmodify (428, "MSG_START", "Y")
jobmodify (428, "MSG_FINISH", "Y")
jobmodify (428, "MSG_ACTIONS", "SS,FS")

JobModify (428, "MSG_SCRIPT_CODE", "@@SCRIPT:D:\\CognosData\\CubePoint\\automation.jal")

when i try validate it i get the "Line 0: ." error.
If i close and press Debug Nothing happens. It wont even go into the debugging screen. Everything works fine with the other jobs.

Thu Nov 11, 2004 6:28 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

What version of the scheduler are you running? Debugging of notifications actions is available in version 3.3.8 and up.

: i have the code: jobmodify (428, "MSG_SCRIPT", "Y")

: jobmodify (428, "MSG_SCRIPT_TYPE", "JAL")
: jobmodify (428, "MSG_START", "Y")
: jobmodify (428, "MSG_FINISH", "Y")
: jobmodify (428, "MSG_ACTIONS", "SS,FS")

: JobModify (428, "MSG_SCRIPT_CODE",
: "@@SCRIPT:D:\\CognosData\\CubePoint\\automation.jal")

: when i try validate it i get the "Line 0: ." error.
: If i close and press Debug Nothing happens. It wont even go into the
: debugging screen. Everything works fine with the other jobs.

Thu Nov 11, 2004 10:35 pm View user's profile Send private message
Tim



Joined: 09 Oct 2001
Posts: 36

Post Re: MSG_Actions and JAL Scripts Reply with quote

: What version of the scheduler are you running? Debugging of notifications
: actions is available in version 3.3.8 and up.

Version 3.4.20

I did a search for that error and it seems like someone else on this forum had the same problem with @SCRIPT
however they somehow fixed it by changing the contents of the file.

the problem is it doesnt even seem like it looks at the file. as soon as i take the @ symbol out, the syntax is validated.


Thu Nov 11, 2004 10:57 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: MSG_Actions and JAL Scripts Reply with quote

If you take out the first @ then it will attempt to replace @SCRIPT:file with the actual file name in the script where you call JobModify. What you want to get is to have @SCRIPT: in the script of the job being modifyed.
The message you probably refer to, was about having a space between "@SCRIPT:" tag and a file name following that tag. Once they took out the space the script started to work.

If you do everything correctly and refer to an existing file (no spelling errors) then when you open the target script in the debugger you should see the contents of the that file in place of the "@SCRIPT:[file name here]" line.

: Version 3.4.20

: I did a search for that error and it seems like someone else on this forum
: had the same problem with @SCRIPT
: however they somehow fixed it by changing the contents of the file.

: the problem is it doesnt even seem like it looks at the file. as soon as i
: take the @ symbol out, the syntax is validated.

Thu Nov 11, 2004 11:47 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
Goto page 1, 2  Next
Page 1 of 2

 
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.