ibm:vm370-lib:cms:dmssqs.assemble_abs
Table of Contents
DMSSQS Abstract
Statistics
Type ASSEMBLE
Source Lines : 855
Fixes Applied : 7
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [R14923DS]
Synopsis
Module
DMSSQS (SOQSAM - QUEUED SEQUENTIAL ACCESS METHOD)
Function
TO ANALYZE RECORD FORMAT AND SET UP THE BUFFERS ACCORDINGLY FOR GET, PUT AND PUTX REQUESTS.
Attributes
REENTRANT, NUCLEUS RESIDENT
Operation
INITIALIZATION OSIOTYPE AND IOBECBPT ARE SET TO INDICATE ACCESS METHOD AND FCB ADDRESS RESPECTIVELY. THEN, IF THE DUMMY OPTION IS NOT SPECIFIED IN THE FCB, A BRANCH IS TAKEN TO GETTER, PUTTER OR PUTXER DEPENDING ON WHETHER THE REQUEST IS A GET, PUT OR PUTX RESPECTIVELY. IF DUMMY IS SPECIFIED IN THE FCB, CONTROL IS PASSED TO QSAMDUMY. GETTER AFTER FCBIOSW AND IOBIOFLG ARE SET TO INDICATE INPUT IN PROCESS, DCB FIELDS DCBMACF AND DCBRECFM ARE ANALYZED TO DETERMINE THE TYPE OF MODE DESIRED - MOVE OR LOCATE - AND THE RECORD FORMAT. IF THE MODE IS MOVE, THE USER SPECIFIED 'MOVE TO' ADDRESS IS STORED IN DEBTCBAD. BOTH MODES CONTINUE BY DETERMINING WHETHER IT IS CALLED FROM CLOSE (DMSSOP). IF SO, A CHECK IS MADE TO DETERMINE WHETHER THE UPDATE FLAG (IOBUBD) IN THE "IOBIOFLG" IS ON INDICATING A "PUTX" ISSUED ON THE LAST BLOCK. IF THE UPDATE FLAG IS NOT ON, CONTROL IS RETURNED TO CLOSE. IF THE UPDATE FLAG IS ON, CONTROL IS PASSED TO THE ROUTINE "GETXER" TO REWRITE THE LAST BLOCK BEFORE RETURNING TO CLOSE. (SEE "GETXER" BELOW). IF NOT CALLED BY CLOSE, A CHECK IS MADE TO DETERMINE WHETHER AN "END OF BLOCK" CONDITION EXISTS. IF "END OF BLOCK" CONDITION DOES EXIST, A CHECK IS MADE OF THE UPDATE FLAG TO DETERMINE WHETHER A RECORD IN THE JUST COMPLETED BLOCK WAS UPDATED. IF SO, "GETXER" RECEIVES CONTROL TO REWRITE THE LAST BLOCK; (SEE "GETXER" BELOW). ROUTINE "SETEOB" THEN RECEIVES CONTROL TO GET THE NEXT BUFFER FROM THE POOL; (SEE "SETEOB" BELOW). UPON RETURN FROM "SETEOB", THE APPROPRIATE "FCB" FIELDS ARE UPDATED AND A CALL IS MADE TO DMSSEB TO FILL THE NEW BUFFER WITH THE NEXT BLOCK. UPON RETURN, THE "FCBITEM" COUNT IS UPDATED, AND THE "ECB" IS CHECKED FOR AN ERROR. IF ONE EXISTS, CONTROL IS PASSED TO DMSSCT (CHECK SIMULATION). AFTER IT IS DETERMINED THAT THERE IS A RECORD IN THE BUFFER, THE RECORD IS DEBLOCKED FROM THE BUFFER AND, IF THE RECFM IS VARIABLE OR UNDEFINED, DCBLRECL IS SET TO THE LENGTH OF THE RECORD. IF THE MODE IS LOCATE, CONTROL IS RETURNED TO THE USER WITH THE ADDRESS OF THE RECORD. IF THE MODE IS MOVE, THE RECORD IS MOVED TO THE ADDRESS PROVIDED BY THE USER AND CONTROL IS RETURNED TO THE USER. PUTTER RECEIVES CONTROL FROM "PUT" MACRO INSTRUCTION. AFTER "FCBIOSW" AND "IOBIOFLG" ARE SET TO INDICATE OUTPUT IN PROGRESS, A CHECK IS MADE TO DETERMINE WHETHER THIS CALL WAS MADE FROM CLOSE. IF NOT CALLED FROM CLOSE AND THE MODE IS LOCATE, AND THIS IS THE FIRST "PUT" CALL, THE ADDRESS OF THE FIRST BUFFER IS PLACED IN REGISTER 1 AND CONTROL IS RETURNED TO THE USER. IF CALLED FROM CLOSE, A CHECK IS MADE TO SEE IF A PUT IS NECESSARY. IF NOT, CONTROL IS RETURNED TO THE USER. IF A PUT IS NECESSARY, THE POINTERS ARE SETUP TO WRITE A SHORT BLOCK. IF OTHER THAN THE FIRST "PUT" CALL, IT IS DETERMINED WHETHER THE CURRENT BUFFER HAS SUFFICIENT SPACE FOR ANOTHER RECORD. IF IT HAS, REGISTER 1 IS UPDATED TO THE ADDRESS OF THE NEXT RECORD WITHIN THE CURRENT BUFFER AND CONTROL IS RETURNED TO THE CALLER. IF THE CURRENT BUFFER IS FULL, A CALL IS MADE TO DMSSEB TO WRITE THE CURRENT BUFFER TO THE FILE. UPON RETURN FROM DMSSEB THE "ECB" IS CHECKED FOR ERROR INDICATION AND IF ONE EXISTS CONTROL IS PASSED TO DMSSCT (CHECK SIMULATION). IF NO ERROR CONDITION EXISTS THE "FCBITEM" COUNT IS UPDATED TO REFLECT THE LAST BLOCK WRITTEN. ROUTINE "SETEOB" THEN RECEIVES CONTROL TO GET THE NEXT BUFFER FROM THE POOL; (SEE "SETEOB" BELOW). IF LOCATE IS SPECIFIED, CONTROL IS RETURNED TO THE USER. IF MOVE MODE IS SPECIFIED, THE ROUTINE MOVEMODE IS USED TO MOVE THE RECORD INTO THE BUFFER AND CONTROL IS RETURNED TO THE USER. PUTXER RECEIVES CONTROL FROM "PUTX" MACRO INSTRUCTION. SETS THE UPDATE FLAG ("IOBUPD") IN THE "IOBIOFLG" FIELD OF THE IOB TO INDICATE THAT THE CURRENT BLOCK HAS BEEN UPDATED AND THEREFORE WILL BE REWRITTEN AT "END OF BLOCK" TIME. RETURNS CONTROL TO THE USER. GETXER RECEIVES CONTROL FROM ROUTINE "GETTER" AT "CLOSE" TIME OR "END OF BLOCK" TIME WHEN THE UPDATE FLAG (IOBUPD) HAS BEEN SET IN THE "IOBIOFLG" BY A PREVIOUS "PUTX" CALL. THE "FCBIOSW" AND "IOBIOFLG" ARE CHANGED FROM A "GET" CALL TO A "PUT" CALL. THE "FCBITEM" COUNT IS RESET TO THE FIRST RECORD OF THE CURRENT BLOCK. DMSSEB IS CALLED TO REWRITE THE UPDATED BLOCK. UPON RETURN, THE "ECB" IS CHECKED FOR AN ERROR CONDITION. IF ONE EXISTS, A CALL IS MADE TO DMSSCT (CHECK SIMULATION). IF NO ERROR INDICATION, THE "FCBITEM" COUNT IS RESTORED TO THE NEXT BLOCK, THE "FCBIOSW" AND "IOBIOFLG" ARE RESET TO INDICATE THE "GET" CALL AND IF NOT "CLOSE" TIME, CONTROL IS RETURNED TO ROUTINE "GETTER". IF "CLOSE" TIME CONTROL IS RETURNED TO DMSSOP (CLOSE). SETEOB RECEIVES CONTROL FROM ROUTINES "GETTER" OR "PUTTER" AT "END OF BLOCK" TIME. DCB AND IOB ADDRESSES ARE UPDATED TO POINT TO THE NEXT BUFFER IN THE POOL AND CONTROL IS RETURNED TO THE CALLING ROUTINE. MOVEMODE MOVES THE RECORD FROM THE USER BUFFER TO THE SYSTEM BUFFER IN THE CASE OF "PUT" AND FROM THE SYSTEM BUFFER TO THE USER BUFFER IN THE CASE OF "GET". IT THEN RETURNS CONTROL TO THE CALLING ROUTINE. QSAMDUMY QSAMDUMY FIRST CHECKS TO DETERMINE IF A GET OR A PUT WAS ISSUED. IF A GET WAS ISSUED, AN END OF FILE ERROR CODE IS SET AND CONTROL IS PASSED TO DMSSCTCE. IF A PUT WAS ISSUED, CONTROL IS RETURNED TO THE USER WITH THE ADDRESS OF THE NEXT RECORD AREA IN REGISTER ONE.
Calls to Other Routines
DMSSEB, DMSSCT
ibm/vm370-lib/cms/dmssqs.assemble_abs.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator