Table of Contents

DMKIMG Abstract

Statistics

Type ASSEMBLE
Source Lines : 707
Fixes Applied : 0
Most Recent Version : Thursday, December 14, 1978
Last Fix ID : [Unmodified]

Synopsis

Module

       DMKIMG  (GENIMAGE)

Function

       TO PROVIDE A CMS INTERFACE FOR THE VS-BASED IEBIMAGE PROGRAM.
       THIS IS DONE BY HANDLING CERTAIN SVC'S ISSUED BY IEBIMAGE AND
       TRANSLATING THEM INTO CMS TERMS.

Attributes

       DISK RESIDENT, LOADED INTO CMS USER AREA, CALLED VIA SVC 202,
       SERIALLY REUSABLE

Operation

       1.    VALIDATE THE INPUT PARAMETERS AND DETERMINE IF THE
             INPUT CONTROL FILE EXISTS.  IF NOT, EXIT WITH ERROR
             MESSAGE DMSIMG002W AND RETURN CODE 4 IN R15.
             OTHERWISE, CONTINUE.

       2.    ISSUE A GETMAIN FOR A 73000-BYTE AREA FOR SIMULATING
             OS LOAD MACROS.
             ISSUE A FILEDEF COMMAND FOR A DUMMY SYS1.IMAGELIB FILE
             WITH THE AUXPROC OPTION FOR FIELDING ALL READ/WRITE
             OPERATIONS ON THAT DATASET.
             ISSUE ALL OTHER REQUIRED FILEDEFS.

       3.    ISSUE THE HNDSVC MACRO TO HANDLE THE FOLLOWING SVC'S:
              SVC  8 (LOAD)
              SVC 18 (BLDL)
              SVC 21 (STOW)

       4.    CALL IEBIMAGE.  THIS IMPLICITLY LOADS, IN ADDITION TO
             'IEBIMAGE TEXT', 'IEBIMSGS TEXT' AND 'IEBISCAN TEXT'.
             THIS FILES ARE THE SAME AS THOSE SUPPLIED WITH VS AND
             MUST BE AVAILABLE WHEN GENMOD'ING THIS MODULE.

       5.    SAVE THE RETURN CODE FROM IEBIMAGE AND FREEMAIN THE
             PREVIOUSLY GOTTEN STORAGE.  CLEAR ANY FILEDEFS THAT MAY
             HAVE BEEN ISSUED AND RETURN TO THE CALLER WITH
             THE RETURN CODE PASSED BY IEBIMAGE.

       SVC SIMULATION ROUTINES -

        BLDL SVC
             ISSUE FSSTATE FOR TEXT FILE BEING SEARCHED FOR AND
             SET THE APPROPRIATE RETURN CODES IN THE SVC
             SAVE AREA.

        OS LOAD SVC -
             A CMS LOAD IS ISSUED TO GET THE MODULE INTO THE
             AREA JUST AFTER THE CURRENT MODULE LOAD.
             THIS ADDRESS IS THEN PASSED BACK THE ISSUER OF
             THE LOAD SVC IN REGISTER 1.

        READ/WRITE ROUTINE -
             IF THIS IS A WRITE OPERATION, TREAT IT AS A NOP.
             THE ACTUAL WRITE WILL BE DONE AT STOW TIME.
             IF THIS IS A READ, USE CMS LOAD TO GET THE MODULE
             INTO THE LOAD AREA.  THEN MOVE THE DATA INTO THE
             USER-SUPPLIED BUFFER FOR THE READ.

        STOW SVC -
             TAKING AS INPUT THE 'LIBBUF' AREA OF THE IEBIMAGE WORK
             AREA, CREATE A TEXT FILE FROM THAT IMAGE WITH FILENAME
             AS STORED IN THE 'BNAME' FIELD IN THE IEBIMAGE WORK
             AREA AND FILETYPE 'TEXT' AND FILEMODE 'A1'.
             THIS IS DONE BY USING THE 'MODCNT' FIELD IN 'LIBBUF'
             AND CREATING AN 'ESD' CARD, A SERIES OF 'TXT' CARDS
             AND AN 'END' CARD.

Calls to Other Routines

       FSSTATE   - SEE IF CONTROL FILE EXISTS
       HNDSVC    - TRAP CERTAIN SVC'S ISSUED BY IEBIMAGE
       GETMAIN   - GET AREA FOR SIMULATING OS LOAD SVC
       FREEMAIN  - RELEASE OS LOAD AREA
       FILEDEF   - ISSUE FILEDEF'S NEEDED BY IEBIMAGE
       LOAD      - SIMULATE OS LOAD AND QSAM READ
       FSWRITE   - CREATE A NEW TEXT FILE (STOW SIMULATION)