🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.asm370
10 messages
10 total messages Started by Girish B Maraliga Thu, 02 Mar 1995 21:07
Need to locate unique task ID in MVS
#1036
Author: Girish B Maraliga
Date: Thu, 02 Mar 1995 21:07
37 lines
2582 bytes
Hello.

I have a question which may seem very silly to all you gurus out there
 - please bear with me.

I am writing a application which monitors (periodically checks) various
 jobs running on a MVS (v4.3) system and pass the info back to a Unix box for
 display. The tasks to be monitored can be TSO programs, started tasks, APPC
 started programs, CICS transactions etc.

 Is there any data (similar to 'pid' in UNIX) available from the system,
 which uniques identifies a task (some of our jobs are multi-tasking) ?
 One solution we have thought is a combination of ASID and a pointer to TCB.
 This is not satisfactory as a task which starts after the previous one,
 can be assigned the same TCB ptr.

 Additional requirements of this 'identifier' are
   - We should be able to check if the task is running given only this 'ID'
   - It should be 4 byte integer
   - In the long range, we should be able to stop jobs/tasks using this 'ID'

 (Due to some difficulties, my application program is not designed to maintain
  a list/table of task information like ASID etc, but has to receive this ID
  from a Unix machine and check the status task)

 So if some kind soul can point me in the right direction, by telling what the
 Identifier should be and how to get it, I would be very thankful.

 Thanks in advance.

/Girish Maraliga

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Girish B Maraliga            | Internet : maraliga@gnpike.enet.dec.com
Lead Technical Consultant    | ObjectBroker(MVS,AS400), Digital Eqpt Corp.
Littleton, MA.               | Ph:508.952.4015
Re: Need to locate unique task ID in MVS
#1033
Author: Kirk Bradley - Mainframe and Int...
Date: Fri, 03 Mar 1995 15:35
48 lines
3014 bytes
There is a TOKEN that represents a task but I don't think it's
4 bytes.  Check your pubs for TOKEN services.

Girish B Maraliga (girish@schism.tay1.dec.com) wrote:

: Hello.

: I have a question which may seem very silly to all you gurus out there
:  - please bear with me.

: I am writing a application which monitors (periodically checks) various
:  jobs running on a MVS (v4.3) system and pass the info back to a Unix box for
:  display. The tasks to be monitored can be TSO programs, started tasks, APPC
:  started programs, CICS transactions etc.

:  Is there any data (similar to 'pid' in UNIX) available from the system,
:  which uniques identifies a task (some of our jobs are multi-tasking) ?
:  One solution we have thought is a combination of ASID and a pointer to TCB.
:  This is not satisfactory as a task which starts after the previous one,
:  can be assigned the same TCB ptr.

:  Additional requirements of this 'identifier' are
:    - We should be able to check if the task is running given only this 'ID'
:    - It should be 4 byte integer
:    - In the long range, we should be able to stop jobs/tasks using this 'ID'

:  (Due to some difficulties, my application program is not designed to maintain
:   a list/table of task information like ASID etc, but has to receive this ID
:   from a Unix machine and check the status task)

:  So if some kind soul can point me in the right direction, by telling what the
:  Identifier should be and how to get it, I would be very thankful.

:  Thanks in advance.

: /Girish Maraliga

: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
: Girish B Maraliga            | Internet : maraliga@gnpike.enet.dec.com
: Lead Technical Consultant    | ObjectBroker(MVS,AS400), Digital Eqpt Corp.
: Littleton, MA.               | Ph:508.952.4015



--
Kirk Bradley
Oracle Corporation
Mainframe and Integration Technologies Group
Re: Need to locate unique task ID in MVS
#1019
Author: A. Grant
Date: Fri, 17 Mar 1995 18:53
12 lines
1540 bytes
Girish B Maraliga (girish@schism.tay1.dec.com) wrote:
>  Is there any data (similar to 'pid' in UNIX) available from the system,
>  which uniques identifies a task (some of our jobs are multi-tasking) ?
>  One solution we have thought is a combination of ASID and a pointer to 
>  TCB.  This is not satisfactory as a task which starts after the previous 
>  one, can be assigned the same TCB ptr.

Yes but you can detect when the TCB pointer stops being valid,
by using a subsystem end-of-task exit.  You can delete anything
'owned' by your client tasks (e.g. an entry in a table, or a 
control block) so that reusing the TCB address appears as a 
fresh client.  Is this enough?
Re: Need to locate unique task ID in MVS
#1020
Author: Alexander Vrenios
Date: Mon, 20 Mar 1995 15:18
25 lines
2223 bytes
Hi,

   Well, this might not be current information, but as I recall the TCB
pointed to the TIOT, which has the 8-byte job name (or TSO login id). A
combination of the ASID, TCBADDR, and JOBNAME ought to be unique - no?

   Also, your MVS-daemon program (system task, in IBM parlance, ought to
be able to determine which TCBs are subtasks of which, per the pointers
within them. Good luck!


In article <ag129.1798.0012E61B@ucs.cam.ac.uk>,
A. Grant <ag129@ucs.cam.ac.uk> wrote:
>Girish B Maraliga (girish@schism.tay1.dec.com) wrote:
>>  Is there any data (similar to 'pid' in UNIX) available from the system,
>>  which uniques identifies a task (some of our jobs are multi-tasking) ?
>>  One solution we have thought is a combination of ASID and a pointer to
>>  TCB.  This is not satisfactory as a task which starts after the previous
>>  one, can be assigned the same TCB ptr.
>
>Yes but you can detect when the TCB pointer stops being valid,
>by using a subsystem end-of-task exit.  You can delete anything
>'owned' by your client tasks (e.g. an entry in a table, or a
>control block) so that reusing the TCB address appears as a
>fresh client.  Is this enough?
Re: Need to locate unique task ID in MVS
#1021
Author: Girish B Maraliga
Date: Tue, 21 Mar 1995 23:46
41 lines
2808 bytes
Alexander Vrenios (vrenios@enuxsa.eas.asu.edu) wrote:

| A combination of the ASID, TCBADDR, and JOBNAME ought to be unique - no?

Unfortunately no. The TCBADDR will be reused by the next task by the same
user. Ergo, ASID+TCBADDR+JOBNAME is not unique for a task. :(

| A. Grant <ag129@ucs.cam.ac.uk> wrote:
| >Yes but you can detect when the TCB pointer stops being valid,
| >by using a subsystem end-of-task exit.  You can delete anything
| >'owned' by your client tasks (e.g. an entry in a table, or a
| >control block) so that reusing the TCB address appears as a
| >fresh client.  Is this enough?

As it happens,
  1. I cannot modify any of the applications currently running.
  2. I cannot maintain a table of all tasks running and update them.


Also, how do I get a list of all active TCBs in the system ?

I tried the following method.

  PSA -> CVT -> ASCB queue  -> ASXB  -> FTCB (First TCB) and LTCB (last)
                  |
                ASCB        -> ASXB  -> FTCB, LTCB

The problem is, though I get all the ASCBs in the system, I always endup
in the same ASXB ( the one in the current address space). Am I missing
something ?

what should I do to get a list of all active TCBs in the system ?

Thanks in advance for all the help.

/Girish

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Girish B Maraliga                     maraliga@gnpike.enet.dec.com
Lead Technical Consultant, ObjectBroker (MVS,AS400), Digital Equipment Corp.
Littleton, MA, 508.952.4015
Re: Need to locate unique task ID in MVS
#1022
Author: Ken Leidner
Date: Thu, 23 Mar 1995 05:33
14 lines
1562 bytes
>In article <ag129.1798.0012E61B@ucs.cam.ac.uk>,
>A. Grant <ag129@ucs.cam.ac.uk> wrote:
>>Girish B Maraliga (girish@schism.tay1.dec.com) wrote:
>>>  Is there any data (similar to 'pid' in UNIX) available from the system,


How about JOBNAME, ASID and TIME.  This should give you uniqueness for batch 
jobs.  If the time is also to include the date, it should be good for some 
time.

Ken Leidner
Systems Programmer
kleidner@earthlink.net  
Re: Need to locate unique task ID in MVS
#1023
Author: Michael Quinlan
Date: Thu, 23 Mar 1995 14:05
20 lines
1966 bytes
In article <3knogu$bbi@mrnews.mro.dec.com> girish@schism.tay1.dec.com (Girish B Maraliga) writes:

>The problem is, though I get all the ASCBs in the system, I always endup
>in the same ASXB ( the one in the current address space). Am I missing
>something ?

>what should I do to get a list of all active TCBs in the system ?

    ASXBs and TCBs are stored _in_ the address space. You will need an SRB
    or some form of cross memory services to access the ASXBs and TCBs.

    I belive that someone else here suggested using the ASCB+TCB address and
    having subsystem services notify you when the TCB becomes invalid.
    That is the best approach I can think of.

+---------------------------------+
| Michael Quinlan                 |
| mikeq@primenet.com              |
| http://www.primenet.com/~mikeq/ |
+---------------------------------+
Re: Need to locate unique task ID in MVS
#1026
Author: Alexander Vrenios
Date: Mon, 27 Mar 1995 15:15
21 lines
2136 bytes
In article <mikeq.188.002CA443@primenet.com>,
Michael Quinlan <mikeq@primenet.com> wrote:
>In article <3knogu$bbi@mrnews.mro.dec.com> girish@schism.tay1.dec.com (Girish B Maraliga) writes:
>
>>The problem is, though I get all the ASCBs in the system, I always endup
>>in the same ASXB ( the one in the current address space). Am I missing
>>something ?
>
>>what should I do to get a list of all active TCBs in the system ?
>
>    ASXBs and TCBs are stored _in_ the address space. You will need an SRB
>    or some form of cross memory services to access the ASXBs and TCBs.
>
>    I belive that someone else here suggested using the ASCB+TCB address and
>    having subsystem services notify you when the TCB becomes invalid.
>    That is the best approach I can think of.

   My earlier followup seems to have been lost; it asks if there is
still the equivalent of a HASP job number under JES (2 or 3). This
might give him what he wants, which I believe to be the MVS version
of the Unix ps command, etc.
Re: Need to locate unique task ID in MVS
#1027
Author: Michael Quinlan
Date: Tue, 28 Mar 1995 03:24
16 lines
1779 bytes
In article <D63uEE.295@ennews.eas.asu.edu> vrenios@enuxsa.eas.asu.edu (Alexander Vrenios) writes:

>   My earlier followup seems to have been lost; it asks if there is
>still the equivalent of a HASP job number under JES (2 or 3). This
>might give him what he wants, which I believe to be the MVS version
>of the Unix ps command, etc.

    Yes there is still a job number. I don't think it gives this person what
    they need though since they need to identify individual subtasks within
    each address space.

+---------------------------------+
| Michael Quinlan                 |
| mikeq@primenet.com              |
| http://www.primenet.com/~mikeq/ |
+---------------------------------+
Re: Need to locate unique task ID in MVS
#1030
Author: Girish B Maraliga
Date: Thu, 06 Apr 1995 00:00
20 lines
1909 bytes
A. Grant (ag129@ucs.cam.ac.uk) wrote:
| I'm not sure what you are trying to do here, are these TCBs requesting
| services from you?  Or is this some kind of passive monitoring system?

This is a passive monitoring system. Unfortunately, the monitoring system is 
already been implemented on a Unix box and now there is a need to integrate
MVS applications into system. 

Now, the monitor uses a unique number (pid in Unix, ? in MVS), to identify a 
task and also to periodically check if the said task is active.
In the MVS context, the monitor uses a 'agent' program (a started task) to 
detect new tasks, getting task IDs and to verify if the tasks are running.

Thanks for all those who replied.

/Girish
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Girish B Maraliga                     maraliga@gnpike.enet.dec.com
Lead Technical Consultant, ObjectBroker (MVS,AS400), Digital Equipment Corp. 
Littleton, MA, 508.952.4015
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads