SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Set Variable to LEFT()

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Set Variable to LEFT()
Author Message
Jason Hoskins



Joined: 12 Mar 2004
Posts: 68

Post Set Variable to LEFT() Reply with quote

I am receiving a syntax error when trying to set a vaiable to a subset of another variable. Basically, I have this:

Dim Volume, String
Dim VolumeType, String

FTPDir (Server, id, pwd, "FilePathName",Volume)
Set VolumeType, (Left(volume,1))

IsEqual...

It works if I use a static string but not with the variable. The value will always be a string.

Thanks in advance.

Wed Oct 27, 2004 4:02 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Set Variable to LEFT() Reply with quote

You cannot use nested statements in JAL. Below is the correct script

Dim VolumeType, String

FTPDir( Server, id, pwd, "FilePathName", Volume )
Left( volume, 1, VolumeType)
IsEqual( VolumeType, ...

: I am receiving a syntax error when trying to set a vaiable to a subset of
: another variable. Basically, I have this: Dim Volume, String
: Dim VolumeType, String

: FTPDir (Server, id, pwd, "FilePathName",Volume)
: Set VolumeType, (Left(volume,1))

: IsEqual...

: It works if I use a static string but not with the variable. The value will
: always be a string.

: Thanks in advance.

Wed Oct 27, 2004 5:49 pm View user's profile Send private message
Jason Hoskins



Joined: 12 Mar 2004
Posts: 68

Post Re: Set Variable to LEFT() Reply with quote

That is working now but I am pulling the header column name into my LEFT statement. How do I loop to the next line with the FTPDir statement to get the value I really want or suppress the header all together?

Thanks again!

Jason

: You cannot use nested statements in JAL. Below is the correct script

: Dim VolumeType, String

: FTPDir( Server, id, pwd, "FilePathName", Volume )
: Left( volume, 1, VolumeType)
: IsEqual( VolumeType, ...

Thu Oct 28, 2004 8:10 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Set Variable to LEFT() Reply with quote

Too skip the first line you can use several methods the most simple is to cut the first line away using GetToken

For example,
Dim( first_line, string )
Dim( my_text, string, "line 1\nline2\nline3" )

GetToken( "\n", my_text, first_line )
MessageBox( my_text )

Note: \n represents the invisible new-line symbol.

: That is working now but I am pulling the header column name into my LEFT
: statement. How do I loop to the next line with the FTPDir statement to get
: the value I really want or suppress the header all together?

: Thanks again!

: Jason

Thu Oct 28, 2004 9:20 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.