SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
@V"event" macro variable has null va

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
@V"event" macro variable has null va
Author Message
James Johns



Joined: 06 Oct 2003
Posts: 15

Post @V"event" macro variable has null variab Reply with quote

I have a job notification exit that uses macro variables successfully, but the @"event" variable has a null variable. As you can see from the logic, I ahve designed it to default the event type to 'OK'.
I always get a file type on the semaphore file of 'OK'.

Can you tell me what the problem is?

I have this notification exit running off a time-triggered job and another that is triggered by a semaphore file created by the first job.
@V"event" is null in every case.

The code is below.
__________________________________________________

//
// Comet Job Termination script
//
// Record job termination
// Create event-specific semaphore file
//
// Parameters: Event Name
//

dim (sMsg, string)
dim (sFileName, string)
dim (sJobName, string)
dim (sEventName, string)
dim (iJobId, number)
dim (sSemaphoreDir, string)
dim (EventNamePresent, boolean)
dim (lEventNameLength, number)

set (iJobId, "@V"job_id"")
set (sJobName, "@V"job_name"")
set (sEventName, "@V"event"")

Length (sEventName, lEventNameLength)
NotEqual( lEventNameLength, 0, EventNamePresent )
IfThen( EventNamePresent, labEventNamePresent )

set (sEventName, "OK")

labEventNamePresent:

// Get semaphore directory name
CometSchedulerDirectory("sem", sSemaphoreDir)

// Create semaphore file name
ConcatEx( sSemaphoreDir, "/", sJobName, ".", sEventName, sFileName )
ConcatEx( "JobCompletion: ", sFileName, sMsg )

// Write to 24x7 log
LogAddMessageEx( "INFO", iJobId, sJobName, sMsg )

MessageBox( sMsg)

FileSave( sFileName, sMsg)


Fri Oct 10, 2003 2:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: @V"event" macro variable has null va Reply with quote

I did copy and paste of your script and it works fine for me.

Is it a script for the job notification action? Directly assigned to the notification script property, right?
I mean you don't have it in some other place (for example, as a function of the Script Library) and then call it from the notification script?
If you do, you need to grab the value of @V"event" in the job notification script and then pass it to the callable script.

: I have a job notification exit that uses macro variables successfully, but
: the @"event" variable has a null variable. As you can see from
: the logic, I ahve designed it to default the event type to 'OK'.
: I always get a file type on the semaphore file of 'OK'.

: Can you tell me what the problem is?

: I have this notification exit running off a time-triggered job and another
: that is triggered by a semaphore file created by the first job.
: @V"event" is null in every case.

: The code is below.
: __________________________________________________

: //
: // Comet Job Termination script
: //
: // Record job termination
: // Create event-specific semaphore file
: //
: // Parameters: Event Name
: //

: dim (sMsg, string)
: dim (sFileName, string)
: dim (sJobName, string)
: dim (sEventName, string)
: dim (iJobId, number)
: dim (sSemaphoreDir, string)
: dim (EventNamePresent, boolean)
: dim (lEventNameLength, number)

: set (iJobId, "@V"job_id"")
: set (sJobName, "@V"job_name"")
: set (sEventName, "@V"event"")

: Length (sEventName, lEventNameLength)
: NotEqual( lEventNameLength, 0, EventNamePresent )
: IfThen( EventNamePresent, labEventNamePresent )

: set (sEventName, "OK")

: labEventNamePresent: // Get semaphore directory name
: CometSchedulerDirectory("sem", sSemaphoreDir)

: // Create semaphore file name
: ConcatEx( sSemaphoreDir, "/", sJobName, ".", sEventName,
: sFileName )
: ConcatEx( "JobCompletion: ", sFileName, sMsg )

: // Write to 24x7 log
: LogAddMessageEx( "INFO", iJobId, sJobName, sMsg )

: MessageBox( sMsg)

: FileSave( sFileName, sMsg)

Fri Oct 10, 2003 8:38 am View user's profile Send private message
James Johns



Joined: 06 Oct 2003
Posts: 15

Post Re: @V"event" macro variable has null va Reply with quote

Your guess is correct, this script is in the Script Library. The value in the job notification property is "CometEndOfJob()".

I have put the ref to @V"event" in the job notification script and it works fine. This just seems a little inconsistent with the other @V variables used in this script which are available in a script stored in the Script Library.

Anyway, thanks for your help.

: I did copy and paste of your script and it works fine for me.

: Is it a script for the job notification action? Directly assigned to the
: notification script property, right?
: I mean you don't have it in some other place (for example, as a function of
: the Script Library) and then call it from the notification script?
: If you do, you need to grab the value of @V"event" in the job
: notification script and then pass it to the callable script.

Sun Oct 12, 2003 9:41 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: @V"event" macro variable has null va Reply with quote

@V"event" and several other macro-variables are specific to their place of executuon (let's call them event script-level visibility) while other are available to the entire job (let's call them job-level visibility)

: Your guess is correct, this script is in the Script Library. The value in the
: job notification property is "CometEndOfJob()".

: I have put the ref to @V"event" in the job notification script and
: it works fine. This just seems a little inconsistent with the other @V
: variables used in this script which are available in a script stored in
: the Script Library.

: Anyway, thanks for your help.

Mon Oct 13, 2003 9:00 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.