I have Conda installed and am using /etc/profile for the environment variables for Conda. I'm trying to execute curl in batch but not having much luck. I'm using the following JCL.
//CURL EXEC PGM=BPXBATCH
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD PATH='/etc/profile',PATHOPTS=ORDONLY
//STDIN DD DUMMY
//STDPARM DD *
sh 'curl --version'
/*
I keep getting "-bash: curl --version: command not found"
It's not finding the environment variables (PATH, MANPATH, etc).
This works:
//CURL EXEC PGM=BPXBATCH
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD PATH='/etc/profile',PATHOPTS=ORDONLY
//STDIN DD DUMMY
//STDPARM DD *
sh '/rsusr/conda/envs/default/bin/curl' --version
/*
What's the magic secret handshake/decoder ring to get curl to execute in batch? No, I don't want to issue the "conda activate default" command, I want it to use the /etc/profile environment variables I already have set up.
------------------------------
Michael Babcock
z/OS Systems Programmer, Sr
OneMain Financial
Evansville IN US
------------------------------
