<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Memory for enviroment variables? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490688#M19425</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have developped scripts that use environment variables of several thousands of characters and never encountered a problem.&lt;BR /&gt;&lt;BR /&gt;Maybe the variable you have problems with contains strange characters (whitespace, ...). Try quoting the variable when you assign/use it.&lt;BR /&gt;&lt;BR /&gt;Does the problem occur when assigning the variable, or when using it the first time?&lt;BR /&gt;&lt;BR /&gt;Try adding 'set -xv' at the top of the script to see what is actually happening.&lt;BR /&gt;&lt;BR /&gt;If you can't find the cause, add the output of the '-xv' output to this thread and I'll have a look at it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Feb 2001 12:32:07 GMT</pubDate>
    <dc:creator>RikTytgat</dc:creator>
    <dc:date>2001-02-07T12:32:07Z</dc:date>
    <item>
      <title>Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490685#M19422</link>
      <description>Hi&lt;BR /&gt;We have are developing av script that reads values from files and set these as enviroment variables to be used later in the script.&lt;BR /&gt;&lt;BR /&gt;Have run into problems everytime the values that is put into the file is large.&lt;BR /&gt;When reducing the size of these values; everything runs smoothly.&lt;BR /&gt;&lt;BR /&gt;Is there a parameter restricting the memory usage for enviroment variables?&lt;BR /&gt;&lt;BR /&gt;Andreas</description>
      <pubDate>Wed, 07 Feb 2001 10:43:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490685#M19422</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2001-02-07T10:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490686#M19423</link>
      <description>Hi Andreas,&lt;BR /&gt;&lt;BR /&gt;What do you mean by "large value".&lt;BR /&gt;Are you dealing with integers or with character strings?&lt;BR /&gt;&lt;BR /&gt;Could you give us a sample working/non-working input?&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Feb 2001 10:47:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490686#M19423</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-02-07T10:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490687#M19424</link>
      <description>The values are character strings that represents filesystem paths and filenames to datafiles that is to be read later.&lt;BR /&gt;&lt;BR /&gt;Eks:&lt;BR /&gt;8 variables with approx 40 char length&lt;BR /&gt;and 10 short lenght variables (&amp;lt;10 char)&lt;BR /&gt;and:&lt;BR /&gt;IEF_SB_FILE=/&amp;lt;37 char path&amp;gt;/&amp;lt;49 char filename&amp;gt;&lt;BR /&gt;&lt;BR /&gt;when the last one is shortened down, everything works fine.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Andreas&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Feb 2001 11:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490687#M19424</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2001-02-07T11:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490688#M19425</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have developped scripts that use environment variables of several thousands of characters and never encountered a problem.&lt;BR /&gt;&lt;BR /&gt;Maybe the variable you have problems with contains strange characters (whitespace, ...). Try quoting the variable when you assign/use it.&lt;BR /&gt;&lt;BR /&gt;Does the problem occur when assigning the variable, or when using it the first time?&lt;BR /&gt;&lt;BR /&gt;Try adding 'set -xv' at the top of the script to see what is actually happening.&lt;BR /&gt;&lt;BR /&gt;If you can't find the cause, add the output of the '-xv' output to this thread and I'll have a look at it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Bye,&lt;BR /&gt;Rik&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Feb 2001 12:32:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490688#M19425</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2001-02-07T12:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490689#M19426</link>
      <description>Hi Andreas,&lt;BR /&gt;&lt;BR /&gt;The size of the variables you're using shouldn't be a problem as far as the shell is concerned.&lt;BR /&gt;Have a look at your $PATH or $MANPATH variables and you'll see that an environment variable could be 'quite long'. ;-)&lt;BR /&gt;&lt;BR /&gt;Could the code actually using the variables enforce a filename length limit? 'tar' does, for example.&lt;BR /&gt;&lt;BR /&gt;Did you try echoing the variables from within your shell script? Are they printing OK?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Feb 2001 12:35:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490689#M19426</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-02-07T12:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490690#M19427</link>
      <description>Hi again!&lt;BR /&gt;I'm afraid I have been misleading you a bit here. &lt;BR /&gt;The case turns out to be like this:&lt;BR /&gt;&lt;BR /&gt;The "script" is a C program and the variables is set using putenv() and this gives a return code 0 in both cases, so it seems OK. &lt;BR /&gt;&lt;BR /&gt;A subsequent getenv() returns null when the variable is set:&lt;BR /&gt;IEF_SB_FILE=/bico/company/v2.3/test/bico/ops/input/NordTele8_000000000000000001_000000000000000029_001_n&lt;BR /&gt;and then the program fails.&lt;BR /&gt;&lt;BR /&gt;when the variable is set:&lt;BR /&gt;IEF_SB_FILE=/bico/company/v2.3/test/bico/ops/input/Nor_000000000000000001_000000000000000029_001_n&lt;BR /&gt;getenv() returns the value and the programs works.&lt;BR /&gt;&lt;BR /&gt;Hope this cleared things up a little.&lt;BR /&gt;&lt;BR /&gt;Andreas</description>
      <pubDate>Wed, 07 Feb 2001 13:13:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490690#M19427</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2001-02-07T13:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490691#M19428</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;After using the getenv call, be sure to strcpy the result into a string because 'getenv() returns a pointer to static data which can be overwritten by subsequent calls'.&lt;BR /&gt;&lt;BR /&gt;Also be sure to strcpy it to a variable that is long enough to hold the result. Otherwise, it will be truncated!!!&lt;BR /&gt;&lt;BR /&gt;char strMyString[64] will be too small. Try char strMyLongString[1024] instead (this is too much, but try it for this test).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Rik</description>
      <pubDate>Wed, 07 Feb 2001 13:23:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490691#M19428</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2001-02-07T13:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490692#M19429</link>
      <description>Hi Andreas,&lt;BR /&gt;&lt;BR /&gt;Yes, it's clearer !&lt;BR /&gt;The only problem is that there isn't any known bug about getenv() - not that I know, at least !&lt;BR /&gt;&lt;BR /&gt;Is this the way you're calling getenv?&lt;BR /&gt;&lt;BR /&gt;char *ief_sb_file;&lt;BR /&gt;ief_sb_file=getenv("IEF_SB_FILE");&lt;BR /&gt;&lt;BR /&gt;Keep in mind that getenv() returns a pointer to data which could be overwritten.&lt;BR /&gt;If you want to reuse the data later on, you should copy it to a safe variable with strcpy() or sprintf().&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Feb 2001 13:56:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490692#M19429</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-02-07T13:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Memory for enviroment variables?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490693#M19430</link>
      <description>Hi guys.&lt;BR /&gt;Unfortunately this problem can't be solved at this stage as the system test phase has to continue.&lt;BR /&gt;The chosen "solution" is to shorten the directory structures that holds the data and thus keeping the values for these variables at at low enough value.&lt;BR /&gt;&lt;BR /&gt;When the system is in production we will return to the testsytem and continue on solving this permanently, and your input will be kept to use.&lt;BR /&gt;Perhaps a new thread will be posted at that time.&lt;BR /&gt;&lt;BR /&gt;Thanks !&lt;BR /&gt;Andreas</description>
      <pubDate>Thu, 08 Feb 2001 08:12:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/memory-for-enviroment-variables/m-p/2490693#M19430</guid>
      <dc:creator>Andreas D. Skjervold</dc:creator>
      <dc:date>2001-02-08T08:12:37Z</dc:date>
    </item>
  </channel>
</rss>

