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)
|