Newsgroups: bit.listserv.cmspip-l
Date:         Sat, 26 Sep 1992 13:17:19 LCL
From:         "John P. Hartmann" <PIPER@VNET.BITNET>
Subject:      SQL.

 RE: SQL.

 The information on how to generate the SQL stuff for ESA 1.1 is in the
 CMS Pipelines User's Guide pp. 243.

 I'm appending an update that loads the TEXT deck dynamically; this
 seems to be compatible with both SQL 2.2 and 3.1.

 Even if you don't want to apply the fix I recommend the pipeline it
 uses for your perusal.  You'll see how to increment a binary number.

     j.                                                john@vnet.ibm.com
+============================================ Beginning of PIPSQL LOADRVS
./ I 00664000          $ 666000 2000                  08/11/92 14:47:00
*  8 Mar 1992  +++ Load ARIRVSTC dynamically.                  LOADRVS  00664100
./ I 00811000          $ 812000 1000                  08/11/92 14:47:00
 WXTRN   ARIRVST              See if this is included          LOADRVS  00812000
./ I 01350000          $ 1355000 5000                 08/11/92 14:47:00
AARIRVSTC DC   A(ARIRVST)     Address of interface program     LOADRVS  01355000
./ I 03025350          $ 3025450 100                  08/11/92 14:47:00
   ZIP   R10                  Flag for no program loaded here  LOADRVS  03025450
./ I 03025550          $ 3025560 10                   08/11/92 14:47:00
   PIPTCMS ,                  On CMS?                          LOADRVS  03025560
   IF    ONE                                                   LOADRVS  03025570
     #LT       R15,AARIRVSTC  Is it linked in?                 LOADRVS  03025580
     IF        ZERO           No: load dynamically             LOADRVS  03025590
       PIPCMD  READSTC,EXIT=NOTZERO Read and generate the              *03025600
                              program                          LOADRVS  03025610
       PIPLOCAT EXIT=NOTZERO  Was it there?                    LOADRVS  03025620
       LR      R2,R1          Move here                        LOADRVS  03025630
       LR      R3,R0          ...                              LOADRVS  03025640
       LR      R0,R3          Get length of module             LOADRVS  03025650
       A       R0,=A(7+8+16)  Overhead and round               LOADRVS  03025660
       LA      R10,1          Set mark for a while             LOADRVS  03025670
     FI        ,                                               LOADRVS  03025680
   FI    ,                                                     LOADRVS  03025690
./ R 03026950          $ 3027040 90                   08/11/92 14:47:00
   XC    0(16,R1),0(R1)       Clear prefix                     LOADRVS  03027040
./ R 03027550 03028150 $ 3027640 90                   08/11/92 14:47:00
   LA    R0,16(,R6)           Point to area to clear           LOADRVS  03027640
   L     R14,=V(&PGMID.SQIDZ) Address size in bytes            LOADRVS  03027730
   L     R14,0(,R14)          Get length of work area          LOADRVS  03027820
   LA    R1,8                 Get slop                         LOADRVS  03027910
   AR    R1,R14                                                LOADRVS  03028000
   N     R1,=F'-8'            Round down                       LOADRVS  03028090
   ZIP   R15                                                   LOADRVS  03028180
./ I 03028350          $ 3028360 10                   08/11/92 14:47:00
   LTR   R10,R10              Was program loaded?              LOADRVS  03028360
   IF    NOTZERO                                               LOADRVS  03028370
     ST        R0,AARIRVSTC   Set address                      LOADRVS  03028380
     ST        R0,8(,R6)      Store here too                   LOADRVS  03028390
     LR        R1,R3          Program length                   LOADRVS  03028400
     MVCL      R0,R2          Move the program                 LOADRVS  03028410
     PIPSEVER  INPUT,EXIT=NOTZERO Now restore input stream     LOADRVS  03028420
   FI    ,                                                     LOADRVS  03028430
 ELSE    ,                                                     LOADRVS  03028440
   #LT   R15,AARIRVSTC        know where it is?                LOADRVS  03028450
   IF    ZERO                                                  LOADRVS  03028460
     L         R0,8(,R6)      Address of program               LOADRVS  03028470
     ST        R0,AARIRVSTC   Set address                      LOADRVS  03028480
   FI    ,                                                     LOADRVS  03028490
./ R 03028750          $ 3028840 90                   08/11/92 14:47:00
 INCR    R6,16                Point to SQLDSECT                LOADRVS  03028840
./ D 03040000                                         08/11/92 14:47:00
./ I 03160000          $ 3162000 2000                 08/11/92 14:47:00
 PIPCOMMT 0                   Commit                           LOADRVS  03162000
 IF      NOTZERO                                               LOADRVS  03164000
   XC    ANCHORUSER,SQLMAPENTRY Turn this off again            LOADRVS  03166000
   PCALL DROP_ANCHOR                                           LOADRVS  03168000
   GOTOEXIT 0                 Get out                          LOADRVS  03170000
 FI      ,                                                     LOADRVS  03172000
 DROP    R8                                                    LOADRVS  03174000
./ I 03321940          $ 3324940 3000                 08/11/92 14:47:00
     FLAGOFF   HAVE_PREPARED  Turn this off                    LOADRVS  03324940
./ R 03559600 03643480 $ 3579590 19990                08/11/92 14:47:00
 LR      R5,R15               Save again                       LOADRVS  03579590
 PCALL   DROP_ANCHOR          See if we should drop the anchor LOADRVS  03599580
 LR      R15,R5                                                LOADRVS  03619570
./ I 03660000          $ 3665000 5000                 08/11/92 14:47:00
                                                     SPACE 1   LOADRVS  03665000
./ I 03675000          $ 3677000 2000                 08/11/92 14:47:00
               COMMIT=-4,                                              *03677000
./ I 03710000          $ 3710300 300                  08/11/92 14:47:00
                                                     EJECT ,   LOADRVS  03710300
***************************************************************LOADRVS  03710600
*                                                              LOADRVS  03710900
* Pipeline to  read ARIRVSTC text  and expand it to  a module. LOADRVS  03711200
* It assumes no RLD and entry at the first instruction.        LOADRVS  03711500
*                                                              LOADRVS  03711800
***************************************************************LOADRVS  03712100
                                                     SPACE 2   LOADRVS  03712400
ARISTC   DC    C'addpipe (name bldstc end \)'                  LOADRVS  03712700
         DC    C'|< arirvstc text'                             LOADRVS  03713000
         DC    C'|find ',X'02',C'TXT'                          LOADRVS  03713300
         DC    C'|xlate 8 00-ff 01-00' Increment               LOADRVS  03713600
         DC    C'|f3: locate 8 /',X'00',C'/' Carry?            LOADRVS  03713900
         DC    C'|xlate 7 00-ff 01-00' Increment               LOADRVS  03714200
         DC    C'|f2: locate 7 /',X'00',C'/' Carry?            LOADRVS  03714500
         DC    C'|xlate 6 00-ff 01-00' Increment               LOADRVS  03714800
         DC    C'|f0: faninany'                                LOADRVS  03715100
         DC    C'|spec / x/1 17.56 c2x next 6.3 c2d next /./ next 12 c2*03715400
               d next l'                                       LOADRVS  03715700
         DC    C'|join *'                                      LOADRVS  03716000
         DC    C'|spec /callpipe literal||spec pad 00/ 1 1-* n /||*:/ n*03716300
               '                                               LOADRVS  03716600
         DC    C'|pipcmd'                                      LOADRVS  03716900
         DC    C'|*.input.0:'                                  LOADRVS  03717200
         DC    C'\f3:|f0:\f2:|f0:'                             LOADRVS  03717500
READSTC  EQU   ARISTC,*-ARISTC                                 LOADRVS  03717800
./ I 03719000          $ 3719070 70                   08/11/92 14:47:00
                                                     SPACE 2   LOADRVS  03719070
DROP_ANCHOR PROC SAVE=NO,DCL=NO                                LOADRVS  03719140
 L       R8,GLOBALPIPE        Get our anchor                   LOADRVS  03719210
 USING   ANCHORBLOK,R8        Here again                       LOADRVS  03719280
 #LT     R14,ANCHORUSER       More users?                      LOADRVS  03719350
 GOTOEXIT COND=NOTZERO        Yes, leave it in                 LOADRVS  03719420
 L       R1,ANCHORCHAIN       Get chain                        LOADRVS  03719490
 L       R0,0(,R1)            Size                             LOADRVS  03719560
 PIPCALL $$$PI                Release                          LOADRVS  03719630
 ZIP     R0                   Clear                            LOADRVS  03719700
 ST      R0,ANCHORCHAIN       Wipe this out                    LOADRVS  03719770
 DROP    R8                                                    LOADRVS  03719840
 PROCEND RC=                                                   LOADRVS  03719910
./ I 08890000          $ 8891000 1000                 08/11/92 14:47:00
 PDATA   ,                                                     LOADRVS  08891000
                                                     SPACE 1   LOADRVS  08892000
 ENTRY   ARIPRDI                                               LOADRVS  08893000
ARIPRDI  DS    0D                                              LOADRVS  08894000
 #PUSEWA SQL,R11                                               LOADRVS  08895000
 L       R15,AARIRVSTC        Get entry                        LOADRVS  08896000
 BR      R15                  Go there                         LOADRVS  08897000
-================================================== End of PIPSQL LOADRVS
* PIPSQL   LOADRVS  H1 F         80        118          3  8/11/92 14:47:00
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU