PATH and LIBPATH questions - OS2

This is a discussion on PATH and LIBPATH questions - OS2 ; My understanding was that you could use %PATH% to split long path values, but when I used that in config.sys the token was not replaced with the value of path. Do I have the wrong syntax, or do I have ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: PATH and LIBPATH questions

  1. PATH and LIBPATH questions

    My understanding was that you could use %PATH% to split long path values,
    but when I used that in config.sys the token was not replaced with the
    value of path. Do I have the wrong syntax, or do I have to move the
    extension to startup.cmd?

    The manual says that BEGINLIBPATH and ENDLIBPATH affect only the current
    process. Are they not propagated to new processes, such that putting them
    in config.sys will affect all processes?

    --
    Shmuel (Seymour J.) Metz, SysProg and JOAT

    Unsolicited bulk E-mail subject to legal action. I reserve the
    right to publicly post or ridicule any abusive E-mail. Reply to
    domain Patriot dot net user shmuel+news to contact me. Do not
    reply to spamtrap@library.lspace.org


  2. Re: PATH and LIBPATH questions

    On 10/12/08 05:56 pm, Shmuel (Seymour J.) Metz wrote:
    > My understanding was that you could use %PATH% to split long path values,
    > but when I used that in config.sys the token was not replaced with the
    > value of path. Do I have the wrong syntax, or do I have to move the
    > extension to startup.cmd?
    >

    The value %PATH% is replaced with the complete contents of the current
    process' path. It is not clear how that would "split long paths."

    > The manual says that BEGINLIBPATH and ENDLIBPATH affect only the current
    > process. Are they not propagated to new processes, such that putting them
    > in config.sys will affect all processes?
    >

    Yes, those values are inherited by each process. If defined in
    , all processes inherit them. If, however, you change those
    two variables, the new values only apply to the current process.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  3. Re: PATH and LIBPATH questions

    Shmuel (Seymour J.) Metz schrieb:
    > My understanding was that you could use %PATH% to split long path values,
    > but when I used that in config.sys the token was not replaced with the
    > value of path. Do I have the wrong syntax, or do I have to move the
    > extension to startup.cmd?
    >
    > The manual says that BEGINLIBPATH and ENDLIBPATH affect only the current
    > process. Are they not propagated to new processes, such that putting them
    > in config.sys will affect all processes?


    Putting BEGINLIBPATH and ENDLIBPATH into CONFIG.SYS does not make sense,
    that is what LIBPATH is for.

    BEGINLIBPATH and ENDLIBPATH only affect the current process and process
    that are started from this process.

    Regards,
    Herwig


  4. Re: PATH and LIBPATH questions

    Hi

    Shmuel (Seymour J.) Metz wrote:
    > My understanding was that you could use %PATH% to split long path values,
    > but when I used that in config.sys the token was not replaced with the
    > value of path. Do I have the wrong syntax, or do I have to move the
    > extension to startup.cmd?
    >



    My understanding of %PATH% is that it holds all the Path data set in the
    config.sys Path statement.

    If you wanted to add to the existing Path data, when starting an app
    maybe, then you could use something like the below in a startup script
    for the app.

    set
    PATH=G:\JAVA142\jre\bin;G:\JAVA142\jre\bin\client; G:\JAVA142\jre\JAVAWS;%path%


    > The manual says that BEGINLIBPATH and ENDLIBPATH affect only the current
    > process. Are they not propagated to new processes, such that putting them
    > in config.sys will affect all processes?
    >



    As their names suggest they are "addons" to LiPath which is set in
    config.sys - these "addons" are not.

    You can addon at the start of the LibPath, BeginLibPath, or at the end,
    EndLibPath.

    Usually used when starting an app (from a script) that needs to find
    support files (*.dll) not already in the LibPath.

    You can use BeginLibPath to make sure that the app uses a specific dll
    file rather than any that may already be in the LibPath. The below sets
    java142 files before any other java in the LibPath preventing java142
    from trying to use java131 files

    set
    BEGINLIBPATH=G:\JAVA142\jre\bin;G:\JAVA142\jre\bin \client;G:\JAVA142\jre\JAVAWS;

    EndLibPath appends the extra LibPath data to the end of the LibPath.


    Hope that helps

    Pete




  5. Re: PATH and LIBPATH questions

    On Mon, 13 Oct 2008 00:56:44 UTC, Shmuel (Seymour J.) Metz
    wrote:

    > My understanding was that you could use %PATH% to split long path values,
    > but when I used that in config.sys the token was not replaced with the
    > value of path. Do I have the wrong syntax, or do I have to move the
    > extension to startup.cmd?


    1) The syntax is not for CONFIG.SYS, but for CMD.EXE. It thus works at a
    command prompt only.

    2) Putting it in STARTUP.CMD will work, but only for the duration of the
    execution of STARTUP.CMD, as it affects only the environment of
    STARTUP.CMD.

    3) Just have a very long path. If that's a problem, reorganise things,
    or use SUBST or TVFS to attach drive letters to some of the longer
    paths.

    > The manual says that BEGINLIBPATH and ENDLIBPATH affect only the current
    > process. Are they not propagated to new processes, such that putting them
    > in config.sys will affect all processes?


    4) It's what the manual says.

    5) These two are treated specially by CMD.EXE. When you set these, it
    does other stuff in the background so that they work. Putting them in
    CONFIG.SYS does not, therefore, have the desired effect (it'll set the
    environment variables, but that's all - but not enough).

    --
    Bob Eager
    Use the BIG mirror service in the UK:
    http://www.mirrorservice.org


  6. Re: PATH and LIBPATH questions

    In , on 10/12/2008
    at 09:56 PM, Jim Moe said:

    > Yes, those values are inherited by each process. If defined in
    >, all processes inherit them. If, however, you change those
    >two variables, the new values only apply to the current process.


    Do you mean the new process and anything started by it? E.g.,, will bar
    run with foo in the libpath if I use the commands

    SETLOCAL
    BEGINLIBPATH foo;%BEGINLIBPATH%
    START bar

    --
    Shmuel (Seymour J.) Metz, SysProg and JOAT

    Unsolicited bulk E-mail subject to legal action. I reserve the
    right to publicly post or ridicule any abusive E-mail. Reply to
    domain Patriot dot net user shmuel+news to contact me. Do not
    reply to spamtrap@library.lspace.org


  7. Re: PATH and LIBPATH questions

    In , on 10/12/2008
    at 09:56 PM, Jim Moe said:

    > The value %PATH% is replaced with the complete contents of the current
    >process' path. It is not clear how that would "split long paths."


    SET PATH=bar
    SET PATH=foo;%PATH%

    shortens the statements when foo and bar are long.

    --
    Shmuel (Seymour J.) Metz, SysProg and JOAT

    Unsolicited bulk E-mail subject to legal action. I reserve the
    right to publicly post or ridicule any abusive E-mail. Reply to
    domain Patriot dot net user shmuel+news to contact me. Do not
    reply to spamtrap@library.lspace.org


  8. Re: PATH and LIBPATH questions

    On 10/13/08 09:15 am, Shmuel (Seymour J.) Metz wrote:
    >
    >> Yes, those values are inherited by each process. If defined in
    >>, all processes inherit them. If, however, you change those
    >>two variables, the new values only apply to the current process.

    >
    > Do you mean the new process and anything started by it? E.g., will bar
    > run with foo in the libpath if I use the commands
    >
    > SETLOCAL
    > BEGINLIBPATH foo;%BEGINLIBPATH%
    > START bar
    >

    Yes, the current process and its descendants.
    The SET command must be "set BEGINLIBPATH=foo;%BEGINLIBPATH%".
    The begin-/endlibpath entries must be valid paths. Otherwise they are
    ignored.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

+ Reply to Thread