Type ASSEMBLE
Source Lines : 332
Fixes Applied : 0
Most Recent Version : Thursday, December 14, 1978
Last Fix ID : [Unmodified]
Module
DMKNMT (IMAGELIB)
Function
CONSTRUCT AN IMAGE LIBRARY FROM TEXT FILES ON USER DISKS AND CREATE OR REPLACE THAT IMAGE LIBRARY VIA DIAG CODE X'74' A CONTROL FILE IS USED TO CONSTRUCT THE IMAGE LIBRARY.
Attributes
DISK RESIDENT AS 'IMAGELIB', LOADED INTO CMS USER AREA, CALLED VIA SVC 202, SERIALLY RESUABLE
Operation
1. VERIFY THE EXISTENCE OF THE CNTRL FILE. IF IT DOES NOT EXIST, EXIT WITH RC=4 AND NO MESSAGE. OTHERWISE, CONTINUE. CREATE A DUMMY DIRECTORY ENTRY WHICH WILL BE USED TO HOLD THE NUMBER OF ENTRIES AND SET THE START OF DATA TO BE 3 PAGES PAST THE START OF THE DIRECTORY. THIS ALLOW FOR A MAXIMUM OF 3 PAGES OF DIRECTORY. 2. READ THE NEXT LINE IN THE CNTRL FILE. IF END OF FILE, GO TO STEP 6. OTHERWISE CONTINUE. 3. IF THE TEXT FILE DOES NOT EXIST, EXIT WITH DMKNMT248E. 4. LOAD THE INDICATED TEXT FILE INTO THE TRANSIENT AREA. IF ERROR, EXIT WITH ERROR MESSAGE DMKNMT249E. 5. ALLOWING 3 PAGES FOR THE DIRECTORY AREA, CREATE A NEW DIRECTORY ENTRY AFTER THE LAST, AND MOVE THE FILE FROM THE TRANSIENT AREA INTO THE NEXT AVAILABLE LOCATION IN THE USER AREA. IF IT EXCEEDS AVAILABLE STORAGE, EXIT WITH DMKNMT256E. OTHERWISE, UPDATE THE POINTERS TO THE NEXT AVAILABLE DIRECTORY ENTRY AND NEXT AVAILABLE DATA AREA. THEN GO TO STEP 2. 6. ENTER THE TOTAL NUMBER OF MEMBERS INTO THE FIRST DUMMY ENTRY, MOVE THE DATA AREA SO THAT IT IMMEDIATELY FOLLOWS THE DIRECTORY, AND ALTER THE DISPLACEMENTS IN EACH DIRECTORY ENTRY. 7. ISSUE DIAGNOSE X'74' TO SAVE THE NAMED SYSTEM. IF THE RETURN CODE IS 0, ISSUE DMKNMT247I. OTHERWISE, ISSUE DMKNMT254E. 8. RETURN TO CALLER WITH APPROPRIATE RETURN CODE.
Calls to Other Routines
FSSTATE - SEE IF CNTRL AND TEXT FILES EXIST FSREAD - READ IN THE CNTRL FILE CMS LOAD - LOAD THE TEXT FILE INTO THE TRANSIENT AREA