Topics

how to find UCBs or define them in a stand-alone "naked" OS context


Mark Waterbury
 

Does anyone have a definitive resource on how to define or locate UCBs when running a stand-alone tool or other OS (other than an IBM SCP that provides its own macro interfaces to find a UCB)?

Thanks in advance.


laddiehanus
 

Since it’s standalone there are none. If you want then you have to build them. Look at Start subchannel in principles of operations for info on starting an io operation 

Laddie

Sent from whatever device I am using.

On Aug 4, 2020, at 12:26 PM, Mark Waterbury <mark.s.waterbury@...> wrote:

Does anyone have a definitive resource on how to define or locate UCBs when running a stand-alone tool or other OS (other than an IBM SCP that provides its own macro interfaces to find a UCB)?

Thanks in advance.


Harold Grovesteen
 

Assuming the environment is the channel subsystem, the only way to
identify how to talk to a subchannel is through subchannel number.
However, you only know the subchannel as a device with its own
number.

The easiest way is to start with 0 (the IPL device by the way) and use
STSCH to retrieve its subchannel information block. Within the SCHIB
is a field called device number. By this number you know whether it is
the device you are wanting to communicate with.

If the device isn't the one you want, then you increment the subchannel
number by one and try again.

You know you are at the end of the configured subchannels when the
condition code from the STSCH is not zero.

When you find the one that you want, use its subchannel number to talk
to it with the START SUBCHANNEL to initiate the I/O. That instruction
will need an Operation Request Block to get the I/O started.

Note subchannel numbers require a 1 in bit position 15. Bits 16-31 of
the four byte number is where the subchannel number is placed. Bits 0-
14 must be zeros. Low-order full word if dealing with 64-bit
registers.

You will need the PoO manual to code all of this. Chapters 13-17 will
be your friend (sort of). Heavy reading. Just a heads up.

Harold Grovesteen

On Tue, 2020-08-04 at 09:27 -0700, Mark Waterbury wrote:
Does anyone have a definitive resource on how to define or locate
UCBs when running a stand-alone tool or other OS (other than an IBM
SCP that provides its own macro interfaces to find a UCB)?

Thanks in advance.


Fish Fish
 

Mark Waterbury wrote:

Does anyone have a definitive resource on how to define
or locate UCBs when running a stand-alone tool or other
OS (other than an IBM SCP that provides its own macro
interfaces to find a UCB)?
As both laddiehanus and Harold Grovesteen have already explained, using STSCH sounds like what you are wanting.

However, since you are asking this question in the SATK forum, if perhaps your question is instead, "How do I do I/O to a device in the SATK standalone environment when there is no operating system available to me?", the answer would be to refer to pages 32-42 of the SATK manual, where it describes in the section "Performing Input/Output Operations" how to use provided SATK macros to accomplish your goal.

Basically, you use the IOCB macro to define your device(s), the IOINIT and ENADEV macros to initialize the system, and then the RAWIO macro to perform the actual I/O. It's pretty simple really.

Hope that helps!

--
"Fish" (David B. Trout)
Software Development Laboratories
http://www.softdevlabs.com
mail: fish@...


Harold Grovesteen
 

Yup that is an alternative. Glad to hear those are still working for
you. :-).

Harold

On Tue, 2020-08-04 at 13:04 -0700, Fish Fish wrote:
Mark Waterbury wrote:

Does anyone have a definitive resource on how to define
or locate UCBs when running a stand-alone tool or other
OS (other than an IBM SCP that provides its own macro
interfaces to find a UCB)?
As both laddiehanus and Harold Grovesteen have already explained,
using STSCH sounds like what you are wanting.

However, since you are asking this question in the SATK forum, if
perhaps your question is instead, "How do I do I/O to a device in the
SATK standalone environment when there is no operating system
available to me?", the answer would be to refer to pages 32-42 of the
SATK manual, where it describes in the section "Performing
Input/Output Operations" how to use provided SATK macros to
accomplish your goal.

Basically, you use the IOCB macro to define your device(s), the
IOINIT and ENADEV macros to initialize the system, and then the RAWIO
macro to perform the actual I/O. It's pretty simple really.

Hope that helps!