John I will see if STDIN or STDENV might work.
Thanks for the suggestion Lizette -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of John McKown Sent: Wednesday, January 29, 2020 11:34 AM To: [email protected] Subject: Re: How to set up UNIX to switch between DB2 versions and .profiles On Wed, Jan 29, 2020 at 12:13 PM Lizette Koehler <[email protected]> wrote: > The USS process is not in DB2 to issue any SELECT statement. > > So is there way to do this > > If I start a started task > > S GGDB2,SSID=DB2U > > The process gets to the application layer before I can set the STEPLIB > In USS or Java Path > > Lizette > > OK, IIRC, you want to run a z/OS UNIX process which uses DB2 using JCL. That is, you are _not_ running this interactively either via TSO or in a UNIX shell. If that is correct, then you can set z/OS UNIX environment variables using the STDENV DD statement. //STDENV DD * (OR A DSN) PATH=/bin:/usr/bin:/some/DB2/directory STEPLIB=APPLICATION.LOADLIB:DB2V10.LOADLIB:SOME.OTHER.LOADLIB ANOTHER=SOME-PARAMETER Note that these variables will already set up by the time the ~/.profile is sourced, so you need the ~/.profile to check them out and not override them. You don't show the GGDB2 procedure, but I imagine some DD like: //STDENV DD DISP=SHR,DSN=SOME.PARMLIB(ENV&SSID.) Or maybe use another symbol in the PROC: S GGDB2,SSID=DB2U,APPL=X //STDENV DD DISP=SHR,DSN=SOME.PARMLIB(ENV&APPL.) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
