SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Commenting @SCRIPT Lines

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Commenting @SCRIPT Lines
Author Message
Brent



Joined: 20 Feb 2002
Posts: 57

Post Commenting @SCRIPT Lines Reply with quote

When commenting out @SCRIPT lines, why does 24x7 only
comment out the first line of the inserted script instead
of not performing the insert at all? Can this be fixed?

Wed Nov 26, 2003 5:03 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Commenting @SCRIPT Lines Reply with quote

@SCRIPT is a substitution variable. No matter how you comment it the text of @SCRIPT is replaced with the text of the referenced file. The obvious result is that the first file line is commented.
Either put a space between @ and SCRIPT or do not use @SCRIPT at all, use the Script Library features to create global statements.

: When commenting out @SCRIPT lines, why does 24x7 only
: comment out the first line of the inserted script instead
: of not performing the insert at all? Can this be fixed?

Wed Nov 26, 2003 5:20 pm View user's profile Send private message
Brent



Joined: 20 Feb 2002
Posts: 57

Post Re: Commenting @SCRIPT Lines Reply with quote

Of all the programming languages I have seen, comments
are totally ignored. When 24x7 encounters a comment symbol,
it should do nothing with the comment or the following text
until it reaches the end of the line. For example, placing
a comment on the end of a line that has a statement. Since
there is a limit to the size of a script (that you say cannot
be changed), this would help save space and help readability.
Also, placing a comment after a dim statement only places the
comment into the variable as an initial value. Could 24x7
ever be repaired to totally ignore a comment, no matter where
it is placed?

: @SCRIPT is a substitution variable. No matter how you comment it the text of
: @SCRIPT is replaced with the text of the referenced file. The obvious
: result is that the first file line is commented.
: Either put a space between @ and SCRIPT or do not use @SCRIPT at all, use the
: Script Library features to create global statements.

Thu Dec 04, 2003 5:13 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Commenting @SCRIPT Lines Reply with quote

Thank you for your feedback. The macro-variables are inserted before the resulting script is passed to the script engine. There is no such thing exists at that point in time as comments. It is just a piece of text.

Presently comments are supported only in the beginning of the line as in batch files. If you prefer you can use VBScript language for jobs. VBScript supports comments in virtually any place.

Single job script size is limited to about 32K. This is a limitation of the storage field. I can hardly imagine any job that long.

I can help you to cut size of your scripts. Please post your example script here and I will suggest how to do it more efficiently.

: Of all the programming languages I have seen, comments
: are totally ignored. When 24x7 encounters a comment symbol,
: it should do nothing with the comment or the following text
: until it reaches the end of the line. For example, placing
: a comment on the end of a line that has a statement. Since
: there is a limit to the size of a script (that you say cannot
: be changed), this would help save space and help readability.
: Also, placing a comment after a dim statement only places the
: comment into the variable as an initial value. Could 24x7
: ever be repaired to totally ignore a comment, no matter where
: it is placed?

Thu Dec 04, 2003 5:33 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
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.