Table of Contents

DMSEXC History

References

Update History

CMS File Input : DMSEXC ASSEMBLE
Date : 12/12/1978 8:26:00 AM
VM Context : MAINT(393)
File Name : DMSEXC.ASSEMBLE.Z1.txt
Modified : 1/16/2021 7:31:31 AM
Created : 1/16/2021 7:31:31 AM

Update Order

  1. HRC371DS 1.2 Support execution of REXX programs as filetype EXEC

HRC371DS

Date Friday Jun 04, 2010 10:07:00 AM
Loaded from MAINT(093)
       HRC371DS: ./ I 00041000          $ 41100 100                    06/14/10 11:06:58
       HRC371DS: *        REXX - Execute a REXX procedure                       HRC371DS 00041100
       HRC371DS: ./ I 00051000          $ 51100 100                    06/14/10 11:06:58
       HRC371DS: *        BUFFER -             read first line of EXEC here     HRC371DS 00051100
       HRC371DS: *        FILEID -             fileid of EXEC to read           HRC371DS 00051200
       HRC371DS: ./ I 00060000          $ 60100 100                    06/14/10 11:06:58
       HRC371DS: *        GPR9 = saved R14 while checking for REXX program      HRC371DS 00060100
       HRC371DS: *        GPR10 = saved R0 while checking for REXX program      HRC371DS 00060200
       HRC371DS: *        GPR11 = saved R1 while checking for REXX program      HRC371DS 00060300
       HRC371DS: ./ I 00071000          $ 71100 100                    06/14/10 11:06:58
       HRC371DS: *        0.  Read the first line of the user program, and scan HRC371DS 00071100
       HRC371DS: *            to determine if the first word in the line is     HRC371DS 00071200
       HRC371DS: *            '/*'.  If so, call REXX via SVC 202 to execute    HRC371DS 00071300
       HRC371DS: *            the program, then return to our caller.           HRC371DS 00071400
       HRC371DS: *                                                              HRC371DS 00071500
       HRC371DS: ./ I 00098000          $ 98010 10                     06/14/10 11:06:58
       HRC371DS:          SPACE 1                                               HRC371DS 00098010
       HRC371DS: * The exec program can be written either in REXX or EXEC.  We  HRC371DS 00098020
       HRC371DS: * read the first line of the file, and if the first word in    HRC371DS 00098030
       HRC371DS: * that line begins with '/*', then it is a REXX program, and   HRC371DS 00098040
       HRC371DS: * we invoke DMSREX to execute it.  Otherwise we fall through   HRC371DS 00098050
       HRC371DS: * and let EXEC handle it.                                      HRC371DS 00098060
       HRC371DS:          LR    R9,R14         save return address              HRC371DS 00098070
       HRC371DS:          LR    R10,R0         save eplist pointer              HRC371DS 00098080
       HRC371DS:          LR    R11,R1         save plist pointer               HRC371DS 00098090
       HRC371DS:          DMSFREE DWORDS=66,TYPE=NUCLEUS,TYPCALL=BALR           HRC371DS 00098100
       HRC371DS:          LR    R8,R1          save memory address              HRC371DS 00098110
       HRC371DS:          USING WORK,R8                                         HRC371DS 00098120
       HRC371DS:          LA    R7,256(R8)     map FSCB on top of BUFFER1       HRC371DS 00098130
       HRC371DS:          USING FSCBD,R7                                        HRC371DS 00098140
       HRC371DS:          MVC   FSCBCOMM(8),=C'RDBUF   '                        HRC371DS 00098150
       HRC371DS:          MVC   FSCBFN(8),8(R11) copy exec name                 HRC371DS 00098160
       HRC371DS:          MVC   FSCBFT(10),=C'EXEC    * '                       HRC371DS 00098170
       HRC371DS:          MVC   FSCBITNO(2),=H'1'                               HRC371DS 00098180
       HRC371DS:          ST    R8,FSCBBUFF                                     HRC371DS 00098190
       HRC371DS:          MVC   FSCBSIZE,=F'256' buffer length                  HRC371DS 00098200
       HRC371DS:          MVC   FSCBNOIT(2),=H'1'                               HRC371DS 00098210
       HRC371DS:          LR    R1,R7          address of FSCB                  HRC371DS 00098220
       HRC371DS:          L     R15,ARDBUF                                      HRC371DS 00098230
       HRC371DS:          BALR  R14,R15        read the file's first line       HRC371DS 00098240
       HRC371DS:          BNZ   NOTREXX        let EXEC handle any read error   HRC371DS 00098250
       HRC371DS:          MVC   FSCBCOMM(8),=C'FINIS   '                        HRC371DS 00098260
       HRC371DS:          L     R15,AFINIS     close the file                   HRC371DS 00098270
       HRC371DS:          BALR  R14,R15                                         HRC371DS 00098280
       HRC371DS: * Now scan the line we read, looking for '/*'.                 HRC371DS 00098290
       HRC371DS:          L     R5,FSCBNORD    get bytes read                   HRC371DS 00098300
       HRC371DS:          DROP  R7                                              HRC371DS 00098310
       HRC371DS:          LR    R3,R8          start of line into R3            HRC371DS 00098320
       HRC371DS:          LA    R4,1           increment                        HRC371DS 00098330
       HRC371DS:          AR    R5,R3          end of line into R5              HRC371DS 00098340
       HRC371DS: SCANLOOP DS    0H                                              HRC371DS 00098350
       HRC371DS:          CLI   0(R3),C' '     skip blanks                      HRC371DS 00098360
       HRC371DS:          BNE   CHECK          found non-blank                  HRC371DS 00098370
       HRC371DS:          BXLE  R3,R4,SCANLOOP keep looking                     HRC371DS 00098380
       HRC371DS: CHECK    DS    0H                                              HRC371DS 00098390
       HRC371DS:          CLC   0(2,R3),=C'/*' found REXX comment?              HRC371DS 00098400
       HRC371DS:          BNE   NOTREXX        no, continue with EXEC           HRC371DS 00098410
       HRC371DS: * We have an exec written in REXX.  Build new regular and      HRC371DS 00098420
       HRC371DS: * extended plists with REXX as the command name.               HRC371DS 00098430
       HRC371DS:          MVC   BUFFER1(256),0(R11)     copy original plist     HRC371DS 00098440
       HRC371DS:          MVC   BUFFER1(8),=C'DMSREX  ' overlay EXEC with REXX  HRC371DS 00098450
       HRC371DS:          LA    R1,BUFFER1     recover R1                       HRC371DS 00098460
       HRC371DS:          ST    R11,BUFFER0                                     HRC371DS 00098470
       HRC371DS:          ICM   R1,8,BUFFER0   copy flag byte from original R1  HRC371DS 00098480
       HRC371DS:          MVC   BUFFER0(7),=C'DMSREX '  insert command name     HRC371DS 00098490
       HRC371DS:          L     R3,0(R10)      get start of eplist              HRC371DS 00098500
       HRC371DS:          L     R4,8(R10)      end of old argstring             HRC371DS 00098510
       HRC371DS:          MVC   BUFFER0+7(249),0(R3) copy eplist                HRC371DS 00098520
       HRC371DS:          SR    R4,R3          compute length of old argstring  HRC371DS 00098530
       HRC371DS:          LA    R3,BUFFER0                                      HRC371DS 00098540
       HRC371DS:          ST    R3,EPLIST      store as eplist command          HRC371DS 00098550
       HRC371DS:          LA    R3,7(R3)       start of arguments               HRC371DS 00098560
       HRC371DS:          ST    R3,EPLIST+4    store as eplist argbeg           HRC371DS 00098570
       HRC371DS:          AR    R3,R4          add length of arguments          HRC371DS 00098580
       HRC371DS:          ST    R3,EPLIST+8    store a eplist argend            HRC371DS 00098590
       HRC371DS:          SR    R3,R3                                           HRC371DS 00098600
       HRC371DS:          ST    R3,EPLIST+12                                    HRC371DS 00098610
       HRC371DS:          LA    R0,EPLIST      point R0 at eplist               HRC371DS 00098620
       HRC371DS: * At last we invoke the REXX interpreter.                      HRC371DS 00098630
       HRC371DS:          SVC   202            should we set EXECRUN flag???    HRC371DS 00098640
       HRC371DS:          DC    AL4(*+4)                                        HRC371DS 00098650
       HRC371DS:          LR    R3,R15         save return code from REXX       HRC371DS 00098660
       HRC371DS:          DMSFRET DWORDS=66,LOC=WORK,TYPCALL=BALR               HRC371DS 00098670
       HRC371DS:          LR    R15,R3         recover return code              HRC371DS 00098680
       HRC371DS:          BR    R9             return to our caller             HRC371DS 00098690
       HRC371DS: * Return our memory, restore registers, and let EXEC proceed   HRC371DS 00098700
       HRC371DS: NOTREXX  DS    0H             continue with normal EXEC...     HRC371DS 00098710
       HRC371DS:          DMSFRET DWORDS=66,LOC=WORK,TYPCALL=BALR               HRC371DS 00098720
       HRC371DS:          DROP  R8                                              HRC371DS 00098730
       HRC371DS:          LR    R5,R9          recover R5                       HRC371DS 00098740
       HRC371DS:          LR    R0,R10         recover R0                       HRC371DS 00098750
       HRC371DS:          LR    R1,R11         recover R1                       HRC371DS 00098760
       HRC371DS:          SPACE 1                                               HRC371DS 00098770
       HRC371DS: ./ I 00230000          $ 230100 100                   06/14/10 11:06:58
       HRC371DS:          SPACE 1                                               HRC371DS 00230100
       HRC371DS: WORK     DSECT                                                 HRC371DS 00230200
       HRC371DS: BUFFER0  DS    CL256                                           HRC371DS 00230300
       HRC371DS: BUFFER1  DS    CL256                                           HRC371DS 00230400
       HRC371DS: EPLIST   DS    4A                                              HRC371DS 00230500
       HRC371DS:          FSCBD                                                 HRC371DS 00230600
 BEGIN APPLY >>> ./ I 00041000          $ 41100 100                    06/14/10 11:06:58
   END APPLY >>> ./ I 00041000          $ 41100 100                    06/14/10 11:06:58
 BEGIN APPLY >>> ./ I 00051000          $ 51100 100                    06/14/10 11:06:58
   END APPLY >>> ./ I 00051000          $ 51100 100                    06/14/10 11:06:58
 BEGIN APPLY >>> ./ I 00060000          $ 60100 100                    06/14/10 11:06:58
   END APPLY >>> ./ I 00060000          $ 60100 100                    06/14/10 11:06:58
 BEGIN APPLY >>> ./ I 00071000          $ 71100 100                    06/14/10 11:06:58
   END APPLY >>> ./ I 00071000          $ 71100 100                    06/14/10 11:06:58
 BEGIN APPLY >>> ./ I 00098000          $ 98010 10                     06/14/10 11:06:58
   END APPLY >>> ./ I 00098000          $ 98010 10                     06/14/10 11:06:58
 BEGIN APPLY >>> ./ I 00230000          $ 230100 100                   06/14/10 11:06:58
   END APPLY >>> ./ I 00230000          $ 230100 100                   06/14/10 11:06:58
Update Succeeded
Update Execution Time 23 milliseconds.