home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / lan / 21ripl.zip / IBMLS.ZIP / RPLUCC20.CMD < prev    next >
OS/2 REXX Batch file  |  1993-05-28  |  25KB  |  637 lines

  1. /*****************************************************************************/
  2. /* RPLUCC20.CMD - REXX program to update a RIPL client CONFIG.20 file to     */
  3. /*                configure the following statements:                        */
  4. /*                 - SWAPPATH statement                                      */
  5. /*                 - Family 1/family 2 BASEDEV statments                     */
  6. /*                 - Video device driver statements                          */
  7. /*                                                                           */
  8. /* Inputs:                                                                   */
  9. /*       driver - Video device driver name(IBMVGA32, IBMXGA32, IBM8514, or   */
  10. /*                '' for none).                                              */
  11. /*       client - RIPL client name.                                          */
  12. /*       Bustype - Hardware bus type (MCA, ISA, EISA, '' for none)           */
  13. /*       swaptarget - Swaptarget (L=Local, S=Server, ''=None)                */
  14. /*       rpldir  - Path to IBMLAN\RPL directory                              */
  15. /*       lantype - Subdirectory name containing lan dependent files          */
  16. /*       version21 - Flag indicating target OS is version 2.1                */
  17. /*       basedevflag - Flag indicating whether XGA.SYS is BASEDEV or DEVICE  */
  18. /*                                                                           */
  19. /*    Copyright: (C) Copyright IBM Corp. 1993                                */
  20. /*                                                                           */
  21. /*    Note 1: All the variables are global to all subroutines.               */
  22. /*                                                                           */
  23. /*    Note 2: All NLS message strings are centrally located in the           */
  24. /*            external rexx procedure, RPLSDMSG.CMD.  RPLSDMSG is            */
  25. /*            called to return the message strings needed by RPLUCC20.       */
  26. /*                                                                           */
  27. /*    Note 3: This procedure must also be compatable with OS/2 1.30.2.       */
  28. /*            For this reason, none of the OS/2 2.0 unique rexx function     */
  29. /*            calls can be used.                                             */
  30. /*                                                                           */
  31. /*    Note 4: This procedure is designed to be called by the procedure       */
  32. /*            RPLSETD.CMD.  It is not designed to be called directly         */
  33. /*            from the command line.                                         */
  34. /*                                                                           */
  35.  
  36.    Parse Arg driver,client,Bustype,swaptarget,rpldir,lantype,version21,basedevflag
  37.  
  38.    /* initialize NLS error and informational message strings */
  39.    Call Initialize_NLS_Messages
  40.  
  41.    ddbootdrv = ''
  42.    dd_data.0 = 0
  43.  
  44.    /* call Update_Config20_Format to see if CONFIG.20 needs to be updated */
  45.    /* to LS 3.0 format */
  46.    Call Update_Config20_Format
  47.    If result <> 0 Then return 2
  48.  
  49.    /* build fully qualified path names for client CONFIG.20 */
  50.    If client = 'DEFALT20' Then Do
  51.       /* DEFALT20 is special case, it must be called for each lantype */
  52.       configname = rpldir'\IBMCOM\'lantype'\CONFIG.20'
  53.       tmpconfigname = rpldir'\IBMCOM\'lantype'\CONFIG.20T'
  54.       bakconfigname = rpldir'\IBMCOM\'lantype'\CONFIG.20B'
  55.    end
  56.    else Do
  57.       configname = rpldir'\MACHINES\'client'\CONFIG.20'
  58.       tmpconfigname = rpldir'\MACHINES\'client'\CONFIG.20T'
  59.       bakconfigname = rpldir'\MACHINES\'client'\CONFIG.20B'
  60.    end
  61.  
  62.    /* delete temp file names  */
  63.    Call Delete_File tmpconfigname
  64.    Call Delete_File bakconfigname
  65.  
  66.    If File_Exist(configname) Then Do
  67.       If swaptarget <> '' Then Do
  68.          /* copy records to first SWAPPATH statement(swap to server) */
  69.          f1p = 0
  70.          do until lines(configname) = 0
  71.             data = linein(configname)
  72.             ucdata = translate(data)
  73.             f1p = pos('SWAPPATH=', ucdata)
  74.             If f1p <> 0 Then Leave
  75.             Call Lineout tmpconfigname, data
  76.          end
  77.          If f1p <> 0 Then Do
  78.             /* check server SWAPPATH statement */
  79.             If swaptarget = 'S' Then Do
  80.                If substr(ucdata, 1, 4) = 'REM ' Then Do
  81.                   newdata = substr(data, f1p)
  82.                   data = newdata
  83.                end
  84.             end
  85.             else If substr(ucdata, 1, 4) <> 'REM ' Then Do
  86.                newdata = 'REM ' || data
  87.                data = newdata
  88.             end
  89.             Call Lineout tmpconfigname, data
  90.  
  91.             /* get next comment line and write it out */
  92.             data = linein(configname)
  93.             Call Lineout tmpconfigname, data
  94.  
  95.             /* get next SWAPPATH line (local swapper) */
  96.             data = linein(configname)
  97.             ucdata = translate(data)
  98.             f1p = pos('SWAPPATH=', ucdata)
  99.             if f1p <> 0 Then Do
  100.                If swaptarget = 'L' Then Do
  101.                   If substr(ucdata, 1, 4) = 'REM ' Then Do
  102.                      /* statement disabled, enable it */
  103.                      newdata = substr(data, f1p)
  104.                      data = newdata
  105.                   end
  106.                end
  107.                else If substr(ucdata, 1, 4) <> 'REM ' Then Do
  108.                   /* statement enabled, disable it */
  109.                   newdata = 'REM ' || data
  110.                   data = newdata
  111.                end
  112.             end
  113.             Call Lineout tmpconfigname, data
  114.          end
  115.       end
  116.  
  117.       If Bustype <> ''  Then Do
  118.          /* check family 1/family 2 BASEDEV statements */
  119.  
  120.          /* copy records to PRINT01.SYS statement */
  121.          f1p = 0
  122.          do until lines(configname) = 0
  123.             data = linein(configname)
  124.             ucdata = translate(data)
  125.             f1p = pos('=PRINT01.SYS', ucdata)
  126.             If f1p <> 0 Then Leave
  127.             Call Lineout tmpconfigname, data
  128.          end
  129.          If f1p <> 0 Then Do
  130.  
  131.             /* process 3 family 1 statements */
  132.             i = 1
  133.             Do While i <= 3
  134.                If Bustype = 'ISA' | Bustype = 'EISA' Then Do
  135.                   If substr(ucdata, 1, 4) = 'REM ' Then Do
  136.                      /* record disabled, enable it */
  137.                      f1p = pos('BASEDEV=', ucdata)
  138.                      newdata = substr(data, f1p)
  139.                      data = newdata
  140.                   end
  141.                end
  142.                else Do
  143.                   /* not ISA/EISA bus, make sure record is disabled */
  144.                   If substr(ucdata, 1, 4) <> 'REM ' Then Do
  145.                      newdata = 'REM ' || data
  146.                      data = newdata
  147.                   end
  148.                end
  149.                Call Lineout tmpconfigname, data
  150.                i = i + 1
  151.                If i <= 3 Then Do
  152.                   /* get next family 1 record */
  153.                   data = linein(configname)
  154.                   ucdata = translate(data)
  155.                end
  156.             end
  157.          end
  158.  
  159.          /* copy records to PRINT02.SYS statement */
  160.          f1p = 0
  161.          do until lines(configname) = 0
  162.             data = linein(configname)
  163.             ucdata = translate(data)
  164.             f1p = pos('=PRINT02.SYS', ucdata)
  165.             If f1p <> 0 Then Leave
  166.             Call Lineout tmpconfigname, data
  167.          end
  168.          If f1p <> 0 Then Do
  169.             /* process 4 family 2 statements */
  170.             i = 1
  171.             Do While i <= 4
  172.                If Bustype = 'MCA' Then Do
  173.                   If substr(ucdata, 1, 4) = 'REM ' Then Do
  174.                      /* record disabled, enable it */
  175.                      f1p = pos('BASEDEV=', ucdata)
  176.                      newdata = substr(data, f1p)
  177.                      data = newdata
  178.                   end
  179.                end
  180.                else Do
  181.                   /* not MCA bus, make sure record is disabled */
  182.                   If substr(ucdata, 1, 4) <> 'REM ' Then Do
  183.                      newdata = 'REM ' || data
  184.                      data = newdata
  185.                   end
  186.                end
  187.                Call Lineout tmpconfigname, data
  188.                i = i + 1
  189.                If i <= 4 Then Do
  190.                   /* get next family 2 record */
  191.                   data = linein(configname)
  192.                   ucdata = translate(data)
  193.                end
  194.             end
  195.          end
  196.       end
  197.  
  198.       If driver <> '' Then Do
  199.          /* copy records to first DEVINFO (XGA) */
  200.          flag = 0
  201.          do until lines(configname) = 0
  202.             data = linein(configname)
  203.             ucdata = translate(data)
  204.             If pos('DEVINFO=', ucdata) <> 0 Then Leave
  205.             xgacomp = pos('ING 6 STATE', ucdata)
  206.             If xgacomp <> 0  Then Do
  207.                /* update XGA comment statement */
  208.                newdata = substr(data, 1, xgacomp+3)||'7'||substr(data, xgacomp+5)
  209.                data = newdata
  210.             end
  211.             else Do
  212.                If version21 = 1 Then Do
  213.                   /* version 2.1 */
  214.                   /* check for AUTOSTART statement */
  215.                   If pos('AUTOSTART=', ucdata) <> 0 Then Do
  216.                      If pos('CONNECTIONS', ucdata) = 0 Then data = data || ',CONNECTIONS'
  217.                   end
  218.                   else Do
  219.                      /* check for SHELL statement */
  220.                      pv = pos('SHELL=', ucdata)
  221.                      If pv <> 0 Then Do
  222.                         pv = pos('/P', ucdata)
  223.                         If pv <> 0 Then data = substr(data, 1, pv-1)
  224.                      end
  225.                   end
  226.                end
  227.                If version21 = 1 | basedevflag = 0 Then Do
  228.                   /* version 2.1 or 2.00.1 */
  229.                   /* check for EPATH statement */
  230.                   pv = pos('EPATH=', ucdata)
  231.                   If pv <> 0 Then Do
  232.                      /* replace with EPMPATH */
  233.                      newdata = substr(data, 1, pv-1) || 'EPMPATH' || substr(data, pv+5)
  234.                      data = newdata
  235.                   end
  236.                end
  237.             end
  238.             Call Lineout tmpconfigname, data
  239.          end
  240.  
  241.          /* process XGA statements */
  242.          xgasysflag = 0
  243.          position = pos(':\OS2\', ucdata)
  244.          bootdrv2 = substr(data, position-1, 1)
  245.          vgap = pos(',BGA,', ucdata)
  246.          If vgap <> 0 Then Do
  247.             newdata = substr(data, 1, vgap) || 'VGA' || substr(data, vgap+4)
  248.             data = newdata
  249.          end
  250.          flag = 0
  251.          Do while flag = 0
  252.             If driver = 'IBMXGA32' Then Do
  253.                If translate(substr(data, 1, 4)) = 'REM ' Then Do
  254.                   data = substr(data, 5)
  255.                   ucdata = translate(data)
  256.                end
  257.                If xgasysflag = 0 Then Do
  258.                   xgasysp = pos('XGA.SYS', ucdata)
  259.                   If xgasysp <> 0 Then Do
  260.                      prevchar = substr(ucdata, xgasysp-1, 1)
  261.                      if prevchar = '=' | prevchar = '\' Then Do
  262.                         /* replace XGA.SYS statement with version appropriate with */
  263.                         /* current value of basedevflag. */
  264.                         If basedevflag = 0 Then newdata = 'DEVICE='bootdrv2':\OS2\XGA.SYS'
  265.                         else newdata = 'BASEDEV=XGA.SYS'
  266.                         data = newdata
  267.                         xgasysflag = 1
  268.                      end
  269.                   end
  270.                end
  271.                if pos('\OS2\MDOS\VVGA.SYS', ucdata) <> 0 Then Do
  272.                   If xgasysflag = 0 Then Do
  273.                      /* insert the XGA.SYS record */
  274.                      If basedevflag = 0 Then newdata = 'DEVICE='bootdrv2':\OS2\XGA.SYS'
  275.                      else newdata = 'BASEDEV=XGA.SYS'
  276.                      Call Lineout tmpconfigname, newdata
  277.                      xgasysflag = 1
  278.                   end
  279.                end
  280.             end
  281.             else Do
  282.                /* make sure records are REMed out */
  283.                if substr(ucdata, 1, 4) <> 'REM ' Then Do
  284.                   newdata = 'REM '||data
  285.                   data = newdata
  286.                end
  287.                xgasysp = pos('XGA.SYS', ucdata)
  288.                If xgasysp <> 0 Then Do
  289.                   prevchar = substr(ucdata, xgasysp-1, 1)
  290.                   if prevchar = '=' | prevchar = '\' Then Do
  291.                      /* replace XGA.SYS statement with version appropriate with */
  292.                      /* current value of basedevflag. */
  293.                      If basedevflag = 0 Then newdata = 'REM DEVICE='bootdrv2':\OS2\XGA.SYS'
  294.                      else newdata = 'REM BASEDEV=XGA.SYS'
  295.                      data = newdata
  296.                      xgasysflag = 1
  297.                   end
  298.                end
  299.                else if pos('\OS2\MDOS\VVGA.SYS', ucdata) <> 0 Then Do
  300.                   If xgasysflag = 0 Then Do
  301.                      /* insert the XGA.SYS record */
  302.                      If basedevflag = 0 Then newdata = 'REM DEVICE='bootdrv2':\OS2\XGA.SYS'
  303.                      else newdata = 'REM BASEDEV=XGA.SYS'
  304.                      Call Lineout tmpconfigname, newdata
  305.                   end
  306.                end
  307.             end
  308.             Call lineout tmpconfigname, data
  309.             if pos('SET VIO_XGA=', ucdata) <> 0 Then flag = 1
  310.             else Do
  311.                data = linein(configname)
  312.                ucdata = translate(data)
  313.             end
  314.          end
  315.  
  316.          /* copy records to next DEVINFO (8514) */
  317.          flag = 0
  318.          do until lines(configname) = 0
  319.             data = linein(configname)
  320.             ucdata = translate(data)
  321.             If pos('DEVINFO=', ucdata) <> 0 Then Leave
  322.             Call Lineout tmpconfigname, data
  323.          end
  324.  
  325.          /* process 8514 statements */
  326.          flag = 0
  327.          Do while flag = 0
  328.             If driver = 'IBM8514' | driver = '8514_32' Then Do
  329.                If translate(substr(data, 1, 4)) = 'REM ' Then Do
  330.                   data = substr(data, 5)
  331.                end
  332.             end
  333.             else Do
  334.                /* make sure records are REMed out */
  335.                if substr(ucdata, 1, 4) <> 'REM ' Then Do
  336.                   newdata = 'REM '||data
  337.                   data = newdata
  338.                end
  339.             end
  340.             Call lineout tmpconfigname, data
  341.             if pos('\V8514A.SYS', ucdata) <> 0 Then flag = 1
  342.             else Do
  343.                data = linein(configname)
  344.                ucdata = translate(data)
  345.             end
  346.          end
  347.  
  348.          /* copy records to the VGA DEVINFO */
  349.          do until lines(configname) = 0
  350.             data = linein(configname)
  351.             ucdata = translate(data)
  352.             If pos('DEVINFO=SCR,VGA', ucdata) <> 0 Then Leave
  353.             Call Lineout tmpconfigname, data
  354.          end
  355.          newdata = ''
  356.  
  357.          /* process VGA statements */
  358.          flag = 0
  359.          Do while flag = 0
  360.             If driver = 'IBMVGA' | driver = 'IBMVGA32' Then Do
  361.                If substr(ucdata, 1, 4) = 'REM ' Then Do
  362.                   data = substr(data, 5)
  363.                end
  364.             end
  365.             else Do
  366.                /* make sure records are REMed out */
  367.                if substr(ucdata, 1, 4) <> 'REM ' Then Do
  368.                   newdata = 'REM '||data
  369.                   data = newdata
  370.                end
  371.             end
  372.             Call lineout tmpconfigname, data
  373.             if pos('\VVGA.SYS', ucdata) <> 0 Then flag = 1
  374.             else Do
  375.                data = linein(configname)
  376.                ucdata = translate(data)
  377.             end
  378.          end
  379.       end
  380.  
  381.       /* copy remaining records */
  382.       ipfkeys = 0
  383.       do until lines(configname) = 0
  384.          data = linein(configname)
  385.          ucdata = translate(data)
  386.          If pos('IPF_KEYS=', ucdata) <> 0 Then ipfkeys = 1
  387.          Call Lineout tmpconfigname, data
  388.       end
  389.  
  390.       If ipfkeys = 0 Then Do
  391.          If basedevflag = 0 | version21 = 1 Then Do
  392.             /* Add 2.00.1 and 2.1 statement */
  393.             Call Lineout tmpconfigname,'SET IPF_KEYS=SBCS'
  394.          end
  395.       end
  396.  
  397.       Call Lineout tmpconfigname   /* close file */
  398.       Call Lineout configname      /* close file */
  399.  
  400.       /* rename original CONFIG.20 */
  401.       '@rename 'configname' CONFIG.20B'
  402.       if rc = 0 Then Do
  403.          /* rename CONFIG.20T to be CONFIG.20 */
  404.          '@rename 'tmpconfigname' CONFIG.20'
  405.          if rc = 0 Then Do
  406.             /* delete orginal CONFIG.20 */
  407.             '@DEL 'bakconfigname
  408.          end
  409.          else Do
  410.             /* rename error, try to restore original */
  411.             '@rename 'bakconfigname' CONFIG.20'
  412.          end
  413.       end
  414.    end
  415.    else return 4   /* file not found */
  416.    return 0
  417.  
  418.  
  419.  
  420. /* subroutine to test for existance of a file */
  421. File_Exist:
  422.    Arg testfilename
  423.    If stream(testfilename, C, 'query exists') <> '' Then rc = 1
  424.    else rc = 0
  425.    return rc
  426.  
  427.  
  428.  
  429. /* subroutine to delete a file */
  430. Delete_File:
  431.    arg delfilename
  432.    If stream(delfilename, C, 'query exists') <> '' Then Do
  433.       '@DEL 'delfilename
  434.    end
  435.    return 0
  436.  
  437.  
  438.  
  439. /* Subroutine Update_Config20_Format */
  440. /* This subroutine checks to see if a CONFIG.20 file is still at the */
  441. /* LAN Server 2.0 level, if it is, it is updated to the new format */
  442. Update_Config20_Format:
  443.  
  444.    /* build fully qualified path names for client CONFIG.20 */
  445.    If client = 'DEFALT20' Then Do
  446.       /* DEFALT20 is special case, it must be called for each lantype */
  447.       configname = rpldir'\IBMCOM\'lantype'\CONFIG.20'
  448.       tmpconfigname = rpldir'\IBMCOM\'lantype'\CONFIG.20T'
  449.       bakconfigname = rpldir'\IBMCOM\'lantype'\CONFIG20.BAK'
  450.    end
  451.    else Do
  452.       configname = rpldir'\MACHINES\'client'\CONFIG.20'
  453.       tmpconfigname = rpldir'\MACHINES\'client'\CONFIG.20T'
  454.       bakconfigname = rpldir'\MACHINES\'client'\CONFIG20.BAK'
  455.    end
  456.    /* delete temp file names */
  457.    Call Delete_File tmpconfigname
  458.    Call Delete_File bakconfigname
  459.  
  460.    /* determine bootdrive id from PROTSHELL statement */
  461.    do until lines(configname) = 0
  462.       data = translate(linein(configname))
  463.       If substr(data, 1, 9) = 'PROTSHELL' Then Do
  464.          ddi = pos(':\', data)
  465.          newbootdrv = substr(data,ddi - 1, 1)
  466.          Leave
  467.       end
  468.    end
  469.    Call Lineout configname     /* close file */
  470.    if newbootdrv = '' Then return 4
  471.  
  472.    /* check to see if file contains references to XGA.SYS and V8514A.SYS, */
  473.    /* if not this is a LS 2.0 format and must be converted to 3.0 format */
  474.    xgasysflag = 0
  475.    v8514aflag = 0
  476.    do until lines(configname) = 0
  477.       data = translate(linein(configname))
  478.       xgasysp = pos('XGA.SYS', data)
  479.       if xgasysp <> 0 then Do
  480.          If xgasysp > 1 Then Do
  481.             prevchar = substr(data, xgasysp-1, 1)
  482.             If prevchar = '=' | prevchar = '\' Then xgasysflag = 1
  483.          end
  484.       end
  485.       else Do
  486.          v8514ap = pos('V8514A.SYS', data)
  487.          if v8514ap <> 0 then Do
  488.             If v8514ap > 1 Then Do
  489.                prevchar = substr(data, v8514ap-1, 1)
  490.                If prevchar = '\' Then v8514aflag = 1
  491.             end
  492.          end
  493.       end
  494.       if xgasysflag & v8514aflag Then Leave
  495.    end
  496.    Call Lineout configname     /* close file */
  497.  
  498.    If (xgasysflag | v8514aflag) = 0 Then Do
  499.       /* file has not been converted, convert it */
  500.       /* check to see if dd_data needs to be initialized */
  501.       If ddbootdrv <> newbootdrv Then Do
  502.          dd_data.0 = 0
  503.          ddbootdrv = newbootdrv
  504.       end
  505.       If dd_data.0 = 0 Then Do
  506.          /* initialize dd_data */
  507.          dd_data.0 = 27
  508.          dd_data.1 = xgacomment
  509.          dd_data.2 = 'REM DEVINFO=SCR,VGA,'ddbootdrv':\OS2\VIOTBL.DCP'
  510.          dd_data.3 = 'REM DEVICE='ddbootdrv':\OS2\XGARING0.SYS'
  511.  
  512.          If basedevflag = 0 Then dd_data.4 = 'REM DEVICE='ddbootdrv':\OS2\XGA.SYS'
  513.          else dd_data.4 = 'REM BASEDEV=XGA.SYS'
  514.  
  515.          dd_data.5 = 'REM DEVICE='ddbootdrv':\OS2\MDOS\VVGA.SYS'
  516.          dd_data.6 = 'REM DEVICE='ddbootdrv':\OS2\MDOS\VXGA.SYS '
  517.          dd_data.7 = 'REM SET VIDEO_DEVICES=VIO_XGA'
  518.          dd_data.8 = 'REM SET VIO_XGA=DEVICE(BVHVGA,BVHXGA)'
  519.          dd_data.9 = ' '
  520.          dd_data.10 = a8514comment
  521.          dd_data.11 = 'REM DEVINFO=SCR,BGA,'ddbootdrv':\OS2\VIOTBL.DCP'
  522.          dd_data.12 = 'REM SET VIDEO_DEVICES=VIO_8514A'
  523.          dd_data.13 = 'REM SET VIO_8514A=DEVICE(BVHVGA,BVH8514A)'
  524.          dd_data.14 = 'REM DEVICE='ddbootdrv':\OS2\MDOS\VVGA.SYS'
  525.          dd_data.15 = 'REM DEVICE='ddbootdrv':\OS2\MDOS\V8514A.SYS'
  526.          dd_data.16 = ' '
  527.          dd_data.17 = egacomment
  528.          dd_data.18 = 'REM DEVINFO=SCR,EGA,'ddbootdrv':\OS2\VIOTBL.DCP'
  529.          dd_data.19 = 'REM SET VIDEO_DEVICES=VIO_EGA'
  530.          dd_data.20 = 'REM SET VIO_EGA=DEVICE(BVHEGA)'
  531.          dd_data.21 = 'REM DEVICE='ddbootdrv':\OS2\MDOS\VEGA.SYS'
  532.          dd_data.22 = ' '
  533.          dd_data.23 = vgacomment
  534.          dd_data.24 = 'DEVINFO=SCR,VGA,'ddbootdrv':\OS2\VIOTBL.DCP'
  535.          dd_data.25 = 'SET VIDEO_DEVICES=VIO_VGA'
  536.          dd_data.26 = 'SET VIO_VGA=DEVICE(BVHVGA)'
  537.          dd_data.27 = 'DEVICE='ddbootdrv':\OS2\MDOS\VVGA.SYS'
  538.       end
  539.  
  540.       If File_Exist(configname) = 1 Then Do
  541.          /* copy records until the DEVINFO=SCR,.. statement */
  542.          do until lines(configname) = 0
  543.             data = translate(linein(configname))
  544.             If substr(data, 1, 12) = 'DEVINFO=SCR,' Then Leave
  545.             Call Lineout tmpconfigname,data
  546.          end
  547.  
  548.          Call Lineout tmpconfigname, ' '   /* blank line */
  549.  
  550.          /* write new device driver statements to file */
  551.          do ddi= 1 to dd_data.0
  552.            Call lineout tmpconfigname, dd_data.ddi
  553.          end
  554.  
  555.          Call Lineout tmpconfigname, ' '   /* blank line */
  556.  
  557.          /* skip display records until POINTDD.SYS statement */
  558.          do until lines(configname) = 0
  559.             data = translate(linein(configname))
  560.             skip = 0
  561.             ddp1 = pos('XGARING0.SYS', data)
  562.             If ddp1 <> 0 Then skip = 1
  563.             else Do
  564.                ddp1 = pos('VXGA.SYS', data)
  565.                if ddp1 <> 0 Then skip = 1
  566.                else Do
  567.                   ddp1 = pos('VIO_XGA', data)
  568.                   if ddp1 <> 0 Then skip = 1
  569.                   else Do
  570.                      ddp1 = pos('VIO_VGA', data)
  571.                      if ddp1 <> 0 Then skip = 1
  572.                      else Do
  573.                         ddp1 = pos('VVGA.SYS', data)
  574.                         if ddp1 <> 0 Then skip = 1
  575.                         else Do
  576.                            ddp1 = pos('VGA DISPLAYS:', data)
  577.                            if ddp1 <> 0 Then skip = 1
  578.                            else Do
  579.                               ddp1 = pos('XGA DISPLAYS:', data)
  580.                               if ddp1 <> 0 Then skip = 1
  581.                            end
  582.                         end
  583.                      end
  584.                   end
  585.                end
  586.             end
  587.             If substr(data, 15, 11) = 'POINTDD.SYS' Then Leave
  588.             If skip = 0 Then Do
  589.               If data <> '' Then Call Lineout tmpconfigname, data
  590.             end
  591.          end
  592.  
  593.          Call Lineout tmpconfigname, data  /* write pointdd.sys */
  594.  
  595.          /* copy remaining records */
  596.          do until lines(configname) = 0
  597.             data = linein(configname)
  598.             Call Lineout tmpconfigname, data
  599.          end
  600.  
  601.          Call Lineout configname
  602.          Call Lineout tmpconfigname
  603.  
  604.          /* rename original CONFIG.20 */
  605.          '@rename 'configname' CONFIG20.BAK'
  606.          if rc = 0 Then Do
  607.             /* rename CONFIG.20T to be CONFIG.20 */
  608.             '@rename 'tmpconfigname' CONFIG.20'
  609.             if rc <> 0 Then Do
  610.                /* rename error, try to restore original */
  611.                '@rename 'bakconfigname' CONFIG.20'
  612.                return 4
  613.             end
  614.          end
  615.          else return 4
  616.       end
  617.    end
  618.    return 0
  619.  
  620.  
  621.  
  622. Initialize_NLS_Messages:
  623.    /* call RPLNLMSG to stack all RPLUCC20 NLS messages in queue in FIFO order */
  624.    Call RPLSDMSG.CMD 2
  625.  
  626.    /* extract messages from queue and assign to appropriate message string */
  627.    Parse Pull xgacomment
  628.    Parse Pull a8514comment
  629.    Parse Pull egacomment
  630.    Parse Pull vgacomment
  631.  
  632.    /* make sure nothing else is left in queue */
  633.    do while queued()
  634.       Pull dummy
  635.    end
  636.    return 0
  637.