SOLVED: System Variable Syntax

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7838
    AvatarMrCentral
    Member
    • Total Post: 14
    • Regular Joe
    • ★★

    I’m having trouble with the syntax for system variable offsets.

    I’m naming the machines after their usage profile with a number appended to distinguish them. So for example, clients would be named named ProfileA1, ProfileB1, etc. I’m trying to include a .ini file with the profile name with no numbers. So in the “inc” folder I have ProfileA.ini, ProfileB.ini, ProfileC.ini. Then in my wnos.ini I have:
    Include=&Right($TN,1).ini
    My thought was that it would read the terminal name starting on the right and skip one character (the number at the end of the terminal name). Then the unit number would be stripped off and all machines with the same profile name would pull the same .ini file.

    I’ve tested out Include=$TN.ini and it works perfectly, but when I add the number to the terminal name and use the offset syntax, it doesn’t work.
    I’ve read the system variable guide over and over and scoured the web for other information about the system variable syntax. Am I misunderstanding how it works?

    #23821
    ConfGenConfGen
    Keymaster
    • Total Post: 9912
    • Jedi Master
    • ★★★★★★★

    Check the FTP server log file. This should show you what name the client is looking for.

    CG

    #23830
    AvatarMrCentral
    Member
    • Total Post: 14
    • Regular Joe
    • ★★

    Perfect, thank you! I hadn’t thought to do that. It turns out it works precisely the opposite of how I understood it. The offset is how many characters it reads from that direction, not how many it ignores. Now I can simplify my configuration considerably.

    For any future seekers having trouble with the syntax:
    As expected, &Left or &Right will make it read FROM that direction. The offset number states how many characters it will read before stopping. So &Left($TN,7) applied to the terminal name “wtSales09” will yield “wtSales,” while &Right($TN,7) would yield “Sales09.” Hope this clarifies for anyone else having trouble with this.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.