On 14 November 2015 at 11:28, [email protected] <[email protected]> wrote:
> Lets say for this discussion I want to transfer all I/O from a an 
> applications SYSOUT DD with SUBSYS=xxxx
> to a 64Bit Memory Chunk.
> Once I have all my exits established, Each I/O from an application with the 
> appropriate SUBSYS statement should
> be directed to my SubSystem Address Space. Do I understand this correctly ?

No. There is no requirement for a subsystem to have an address space
at all, or to communicate with one.

> How does the subsystem address space receive/obtain the data from the 
> Applications PUT/WRITE statement, so
> that the SubSystem Address Space can populate the 64Bit Memory Chunk ?

If you expect PUT/GET (and perhaps NOTE/POINT and the like) to be sent
to your code in an address space that is not the caller's, then you
have to manage the OPEN through the subsystem call that is directed to
your subsystem when the application program issues that OPEN. You
populate the ACB (or maybe DCB), and then the PUT, GET, etc. addresses
in the xCB point to your code. Since in general the caller of (say)
PUT will be unprivileged, if you want to get privileged code of yours
running, and/or transfer to another address space, you will need a
mechanism such as SVC or PC to get into an appropriate state.

If you want to act like a Job Entry Subsystem (like JES2 and JES3),
then you can piggyback on the existing fairly minimalist OPEN executor
code. The source code for that part of at least JES2 is still
available, and provides a useful model.

Keep in mind that (in general, and not just for subsystems), the code
executed when a program issues a PUT, GET, etc. is just a subroutine
to the application code, and runs with exactly the state and
privileges that the rest of the app does. So for e.g. QSAM on a DASD
or TAPE dataset, when you issue a PUT, the code just adds the line to
a buffer and returns. Only when the buffer is full does the code,
still running as a subroutine in your application's state, build a
channel program and issue an EXCP (SVC 0). In the case of a SYSOUT
dataset handled by JESn, instead of an EXCP when the buffer is full,
the special SVC 111 (HAM = HASP Access Method) is used to get control
over to JESn code.

Once again the best example and documentation for much of this is in
Howard Gilbert's GPSAM in CBT file 648. A lot has changed since 1982
(not the least being OCO), but the concept and almost all the detail
remains sound.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to