Hi,
I have a ESPx job which will run a shell script sample.sh using user ABC.
User ABC has .bash_profile, which have certain variables that are used in sample.sh.
Am not executing the .bash_profile inside the sample.sh. It should execute it as soon as i login into the shell with that ABC user.
If i run the job from ESPx ( with user name as ABC inside the job definition) it should run the .bash_profile of the user ABC correct? But its not happening. It is failing as it was not able to find the variables.
I need some clarification here? why the ESPx( with user name as ABC inside the job definition) user cannot run the .bash_profile?
Question with ESP User in ESP job
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Question with ESP User in ESP job
Are you using BPXBATCH to execute your script? If so, this note from the z/OS UNIX System Services User's Guide is relevant -- note that NOTHING is said about .bash_profile:
If you are running your script in some other way, you need to explain more than you have.
Note: When using BPXBATCH with the SH option (SH is the default), environment variables specified in the STDENV DD are overridden by those specified in /etc/profile and .profile (which overrides /etc/profile). This is because SH causes BPXBATCH to execute a login shell that runs the /etc/profile script and runs the user's .profile.
To pass environment variables to BPXBATCH, you define a file containing the variable definitions and allocate it to the STDENV ddname. The file can be one of the following:
A z/OS UNIX file identified with the ddname STDENV
An MVS™ data set identified with the ddname STDENV
If you are running your script in some other way, you need to explain more than you have.
Re: Question with ESP User in ESP job
what does that mean BPXBATCH? I use bash shell to run our scripts usually from command line
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Question with ESP User in ESP job
Post the JCL you are using -- BPXBATCH is one of the "normal" ways to execute Unix System Services commands (or shell scripts) in a batch job.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Easy way to send PDS of source code to another user via inte
by mamustoe » Wed May 18, 2022 4:34 pm » in JCL - 4
- 1823
-
by willy jensen
View the latest post
Wed May 18, 2022 10:42 pm
-
-
- 2
- 2249
-
by Pedro
View the latest post
Tue Feb 27, 2024 4:44 am