Table of Contents

DMSSEB Abstract

Statistics

Type ASSEMBLE
Source Lines : 769
Fixes Applied : 4
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [R13662DS]

Synopsis

Module

       DMSSEB (SOEOB - END OF BLOCK)

Function

       CALLS DEVICE I/O ROUTINES TO DO I/O AND SETUP ECB
       AND IOB RETURN CODES.

Attributes

       REENTRANT, SEGMENT RESIDENT

Operation

       EOBROUTN: IF THE FCB OS BIT IS ON, CONTROL IS PASSED
       TO OSREAD. OTHERWISE, IF NO SPECIAL I/O ROUTINE IS
       SPECIFIED IN FCBPROC, CONTROL PASSES TO EOB2. IF THE
       BATCH BIT IS NOT ON AND AN FCBPROC ROUTINE IS SPECIFIED,
       CONTROL IS PASSED TO THE ADDRESS IN FCBPROC. ON RETURN FROM
       FCBPROC, IF THE I/O WAS DONE, CONTROL IS PASSED TO EOBRETRN.
       IF THE I/O WAS NOT DONE, CONTROL IS PASSED TO EOB2.

       OSREAD: DMSROS IS CALLED TO PERFORM A READ OR WRITE
       AND THEN CONTROL IS PASSED TO EOBRETRN.

       EOB2:  IF I/O  IS TO BE PERFORMED OR IF  THERE WAS NO
       ADDRESS  IN FCBPROC,  FCBDEV  IS  PICKED UP  AND
       CONTROL PASSED  TO THE  APPROPRIATE DEVICE  DEPENDENT
       CODE. IN ALL CASES,  WHEN DEVICE DEPENDENT PROCESSING
       IS  COMPLETED, RETURN  IS VIA  EOBRETRN.

       EOBRETRN:  A COMPLETION CODE OF X'42'(ERROR) OR X'7F'
       (NO ERROR) IS STORED IN THE ECB AND IOBECBCC FIELDS
       ALONG WITH A CMS ERROR CODE; THE RESIDUAL COUNT, IF ANY,
       IS STORED IN IOBCSW+6 AND RETURN IS MADE TO THE CALLER.

       CONSOLE:  IF A READ IS SPECIFIED, DMSCRD IS CALLED TO
       READ A RECORD FROM THE CONSOLE, THE RECORD IS MOVED TO THE
       USERS BUFFER AND CONTROL IS PASSED TO EOBRETRN.  IF WRITE
       IS SPECIFIED, DCBRECFM IS CHECKED FOR THE ASA BIT. IF IT
       IS ON, THE FIRST BYTE OF THE RECORD IS USED AS A CHARIAGE
       CONTROL CHARACTER. DMSCWR IS THEN CALLED TO TYPE THE RECORD
       AND CONTROL IS PASSED TO EOBRETRN.

       DISK:  A CHECK IS MADE TO DETERMINE IF DCBRECFM IS
       VARIABLE AND IF THE FILE MODE IS OTHER THAN 4. IF NOT,
       CONTROL IS PASSED TO CKRDWR. OTHERWISE, VARIABLE
       RECORDS ARE READ INTO OR WRITTEN OUT OF A BUFFER
       ONE AT A TIME BY CALLS TO CKRDWR UNTIL THE BUFFER
       IS ENTIRELY READ OR WRITTEN. CONTROL IS THEN PASSED
       TO EOBRETRN.

       CKRDWR:  DMSBRD OR DMSBWR IS CALLED TO READ OR WRITE
       A RECORD. IF AN ERROR CODE OF 9 IS RETURNED, DMSFNS IS
       CALLED TO CLOSE THE FILE AND DMSBRD OR DMSBWR IS CALLED
       AGAIN.  IF WRITE WAS SPECIFIED, CONTROL IS PASSED
       TO EITHER THE VARIABLE BLOCKING ROUTINE, IF IT WAS THE
       CALLER, OR EOBRETRN. IF READ WAS SPECIFIED AND IF ANY
       ERRORS WERE ENCOUNTERED, CONTROL IS RETURNED TO EITHER
       THE VARIABLE BLOCKING ROUTINE, IF IT WAS THE CALLER,
       OR EOBRETRN. IF READ WAS SPECIFIED AND NO ERRORS WERE
       ENCOUNTERED, A CHECK IS MADE OF THE BUFFER TO SEE IF
       A SHORT BLOCK OR EOF RECORD (X'61FFFF61') WAS READ.
       IF AN EOF RECORD WAS READ, AN ERROR CODE IS SET. IF
       A SHORT BLOCK WAS READ, AN INDICATOR IS SET IN
       DCBFDAD TO INSURE THAT ANOTHER READ TO THIS DATA
       SET WILL CAUSE AN EOF ERROR. CONTROL IS THEN RETURNED
       TO EITHER THE VARIABLE BLOCKING ROUTINE, IF IT WAS THE
       CALLER, OR EOBRETRN.

       READR:  DMSCIO IS CALLED WITH THE ADDRESS
       OF THE IOAREA  IN THE PLIST.
       AFTER THE RECORD IS READ IN, CONTROL IS PASSED TO EOBRETRN.

       PUNCH AND PRINT:  RECORDS ARE WRITTEN OUT OF A BUFFER
       ONE AT A TIME BY CALLS TO DMSCIO OR DMSPIO UNTIL THE BUFFER
       IS EMPTY. CONTROL IS THEN RETURNED TO EOBRETRN. IF PRINT
       IS SPECIFIED AND NO CONTROL CHARACTERS ARE SPECIFIED IN
       DCBRECFM, A BLANK IS ADDED TO THE FRONT OF THE RECORD
       BEFORE CALLING DMSPIO.

       TAPE:  A PLIST IS BUILT FROM INFORMATION IN THE FCB AND
       TAPEIO IS CALLED TO READ OR WRITE A BLOCK OF DATA. CONTROL
       IS THEN PASSED TO EOBRETRN.

Calls to Other Routines

       DMSFNS, GETMAIN, DMSBRD, DMSBWR, DMSROS
       DMSCIO, DMSCRD, DMSCWR, DMSPIO, DMSTIO, AND THE FCBPROC
       ROUTINE IF ONE IS SPECIFIED.