I need to pass the TRAP(OFF) runtime option to an IBM AIX COBOL application. The problem is, I have no idea how to do that, and I can't find anything in the IBM documentation on how to do that. I've tried export TRAP=OFF in my runscript, but that didnt do it. Does anyone know how to do this?
In order to set runtime options for applications created with COBOL for AIX, one must set the environment variable COBRTOPT to contain the options to be set. For example, to set TRAP(OFF) :
export COBRTOPT="TRAP(OFF)"
I will ask our documentation writers to clarify the documention by perhaps linking the second reference back to the first.
Depending on the flavor of COBOL (I use AcuCOBOL) you can accept data into a working storage variable from a command line option like so:
ACCEPT WS-CMD-LINE FROM COMMAND-LINE.
You can also set an environment variable like you are trying to do and ACCEPT it like so:
ACCEPT WS-ENV-VAR FROM ENVIRONMENT "TRAP".
Hope this helps!
Related
I want to various projects for various platforms, and as such I've concluded that the easiest way to to this is probably going to just have buildroot create the toolchain and then alter the environment to use said toolchain.
From section 8.14.1 of the buildroot manual:
For your convenience, by selecting the option
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP, you can get setup-environment
script installed in output/host/and therefore in your SDK. This script
can be sourced with . your/sdk/path/environment-setup to export a
number of environment variables that will help cross-compile your
projects using the Buildroot SDK: the PATH will contain the SDK
binaries, standard autotools variables will be defined with the
appropriate values, and CONFIGURE_FLAGS will contain basic ./configure
options to cross-compile autotools projects. It also provides some
useful commands. Note however that once this script is sourced, the
environment is setup only for cross-compilation, and no longer for
native compilation.
Alright, that sounds pretty much like exactly what I want. However, I have not figured out how to set BR2_PACKAGE_HOST_ENVIRONMENT_SETUP. I found no mention of anything similar when looking through make menuconfig, I tried to grep the entire buildroot source tree for that string with no luck, and simply exporting it as an environment variabl did not produce a different result either. So, how do I set BR2_PACKAGE_HOST_ENVIRONMENT_SETUP, exactly?
I just stumbled across the same problem. The option was submitted in April 2020, so buildroot-2020.02.8 (the long term support version as of writing) doesn't support it, whereas the PDF available online is newer -- I suspect you are using the same version; the buildroot download page presents the longer term support version first.
In menu-config, you do a search ("/") of HOST_ENVIRONMENT and then you find your answer:
screenshot
I am trying to run COPASI in commandline but there is very little documentation.
I have downloaded and unzipped binary, I am not sure how to proceed in order to do something as simple as import an SBML file?
Here is all the documentation I found:
http://copasi.org/Support/User_Manual/Model_Creation/Commandline_Version_and_Commandline_Options/
It doesn't say which command do I use to call COPASI?
The command line version of COPASI is CopasiSE, which you can install besides the GUI CopasiUI via any source here http://copasi.org/Download/.
For example, see https://github.com/ICB-DCM/solverstudy/blob/master/Bash_Scripts/install_copasi.sh, in which case the executable resides in a local folder.
Regarding usage, I am not sure whether extensive API documentation is available. It probably won't help much, but here's how we wrapped it in a study via Python to call an underlying CPS model file https://github.com/ICB-DCM/solverstudy/blob/master/Python_Scripts/simulation_wrapper_copasi.py#L77.
I am working with the Ruby source which has a configure.in script with the following line AC_CHECK_FUNCS(clock_gettime)
On my system it WILL find such a function and Ruby will go ahead and build a binary that depends on this function. However, this function is non-portable to other operating systems so i would like to tell the ./configure script NOT to use this function even if it does find it.
It would be perfect if i can instruct ./configure not to use this function by a command line option, i heavily prefer not to modify the configure.in script if possible. My question is, how do I do this? I can't seem to find the correct command line option to use.
My question is, how do I do this? I can't seem to find the correct command line option to use.
First, there is good advice in the comments: for best results, build on the oldest system you can find (or set up) and try to reduce the dependencies as much as possible. glibc is good about symbol versioning and compatibility, but many other libraries are not.
That said, if you really want to circumvent a check, the way to do it is to pre-populate a cache file with the results you want. One simple way to make the cache is to run configure, then edit it, then re-run configure.
The cache variable naming scheme is documented, but normally you can find what you want by just searching for the function name in config.cache.
Maybe it's even possible to set the cache variable on the configure command line -- but I have never tried this.
Sublime Text 3 on OSX.
I am writing a plugin that loads up a particularly poorly-written 3rd-party Python module that relies on the value of an Environment Variable to function properly (in particular, DYLD_LIBRARY_PATH).
Of course, I could set this globally, but I would love for the Sublime Plugin to be self-contained. I notice that plugins run in a child process of Sublime itself - is there any way to tell Sublime to provide the plugin_host process with a particular Environment Variable before it spins it off?
If not, does anyone know of another way to solve this problem? For performance and simplicity reasons, I would greatly prefer to have the python script be self-contained, rather than calling out to an external script that utilizes the library. Thank you.
Check out os.putenv() and os.environ for details on setting environment variables from Python. So, for your case, before importing your 3rd-party module, use something like this:
import os
os.environ['DYLD_LIBRARY_PATH'] = '/usr/lib/foo:' + os.environ.get('DYLD_LIBRARY_PATH')
import third_party
# and so on...
I know we can always use eselect to change the compiler version. My question is that possible to bind different version to different users. For example, I would like root to use stable version for sure. and meanwhile, I would like my normal user to use some edge-cutting version.
I expect some clean solution instead of switch manually by using eselect
Thanks
I really hope you're not using eselect for this. eselect-compiler was killed off years ago because it was experimental and had many problems. gcc-config is what you should be using. Unfortunately it doesn't have per-user support like we have for Java. You can always call the specific version explicitly (e.g. gcc-4.6.2 instead of just gcc). If you're building software with autotools then you can do it with...
CC=gcc-4.6.2 ./configure
make
You can use gcc-config to print the environment variables necessary to use a specific GCC version. For example, to use gcc-7.2.0 for the remainder of your shell session:
eval "$(gcc-config --print-environ x86_64-pc-linux-gnu-7.2.0)"