Table of Contents

DMSMVE Abstract

Statistics

Type ASSEMBLE
Source Lines : 1,081
Fixes Applied : 2
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [R14621DS]

Synopsis

Module

       DMSMVE (MOVEFILE COMMAND)

Function

       TO TRANSFER DATA BETWEEN  TWO SPECIFIED DDNAMES.  THE
       DDNAMES  MAY  SPECIFY  ANY   DEVICES  OR  DISK  FILES
       SUPPORTED BY THE CMS SYTEM.

Attributes

       REENTRANT, DISK RESIDENT

Operation

       THE INPUT DDNAME IS OPENED WITH PARAMETERS SPECIFIED SO THAT
       A STANDARD OS DCB EXIT ROUTINE IS TAKEN.  (THAT IS, THE OS
       SIMULATION ROUTINES FILL IN THE DCB WITH WHATEVER INFORMATION
       IS AVAILABLE FROM THE FILEDEF, AND THEN PASS CONTROL TO
       AN EXIT ROUTINE IN THE 'MOVE' CODE, TO GIVE IT AN OPPORTUNITY
       TO MAKE ANY ADDITIONS OR CHNGES BEFORE THE OPEN IS COMPLETE.)
       THE EXIT ROUTNE FILLS IN THE RECFM, LRECL AND BLKSIZE FIELDS,
       IF THEY WERE NOT ALREADY FILLED IN BY THE FILEDEF.
       THE LOGIC DEPENDS UPON THE INPUT DEVICE TYPE.  IF A DISK
       FILE, IT IS CHECKED FOR EXISTENCE, AND THE RECFM AND LRECL
       FIELDS OF THE DCB ARE FILLED IN FROM THE FST.  FOR OTHER
       DEVICES, SUITABLE DFAULTS ARE USED IF NOT SPECIFIED IN THE
       FILEDEF FOR THE DDNAME.

       THE OUTPUT DDNAME IS OPENED, AND SIMILAR ACTION IS TAKEN IN
       THE EXIT ROUTINE.

       THE DATA IS TRANSFERRED IN A GET-PUT LOOP, WITH TRUNCATION
       OR PADDING DONE AS NECESSARY.

       IF THE PDS OPTION IS SPECIFIED AND THE INPUT IS  FROM
       DISK, THE FCBMVPDS BIT IS SET AND AN OS FIND MACRO IS
       ISSUED BEFORE AN OUTPUT DCB IS OPENED TO POSITION
       THE INPUT FILE AT THE NEXT MEMBER. THE INPUT MEMBER NAME
       IS THEN STORED IN THE OUPUT CMSCB FOR USE AS THE OUTPUT
       FILENAME. AFTER END OF FILE IS REACHED ON A MEMBER, THE
       MESSAGE DMSMVE225I IS TYPED AND THE
       OUTPUT DCB IS CLOSED AND CONTROL IS PASSED TO DO A FIND
       ON THE NEXT MEMBER. WHEN ALL THE MEMBERS HAVE BEEN
       MOVED TO SEPERATE CMS FILES, MOVEFILE TYPES OUT
       MESSAGE DMSMVE226I, CLOSES THE INPUT AND OUTPUT DCBS
       AND RETURNS CONTROL TO THE CALLER.

       AFTER EOF IS REACHED ON THE INPUT DCB, THE DCB'S ARE CLOSED
       WITH THE 'LEAVE' OPTION (IN CASE THEY ARE TAPES, TO
       PREVENT REWINDING).

Calls to Other Routines

  OS MACROS EXECUTED:

       FIND         SVC 18    POINT TO NEXT MEMBER
       OPEN INPUT   SVC 19    OPEN INPUT DDNAME
       OPEN OUTPUT  SVC 19    OPEN OUTPUT DDNAME
       GET          BALR      READ DATA FROM INPUT DCB
       PUT          BALR      WRITE DATA TO OUTPUT DCB
       CLOSE LEAVE  SVC 20    CLOSE DCB'S (NO REWIND ON TAPE)
       GETMAIN      SVC 10    ALLOCATE STORAGE AREA
       FREEMAIN     SVC 10    FREE STORAGE AREA
       SYNADEF      SVC 68    GET SYNAD ERROR MESSAGE TEXT
       SYNADRLS     SVC 68    RELEASE SYNADEF MESSAGE BUFFER

  CMS FUNCTIONS USED:

       OS SIMULATION (SVC 10, 19, 20, 68, GET AND PUT)

       STATE        SVC 202   TO DETERMINE WHETHER INPUT FILE
                              EXISTS

       STATEW       SVC 202   TO DETERMINE WHETHER OUTPUT FILE
                              EXISTS

       DMSERR       SVC 203   TO TYPE OUT ERROR MESSAGES

       STRINIT      SVC 203   TO INITIALIZE STORAGE FOR
                              GETMAIN

       ADTLKP       BALR      TO DETERMINE WHETHER OUTPUT DISK
                              IS READ/WRITE