"IBM Mainframe Assembler List" <[email protected]> wrote on
09/19/2023 04:41:14 AM:
> I implemented local 3270 support for Altergo Software's
> transaction processing system Shadow II on OS/VS in the 1970s
> using similar tricks, but I think it also used a start-I/O
> appendage.
>
> To keep track of attention, it marked the UCB as still busy on
> completion of any request, and queued a NOP to wait if a read
> was issued.  When Attention came in, the I/O supervisor marked
> the UCB as available and executed any queued request.
>
> The trickiest bit was cancelling the wait for attention if
> another Write was issued.  I don't remember the details (this
> was nearly 50 years ago) but I think it involved marking the
> next request as related so that the start-I/O appendage would
> run immediately rather than waiting for the previous request,
> then clearing the UCB busy bit from the start-I/O appendage.
> I think we also marked the queued request so it would be
> cancelled (and marked as purged) rather than executed.


        Yes, that is basically what I am doing.  Before the WRITE, if a READ
is already queued, then I remove it from the queue.

LA    R1,MYCCB                SET ADDRESS OF CCB
IF    CCBQUEUE,(ON,TF),$NOOP  IF ALREADY QUEUED FOR READ
 SVC  25                       DEQUE CHANNEL QUEUE (HIO)
 CF   CCBQUEUE                 CLEAR THE FLAG
ENDIF                         ENDIF
EXCP  (1)                     START THE I/O OPERATION
WAIT  (1)                     WAIT FOR I/O COMPLETION
IF    MYCCB+4(2),(NE,CLC),=X'0C00' IF NOT CE+DE, ERROR
 LA   R5,16                    SET RC VALUE
 XR   R15,R15                  CLEAR REGISTER
 IC   R15,MYCCB+4              SET RESULT VALUE
 B    RETERR                   GO RETURN ERROR
ENDIF                         ENDIF


        At READ time, I queue up a NOOP first.

IF    OPT,(NE,CLC),=C'READQ'  IF NOT QUERY
 IF   CCBQUEUE,(NOT,TF),$NOOP  THEN NEED I/O QUEUEING
  MVC MYCCW+0(1),LCLNOOP        USE NOOP FOR CHANNEL QUEUE
  MVC MYCCW+6(2),=H'1'          WITH I/O LENGTH OF 1
  EXCP (1)                      PUT IN CHANNEL QUEUE
  SF  CCBQUEUE                  SET QUEUED FLAG
 ENDIF                         ENDIF
 WAIT (1)                      WAIT FOR ATTN INTERRUPT
 CF   CCBQUEUE                 CLEAR QUEUED FLAG
ENDIF                         ENDIF


        Then, in the channel appendage routine, I do the following.

IF    X'44'(2),(EQ,CLC),=X'0C00'  IF CE+DE
 IF   8(R1),EQ,X'03'      IF CCW STILL NOOP
  MVC X'44'(2),=X'0080'    CHANGE TO PCI, STAY QUEUED
 ENDIF
ELSE
 IF   X'44',(ON,TM),X'80' IF INTERRUPT WAS ATTN
  MVC X'44'(2),=X'0C00'    CHANGE TO CE+DE, DEQUE
 ENDIF
ENDIF
B     4(R7)               RETURN TO SUPERVISOR


        When WAIT for attention interrupt is satisfied, I continue the READ
as follows.

IF    OPT,(EQ,CLC),=C'READB'
 MVC  MYCCW+0(1),LCLREADB     PUT COMMAND CODE IN CCW
ELSE
 MVC  MYCCW+0(1),LCLREADM     PUT COMMAND CODE IN CCW
ENDIF
L     R0,BUFLEN                PUT MAX LENGTH OF BUFFER
STH   R0,MYCCW+6                IN CHANNEL COMMAND WORD
EXCP  (1)                      START THE I/O OPERATION
WAIT  (1)                      WAIT FOR I/O COMPLETION
IF    MYCCB+4(2),(NE,CLC),=X'0C00' IF NOT CE+DE, ERROR
 LA   R5,16                     SET RC VALUE
 XR   R15,R15                   CLEAR REGISTER
 IC   R15,MYCCB+4               SET RESULT VALUE
 B    RETERR                    GO RETURN ERROR
ENDIF                          ENDIF


        I haven't tested this, yet, though.  Does that all look correct?


Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331




*********************************************************************************************
This email message and any attachments is for use only by the named 
addressee(s) and may contain confidential, privileged and/or proprietary 
information.  If you have received this message in error, please immediately 
notify the sender and delete and destroy the message and all copies.  All 
unauthorized direct or indirect use or disclosure of this message is strictly 
prohibited.  No right to confidentiality or privilege is waived or lost by any 
error in transmission. 
*********************************************************************************************

Reply via email to