Is there a standard way to determine which DB2 subsystem the program is talking to?

Binyamin Dissen

Is there a standard way to determine which DB2 subsystem the program is talking to?
Assuming that a DB2 program calls my subroutine, is there a standard way to
discover the name of the DB2 subsystem? Or must it be passed as a parm?

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Philip Sevetson

Re: Is there a standard way to determine which DB2 subsystem the program is talking to
(in response to Binyamin Dissen)
SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1 should work nicely. Note that the SERVER name is always unique but not always identical to the four-character subsystem name (it is defined at install time).

--Phil S.

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Binyamin Dissen
Sent: Monday, February 01, 2010 9:45 AM
To: [login to unmask email]
Subject: [DB2-L] Is there a standard way to determine which DB2 subsystem the program is talking to?

Assuming that a DB2 program calls my subroutine, is there a standard way to
discover the name of the DB2 subsystem? Or must it be passed as a parm?

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Binyamin Dissen

Re: Is there a standard way to determine which DB2 subsystem the program is talking to?
(in response to Philip Sevetson)
I saw that, but it does not allow me to determine the subsystem name. Also it
can be blank.

On Mon, 1 Feb 2010 10:00:14 -0500 "Sevetson, Phil" <[login to unmask email]>
wrote:

:>SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1 should work nicely. Note that the SERVER name is always unique but not always identical to the four-character subsystem name (it is defined at install time).
:>
:>--Phil S.
:>
:>-----Original Message-----
:>From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Binyamin Dissen
:>Sent: Monday, February 01, 2010 9:45 AM
:>To: [login to unmask email]
:>Subject: [DB2-L] Is there a standard way to determine which DB2 subsystem the program is talking to?
:>
:>Assuming that a DB2 program calls my subroutine, is there a standard way to
:>discover the name of the DB2 subsystem? Or must it be passed as a parm?

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Todd Burch

Re: Is there a standard way to determine which DB2 subsystem the program is talking to?
(in response to Binyamin Dissen)
Try loading DSNHDECP and get the SSID from there.

Todd


On Feb 1, 2010, at 9:13 AM, Binyamin Dissen wrote:

I saw that, but it does not allow me to determine the subsystem name.
Also it
can be blank.

On Mon, 1 Feb 2010 10:00:14 -0500 "Sevetson, Phil" <[login to unmask email]
>
wrote:

:>SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1 should work nicely.
Note that the SERVER name is always unique but not always identical to
the four-character subsystem name (it is defined at install time).
:>
:>--Phil S.
:>
:>-----Original Message-----
:>From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Binyamin
Dissen
:>Sent: Monday, February 01, 2010 9:45 AM
:>To: [login to unmask email]
:>Subject: [DB2-L] Is there a standard way to determine which DB2
subsystem the program is talking to?
:>
:>Assuming that a DB2 program calls my subroutine, is there a standard
way to
:>discover the name of the DB2 subsystem? Or must it be passed as a
parm?

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Michael Turner

Re: Is there a standard way to determine which DB2 subsystem the program is talking to?
(in response to Todd Burch)
Hi Binyamin

For V8 and later you can use session variables. For example, in COBOL:

DATA DIVISION.
WORKING STORAGE SECTION.
01 WK-SSID.
49 WK-SSID-LEN PIC S9(4).
49 WK-SSID-DATA PIC X(10).
.
PROCEDURE DIVISION.
.
EXEC SQL SET :WK-SSID = GETVARIABLE('SYSIBM.SYSTEM_NAME')
END-EXEC

Regards
Mike Turner
Email: [login to unmask email]
Tel: +44 (0)1565-873702
Web: www.michael-turner.ltd.uk
Michael Turner Ltd. Registered in England & Wales No. 1433722. Registered
Office: 131 King Street, Knutsford, Cheshire, WA16 6EJ. VAT No. GB 338 4159
44.
----- Original Message -----
From: "Binyamin Dissen" <[login to unmask email]>
Newsgroups: bit.listserv.db2-l
To: <[login to unmask email]>
Sent: Monday, February 01, 2010 3:13 PM
Subject: Re: [DB2-L] Is there a standard way to determine which DB2
subsystem the program is talking to?


>I saw that, but it does not allow me to determine the subsystem name. Also
>it
> can be blank.
>
> On Mon, 1 Feb 2010 10:00:14 -0500 "Sevetson, Phil"
> <[login to unmask email]>
> wrote:
>
> :>SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1 should work nicely. Note
> that the SERVER name is always unique but not always identical to the
> four-character subsystem name (it is defined at install time).
> :>
> :>--Phil S.
> :>
> :>-----Original Message-----
> :>From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Binyamin
> Dissen
> :>Sent: Monday, February 01, 2010 9:45 AM
> :>To: [login to unmask email]
> :>Subject: [DB2-L] Is there a standard way to determine which DB2
> subsystem the program is talking to?
> :>
> :>Assuming that a DB2 program calls my subroutine, is there a standard way
> to
> :>discover the name of the DB2 subsystem? Or must it be passed as a parm?
>
> --
> Binyamin Dissen <[login to unmask email]>
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
>
> Should you use the mailblocks package and expect a response from me,
> you should preauthorize the dissensoftware.com domain.
>
> I very rarely bother responding to challenge/response systems,
> especially those from irresponsible companies.
>
> _____________________________________________________________________
>
> * IDUG North America * Tampa, Florida, * May 10-14 2010 *
> http://IDUG.ORG/NA *
> _____________________________________________________________________
>
> http://www.idug.org/db2-content/index.html has THOUSANDS of free technical
> presentations!
> DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI,
> Warehouses, - among
> many more categories of help waiting for you!
> Whether you are an old hand or a DB2 newbie, we have presentations for
> every level.
> _____________________________________________________________________
>
> If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is
> the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Phil Grainger

Re: Is there a standard way to determine which DB2 subsystem the program is talking to?
(in response to Michael Turner)
But that will only tell you the DEFAULT subsystem name, not necessarily the
one currently connected to

Phil Grainger
Grainger Database Solutions Ltd

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Todd Burch
Sent: 01 February 2010 15:49
To: [login to unmask email]
Subject: Re: [DB2-L] Is there a standard way to determine which DB2
subsystem the program is talking to?

Try loading DSNHDECP and get the SSID from there.

Todd


On Feb 1, 2010, at 9:13 AM, Binyamin Dissen wrote:

I saw that, but it does not allow me to determine the subsystem name.
Also it
can be blank.

On Mon, 1 Feb 2010 10:00:14 -0500 "Sevetson, Phil" <[login to unmask email]
>
wrote:

:>SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1 should work nicely.
Note that the SERVER name is always unique but not always identical to
the four-character subsystem name (it is defined at install time).
:>
:>--Phil S.
:>
:>-----Original Message-----
:>From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Binyamin
Dissen
:>Sent: Monday, February 01, 2010 9:45 AM
:>To: [login to unmask email]
:>Subject: [DB2-L] Is there a standard way to determine which DB2
subsystem the program is talking to?
:>
:>Assuming that a DB2 program calls my subroutine, is there a standard
way to
:>discover the name of the DB2 subsystem? Or must it be passed as a
parm?

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical
presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI,
Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every
level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is
the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI, Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Jerry Boehm

Re: Is there a standard way to determine which DB2 subsystem the program is talking to?
(in response to Phil Grainger)
In our shop, we implemented an ignorant man's approach (that is, for a
person not skilled in the details of DB2). We created a single row table
(called WHEREAMI) in each subsystem, accessible to the public. Anyone
can select SSID from that table.

Now I must admit, I don't think anyone outside the database group uses
it, and in fact maybe I'm the only one IN the group who uses it. ;-)

Jerry Boehm
NY State dept of Transportation
Albany, NY

>>> On 2/1/2010 at 11:39 AM, [login to unmask email] wrote:
But that will only tell you the DEFAULT subsystem name, not necessarily
the
one currently connected to

Phil Grainger
Grainger Database Solutions Ltd

-----Original Message-----
From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Todd Burch
Sent: 01 February 2010 15:49
To: [login to unmask email]
Subject: Re: [DB2-L] Is there a standard way to determine which DB2
subsystem the program is talking to?

Try loading DSNHDECP and get the SSID from there.

Todd


On Feb 1, 2010, at 9:13 AM, Binyamin Dissen wrote:

I saw that, but it does not allow me to determine the subsystem name.

Also it
can be blank.

On Mon, 1 Feb 2010 10:00:14 -0500 "Sevetson, Phil"
<[login to unmask email]
>
wrote:

:>SELECT CURRENT SERVER FROM SYSIBM.SYSDUMMY1 should work nicely.
Note that the SERVER name is always unique but not always identical to

the four-character subsystem name (it is defined at install time).
:>
:>--Phil S.
:>
:>-----Original Message-----
:>From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Binyamin

Dissen
:>Sent: Monday, February 01, 2010 9:45 AM
:>To: [login to unmask email]
:>Subject: [DB2-L] Is there a standard way to determine which DB2
subsystem the program is talking to?
:>
:>Assuming that a DB2 program calls my subroutine, is there a standard

way to
:>discover the name of the DB2 subsystem? Or must it be passed as a
parm?

--
Binyamin Dissen <[login to unmask email]>
http://www.dissensoftware.com

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free
technical
presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI,
Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for
every
level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is
the home of IDUG's DB2-L

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 *
http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-content/index.html has THOUSANDS of free
technical presentations!
DB2 LUW, DB2 z/OS, Performance, Installation, Tuning, Coding, BI,
Warehouses, - among
many more categories of help waiting for you!
Whether you are an old hand or a DB2 newbie, we have presentations for
every level.
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L
is the home of IDUG's DB2-L


_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.IDUG.org membership is now free.
Do you have people in your office who are not an IDUG member?
Show them how to access the information and help train the next generation of DB2 Users!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Richard Gugel

Re: Is there a standard way to determine which DB2 subsystem the program is talking to?
(in response to Jerry Boehm)
Hello Binyamin
You could call the procedure SYSPROC.ADMIN_INFO_SSID. It says it returns the name of the connected db2 system

Rich


_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.IDUG.org membership is now free.
Do you have people in your office who are not an IDUG member?
Show them how to access the information and help train the next generation of DB2 Users!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L