SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Running a User Defined Statement remotely.

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Running a User Defined Statement remotely.
Author Message
Sam Mills



Joined: 29 Sep 2000
Posts: 9

Post Running a User Defined Statement remotely. Reply with quote

I have a job that contains a User Defined Statement. The job runs fine locally. The User Defined Statement functions properly. However, when I try to run the job remotely I get "Remote job exit code -1" , "Remote job Error!. If I comment out the User Defined Statement, the job runs fine remotely. As a test I added the User Defined Statement to the remote agent and comfirmed that the same job would run locally on the remote agent. Is this function not supported remotely? Can you shed some light on this issue. The following is a copy of the job and User Defined Statement:

//Test Job
Dim Found, boolean
Dim Ret, Number
Dim index1, number
Dim FilePath, String

Set FilePath, "C:\Source\LoadtoProduct.sem"

//FilePath is a parameter
FileExists( FilePath, Found )

If( Found,Done,Runit)

Runit:
//Create file
FileCreate FilePath

//Processing something
//Run( "c:\winnt\notepad.exe", "c:\winnt\", ret )
ForNext( index1, 1000, 1, -1, END_LOOP )
END_LOOP:

//Delete File
FileDelete( FilePath )

Done:
Exit

//User Defined Statement
Dim file_number, number
Dim line, string
Dim CurDateTime, string
Now(CurDateTime)

Set line, " Job @V"job_name" started on @T"dddd, mmm d, yyyy" "
Concat line, CurDateTime, line

// Open recipients file for reading line by line

FileOpen( FilePath, "LineMode", "Write", FAlSE, file_number )
FileWrite( file_number, line )

FileClose( file_number )

Sam Mills
sam_mills@es.adp.com


Tue May 15, 2001 10:27 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Running a User Defined Statement remotely. Reply with quote

This is not supported. The Remote Agent does not load job database and script library and so it cannot find your user-defined statement.

A workaround is to save your statement as a JAL file and include it on the Remote Agent using @SCRIPT tag, which is sort of "#include" directive in other languages. Each statement should be saved as a separate file. Of course, these JAL files should be created on the Agent. However, this can be inconvenient if you have many statements and/or they have parameters and return values.

: I have a job that contains a User Defined Statement. The job runs fine
: locally. The User Defined Statement functions properly. However, when I
: try to run the job remotely I get "Remote job exit code -1" ,
: "Remote job Error!. If I comment out the User Defined Statement, the
: job runs fine remotely. As a test I added the User Defined Statement to
: the remote agent and comfirmed that the same job would run locally on the
: remote agent. Is this function not supported remotely? Can you shed some
: light on this issue. The following is a copy of the job and User Defined
: Statement: //Test Job
: Dim Found, boolean
: Dim Ret, Number
: Dim index1, number
: Dim FilePath, String

: Set FilePath, "C:\Source\LoadtoProduct.sem"

: //FilePath is a parameter
: FileExists( FilePath, Found )

: If( Found,Done,Runit)

: Runit: //Create file
: FileCreate FilePath

: //Processing something
: //Run( "c:\winnt\notepad.exe", "c:\winnt\", ret )
: ForNext( index1, 1000, 1, -1, END_LOOP )
: END_LOOP: //Delete File
: FileDelete( FilePath )

: Done: Exit

: //User Defined Statement
: Dim file_number, number
: Dim line, string
: Dim CurDateTime, string
: Now(CurDateTime)

: Set line, " Job @V"job_name" started on @T"dddd, mmm d,
: yyyy" "
: Concat line, CurDateTime, line

: // Open recipients file for reading line by line

: FileOpen( FilePath, "LineMode", "Write", FAlSE,
: file_number )
: FileWrite( file_number, line )

: FileClose( file_number )

: Sam Mills
: sam_mills@es.adp.com

Tue May 15, 2001 10:44 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.