home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / nstomr2.zip / nsa2mr2.cmd < prev    next >
OS/2 REXX Batch file  |  1997-02-18  |  22KB  |  647 lines

  1. /* Netscape Navigator for OS/2 address book conversion to MR2ICE utility
  2.    Freeware by Art Heimsoth <heimsoth@doglover.com>
  3.    Copyright (c) Art Heimsoth 1997 - all rights reserved                   */
  4.  
  5. /* REXX command file to convert a Netscape Navigator for OS/2 address book
  6.    to address and group entries in the MR/2 ICE address book format.
  7.    It is assumed that NETSCAPE.EXE can be found either in the current
  8.    directory, or in the PATH.  The location of NETSCAPE.EXE is also
  9.    assumed to be the location of the address.htm file containing the
  10.    addressbook for Netscape Navigator.  It is further assumed that MR2i.EXE
  11.    can also be found in either the current directory or in the PATH.  The
  12.    location of MR2i is used to find the MR/2 ICE address and group files.
  13.  
  14.    The above means that this command can be executed from the Navigator/2
  15.    directory, in which case the MR2i must be found via the PATH statement,
  16.    or if executed from the MR2i directory, then NETSCAPE must be found
  17.    via tha PATH statement.
  18.  
  19.    If neither is the case, then both directories can be temporarily added
  20.    to the current path using the form:
  21.       set path=%path%;[drive]:\netscape;[drive]:\mr2i;
  22.    substituting the string "[drive]:\netscape;" or the string "[drive]:\mr2i;"
  23.    with the drive and directory location for the respective program.
  24.  
  25.    Any existing address entries will be kept in the current MR2i address book,
  26.    but if an entry matches an entry from the Netscape address book, it can
  27.    optionally be updated from the Netscape address information.  Only the
  28.    email address part is checked to determine this condition.  If the update
  29.    option is not selected, the matching entry from the Netscape address book
  30.    will be skipped.
  31.  
  32.    An optional parameter of test can be passed to indicate to run only in
  33.    test mode, in which case the real MR2i address and group file will not
  34.    be altered, but what would have been the new files will be named
  35.    mr2inew.adr and mr2inew.grp instead.  If either of these files already
  36.    exist, they will be replaced.
  37.  
  38.    The form of the email name may optionally be selected by the parameter
  39.    shown below.  The default is jb123@windy.com if no is parameter provided.
  40.       "Joe Blow" <jb123@windy.com  .. parameter = addr1
  41.       Joe Blow <jb123@windy.com    .. parameter = addr2
  42.       jb123@windy.com (Joe Blow)   .. parameter = addr3
  43.    (above complements of Julian Thomas as found in his ADRSTUFF.ZIP package)
  44.  
  45.    All data from the name, email name, alias, distribution list, and comment
  46.    fields will be moved without change (other than the form of the email name)
  47.    to the address and group files for MR2i.                                */
  48.  
  49. version = '1.0'
  50. if (rxfuncquery('rexxutil') = 1) then do
  51.   Say 'Loading the Rexx Utilities package'
  52.   call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  53.   call SysLoadFuncs
  54.   end
  55.  
  56. signal on error name synerr
  57. signal on syntax name synerr
  58. signal on failure name synerr
  59. signal on novalue name synerr
  60. parse source . . ourname .              /* find out our name to use later   */
  61. ourname = FileSpec('Name',ourname)
  62. parse var ourname ourname '.' x
  63.  
  64. /* program variables                                                        */
  65. nets = ''
  66. mr2i = ''
  67. mr2b = ''
  68. flagsw = ''                             /* flag setting from prototype      */
  69. nameform = 0                            /* email address form to use        */
  70. netbook = 'address.htm'                 /* Netscape Navigator address book  */
  71. mr2book = 'mr2i.adr'                    /* MR/2 ICE address book            */
  72. mr2grp  = 'mr2i.grp'                    /* MR/2 ICE Group book              */
  73. mr2newb = 'mr2inew.adr'                 /* test mode address book created   */
  74. mr2newg = 'mr2inew.grp'                 /* test mode group book created     */
  75. name. = ''                              /* array for full name              */
  76. email.= ''                              /* email name array                 */
  77. flag. = ''                              /* popup flag array                 */
  78. alias.= ''                              /* alias array                      */
  79. cmt.  = ''                              /* comment array                    */
  80. grp.  = ''                              /* group indicator                  */
  81. name.0= 0
  82.  
  83. parse arg a1
  84. if wordpos('?',a1) > 0 then signal tell
  85. if wordpos('TEST',translate(a1)) > 0 then
  86.   testmode = 'x'
  87. else
  88.   testmode = ''
  89. if wordpos('UPDATE',translate(a1)) > 0 then
  90.   update = 'x'
  91. else
  92.   update = ''
  93. if wordpos('DEBUG',translate(a1)) > 0 then
  94.   debug = 'x'
  95. else
  96.   debug = ''
  97. if debug <> '' then
  98.   testmode = 'x'
  99.  
  100. db = 'debug.dat'
  101. if debug <> '' then
  102.   if stream(db,'c','query exists') <> '' then
  103.     call SysFileDelete db
  104.  
  105. /* testmode <> '' means do not destroy existing address or group files
  106.    update   <> '' means to update matching entries found with Netscape data */
  107.  
  108. Say 'Convert Netscape for OS/2 addresses to MR/2 ICE format - version' version
  109. Say '  Copyright (c) Art Heimsoth - 1997 - all rights reserved.'
  110. if update <> '' then
  111.   Say 'Will update any matching names found in the MR/2 ICE address book.'
  112. if testmode <> '' then
  113.   Say 'Will run in test mode, i.e., will not alter the existing MR/2 ICE files.'
  114. call dbout 'Parameters:' a1
  115.  
  116. call getbookdir                         /* locate address book directories  */
  117. call loadnetscape                       /* get the netscape address info    */
  118. call loadmr2i                           /* get the existing MR2i addr info  */
  119. call prototype                          /* get address form if provided     */
  120. call setoutput                          /* handle test mode for output files*/
  121. call dooutput                           /* finally build the new files      */
  122. if debug <> '' then do
  123.   nsize = 1
  124.   esize = 1
  125.   csize = 1
  126.   asize = 1
  127.   do i=1 to name.0
  128.     nsize = max(nsize,length(name.i))
  129.     esize = max(esize,length(email.i))
  130.     csize = max(csize,length(cmt.i))
  131.     asize = max(asize,length(alias.i))
  132.     end
  133.   do i=1 to name.0
  134.     outline = left(name.i,nsize,' ') left(email.i,esize,' ') left(alias.i,asize,' ') ,
  135.               flag.i grp.i
  136.     call lineout db,outline
  137.     outline = cmt.i
  138.     call lineout db,outline
  139.     end
  140.   call lineout db
  141.   end
  142.  
  143. Say ''
  144. Say 'Conversion complete.'
  145.  
  146. exit
  147.  
  148. dbout:
  149.  
  150.   /* output the passed string if debug is active                          */
  151.  
  152.   if debug = '' then
  153.     return
  154.   parse arg dataline
  155.   call lineout db,dataline
  156.   return
  157.  
  158. dooutput:
  159.  
  160.   /* build the content of the arrays into the new files - for the address
  161.      book and for the address groups (if any).                             */
  162.  
  163.   if stream(mr2i,'c','query exists') <> '' then
  164.     call SysFileDelete mr2i
  165.   if stream(mr2b,'c','query exists') <> '' then
  166.     call SysFileDelete mr2b
  167.   call stream mr2i,'c','open write'
  168.   do i=1 to name.0
  169.     if email.i = '' then
  170.       iterate
  171.     if grp.i <> '' then
  172.       iterate
  173.     parse var email.i . '@' dummychk .
  174.     if translate(dummychk) = 'DOMAIN.USE' then
  175.       iterate
  176.     lineoutp = name.i || '\' || email.i || '\' || flag.i || '\' || alias.i
  177.     call lineout mr2i,lineoutp
  178.     if length(cmt.i) > 0 then do
  179.       lineoutp = '' || length(cmt.i)
  180.       call lineout mr2i,lineoutp
  181.       call lineout mr2i,cmt.i
  182.       call lineout mr2i,''
  183.       end
  184.     end
  185.   call stream mr2i,'c','close'
  186.  
  187.   /* now build the address group file (if needed)                          */
  188.  
  189.   ingrp = ''
  190.   higrp = 0
  191.   do i=1 to name.0
  192.     if grp.i <> '' & grp.i > 0 then do
  193.       ingrp = 'x'
  194.       higrp = max(higrp,grp.i)
  195.       end
  196.     end
  197.   if ingrp = '' then
  198.     return
  199.   call stream mr2b,'c','open write'
  200.   do ingrp = 1 to higrp
  201.     call dogroup
  202.     end
  203.   call stream mr2b,'c','close'
  204.   return
  205.  
  206. dogroup:
  207.  
  208.   /* handle a single address group                                         */
  209.  
  210.   grouplist = ''
  211.   do i=1 to name.0
  212.     if grp.i = ingrp then do
  213.       if grouplist = '' then do
  214.         lineoutp = '!' || alias.i || '\' || name.i || '\' || flag.i
  215.         call lineout mr2b,lineoutp
  216.         if length(cmt.i) > 1 then do
  217.           lineoutp = '#' || length(cmt.i)
  218.           call lineout mr2b,lineoutp
  219.           call lineout mr2b,cmt.i
  220.           call lineout mr2b,''
  221.           end
  222.         grouplist = '+'
  223.         end
  224.       else do
  225.         do k=1 to name.0
  226.           if translate(name.k) = translate(name.i) & grp.k <> ingrp then do
  227.             grouplist = grouplist || alias.k
  228.             call lineout mr2b,grouplist
  229.             grouplist = '+'
  230.             k=name.0
  231.             end
  232.           end
  233.         end
  234.       end
  235.     end
  236.   return
  237.  
  238. setoutput:
  239.  
  240.   /* set the mr2i and mr2b names for the output files.  If not in test
  241.      mode, first save the existing address book and group files in a
  242.      backup file.                                                           */
  243.  
  244.   mr2path = FileSpec('Drive',mr2i) || FileSpec('Path',mr2i)
  245.   if testmode <> '' then do
  246.     mr2i = mr2path || mr2newb
  247.     mr2b = mr2path || mr2newg
  248.     Say 'New files created in:'
  249.     Say '  Address Book ==>' mr2i
  250.     Say '  Address Group =>' mr2b
  251.     end
  252.   else do
  253.     if stream(mr2i,'c','query exists') <> '' then do
  254.       if stream(mr2path || 'mr2iadr.bak','c','query exists') <> '' then
  255.         call SysFileDelete mr2path || 'mr2iadr.bak'
  256.       '@rename' mr2i 'mr2iadr.bak'
  257.       Say mr2i 'saved as' mr2path || 'mr2iadr.bak'
  258.       end
  259.     if stream(mr2b,'c','query exists') <> '' then do
  260.       if stream(mr2path || 'mr2igrp.bak','c','query exists') <> '' then
  261.         call SysFileDelete mr2path || 'mr2igrp.bak'
  262.       '@rename' mr2b 'mr2igrp.bak'
  263.       Say mr2b 'saved as' mr2path || 'mr2igrp.bak'
  264.       end
  265.     end
  266.   return
  267.  
  268. prototype:
  269.  
  270.   /* get the prototype form for the address (if any found) to allow the     */
  271.   /* flag and email address form to be built to match the prototype.        */
  272.   /* only the following forms of the email address will be supported:
  273.       "Joe Blow" <jb123@windy.com   (addr1)
  274.       Joe Blow <jb123@windy.com     (addr2)
  275.       jb123@windy.com (Joe Blow)    (addr3)
  276.     If one of the above forms are not found, then the email name will
  277.     default to not include any real name.  The popup flag will default to Y */
  278.  
  279.   if wordpos('ADDR1',translate(a1)) > 0 then
  280.     nameform = 1
  281.   else if wordpos('ADDR2',translate(a1)) > 0 then
  282.     nameform = 2
  283.   else if wordpos('ADDR3',translate(a1)) > 0 then
  284.     nameform = 3
  285.   if flagsw = '' then
  286.     flagsw = 'Y'
  287.  
  288.   /* now set the flag for all entries that came from Netscape (the ones
  289.      that currently do not have the flag set either way..                  */
  290.   do i=1 to name.0
  291.     if flag.i = '' then
  292.       flag.i = flagsw
  293.     end
  294.  
  295.   /* now set the email address up for all those that currently are not
  296.      set in one of the above forms - unless a prototype was not found,
  297.      in which case the emails will be left alone...                        */
  298.   do i=1 to name.0
  299.     if verify('"<(',email.i,'Match') > 0 then
  300.       iterate
  301.     if nameform = 0 then
  302.       iterate
  303.     if email.i = '' then
  304.       iterate
  305.     if nameform = 1 then
  306.       email.i = '"' || name.i || '" <' || email.i
  307.     else if nameform = 2 then
  308.       email.i = name.i '<' || email.i
  309.     else if nameform = 3 then
  310.       email.i = email.i '(' || name.i || ')'
  311.     end
  312.   return
  313.  
  314. loadmr2i:
  315.  
  316.   /* load the stem variables with the existing content from the MR2i addr bk*/
  317.  
  318.   xx = stream(mr2i,'c','open read')
  319.   xx = stream(mr2i,'state')
  320.   call dbout 'Input from:' mr2i
  321.   do while(xx = 'READY')
  322.     lineinp = linein(mr2i)
  323.     call dbout lineinp
  324.     lineinp = strip(lineinp)
  325.     xx = stream(mr2i,'state')
  326.     if xx <> 'READY' then leave
  327.     if lineinp = '' then iterate
  328.     i = name.0 +1
  329.     parse var lineinp name.i '\' email.i '\' flag.i '\' alias.i
  330.     name.i = strip(name.i)
  331.     email.i = strip(email.i)
  332.     flag.i = strip(flag.i)
  333.     alias.i = strip(alias.i)
  334.     call dbout 'Item' i 'set for' name.i 'alias:' alias.i
  335.     lineinp = linein(mr2i)
  336.     call dbout lineinp
  337.     if stream(mr2i,'state') <> 'READY' then
  338.       leave
  339.     if left(lineinp,1) = '' then do
  340.       cmt.i = linein(mr2i)
  341.       call dbout cmt.i
  342.       cmt.i = strip(cmt.i)
  343.       xx = stream(mr2i,'state')
  344.       end
  345.     else do
  346.       call stream mr2i,'c','seek -' (length(lineinp)+4)
  347.       cmt.i = linein(mr2i)
  348.       call dbout 'backspaced and re-read:' cmt.i
  349.       cmt.i = ''
  350.       end
  351.     if pos('<',email.i) > 0 then
  352.       parse var email.i . '<' temail .
  353.     else
  354.       parse var email.i temail .
  355.     do k=1 to name.0
  356.       if temail = email.k then do
  357.         if update <> '' then do
  358.           call dbout 'Item' i 'reset - found at' k
  359.           end
  360.         else do
  361.           call dbout 'Item' k 'replaced with item' i
  362.           name.k = name.i
  363.           email.k = email.i
  364.           flag.k = flag.i
  365.           alias.k = alias.i
  366.           grp.k = grp.i
  367.           cmt.k = cmt.i
  368.           end
  369.         i = i-1
  370.         k = i
  371.         end
  372.       end
  373.     name.0 = i
  374.     end
  375.   call stream mr2i,'c','close'
  376.   call dbout 'File closed:' mr2i
  377.  
  378.   if mr2b = '' then
  379.     return
  380.   if stream(mr2b,'c','query exists') = '' then
  381.     return
  382.  
  383.   xx = stream(mr2b,'c','open read')
  384.   xx = stream(mr2b,'state')
  385.   call dbout 'Input from:' mr2b
  386.   higrp = ingrp
  387.   do while(xx = 'READY')
  388.     lineinp = linein(mr2b)
  389.     call dbout lineinp
  390.     lineinp = strip(lineinp)
  391.     xx = stream(mr2b,'state')
  392.     if xx <> 'READY' then leave
  393.     if lineinp = '' then iterate
  394.     if left(lineinp,1) = '!' then do
  395.       i = name.0+1
  396.       parse var lineinp . '!' alias.i '\' name.i '\' flag.i
  397.       alias.i = strip(alias.i)
  398.       name.i = strip(name.i)
  399.       flag.i = strip(flag.i)
  400.       email.i = ''
  401.       call dbout 'Entry' i 'setup for group name' name.i 'alias:' alias.i
  402.       lineinp = linein(mr2b)
  403.       call dbout lineinp
  404.       if stream(mr2b,'state') <> 'READY' then
  405.         leave
  406.       if left(lineinp,1) = '#' then do
  407.         cmt.i = linein(mr2b)
  408.         call dbout cmt.i
  409.         cmt.i = strip(cmt.i)
  410.         xx = stream(mr2b,'state')
  411.         end
  412.       else do
  413.         call stream mr2b,'c','seek -' (length(lineinp)+4)
  414.         cmt.i = linein(mr2b)
  415.         call dbout 'Backspaced and re-read:' cmt.i
  416.         cmt.i = ''
  417.         end
  418.       temail = 'x'
  419.       do k=1 to name.0
  420.         if alias.i = alias.k & grp.k <> '' then do
  421.           if update <> '' then do
  422.             ingrp = 0
  423.             call dbout 'Entry' i 'reset - found at' k 'group:' ingrp
  424.             end
  425.           else do
  426.             call dbout 'Entry' k 'replaced with entry' i 'group:' ingrp
  427.             ingrp = grp.k
  428.             name.k = name.i
  429.             flag.k = flag.i
  430.             cmt.k = cmt.i
  431.             do j=1 to name.0
  432.               if grp.j = grp.k & j <> k then
  433.                 grp.j = 0
  434.               end
  435.             end
  436.           k = i
  437.           temail = ''
  438.           end
  439.         end
  440.       if temail <> '' then do
  441.         if higrp = '' then
  442.           higrp = 1
  443.         else
  444.           higrp = higrp + 1
  445.         ingrp = higrp
  446.         call dbout 'Group # set to' ingrp
  447.         grp.i = ingrp
  448.         name.0 = i
  449.         end
  450.       end
  451.     else if left(lineinp,1) = '+' then do
  452.       if ingrp = '' | ingrp = 0 then
  453.         iterate
  454.       parse var lineinp . '+' search
  455.       do while(search <> '')
  456.         parse var search sname ',' search
  457.         call dbout 'Processing item:' sname
  458.         sname = strip(sname)
  459.         do i=1 to name.0
  460.           if translate(alias.i) = translate(sname) & ,
  461.                grp.i <> ingrp then do
  462.             k = name.0+1
  463.             call dbout 'Assuming entry:' k 'first entry:' i '=' name.i
  464.             do j=i to name.0
  465.               if translate(name.j) = translate(name.i) & ,
  466.                   translate(alias.j) = translate(alias.i) & ,
  467.                   grp.j = ingrp then do
  468.                 call dbout 'Match found at:' j '=' name.j 'alias:' alias.j
  469.                 k=j
  470.                 end
  471.               end
  472.             call dbout 'Item set to entry:' k 'from entry' i
  473.             name.k = name.i
  474.             alias.k = alias.i
  475.             cmt.k = cmt.i
  476.             email.k = email.i
  477.             flag.k = flag.i
  478.             grp.k = ingrp
  479.             name.0 = max(name.0,k)
  480.             i = k
  481.             end
  482.           end
  483.         end
  484.       end
  485.     iterate
  486.     end
  487.   call stream mr2b,'c','close'
  488.   call dbout 'File closed:' mr2b
  489.  
  490.   return
  491.  
  492. loadnetscape:
  493.  
  494.   /* load the stem variables with the content from the Netscape address bk  */
  495.  
  496.   xx = stream(nets,'c','open read')
  497.   xx = stream(nets,'state')
  498.   call dbout 'File input:' nets
  499.   ingrp = ''
  500.   innam = ''
  501.   i = name.0 + 1                        /* initialize for 1st name          */
  502.   do while(xx = 'READY')
  503.     lineinp = linein(nets)
  504.     call dbout lineinp
  505.     lineinp = strip(lineinp)
  506.     xx = stream(nets,'state')
  507.     if xx <> 'READY' then leave
  508.     if lineinp = '' then iterate
  509.     k = pos('MAILTO:',translate(lineinp))
  510.     if k = 0 then do
  511.       if left(lineinp,4) = '<DD>' then do
  512.         k=i-1
  513.         if k>0 then
  514.           cmt.k = substr(lineinp,5)
  515.         call dbout 'Comment for' alias.k 'set to:' left(cmt.k,40,' ')
  516.         iterate
  517.         end
  518.       if left(lineinp,2) = '<H' then do
  519.         if innam = '' then
  520.           innam = 'x'
  521.         end
  522.       if left(lineinp,6) = '<DT><H' then do
  523.         if innam = '' then
  524.           iterate
  525.         else if ingrp = '' then
  526.           ingrp = 1
  527.         else
  528.           ingrp = ingrp + 1
  529.         call dbout 'Group # set to:' ingrp
  530.         end
  531.       if pos('NICKNAME=',lineinp) = 0 then
  532.         iterate
  533.       end
  534.     if innam = '' then iterate
  535.     if k > 0 then do
  536.       k = k+7
  537.       email.i = substr(lineinp,k,pos('"',substr(lineinp,k))-1)
  538.       end
  539.     k = pos('NICKNAME=',translate(lineinp))
  540.     if k > 0 then
  541.       alias.i = substr(lineinp,k+10,pos('"',substr(lineinp,k+10))-1)
  542.     k = lastpos('>',left(lineinp,length(lineinp)-2))
  543.     if k > 5 then
  544.       name.i = substr(lineinp,k+1,lastpos('<',substr(lineinp,k+1))-1)
  545.     if ingrp <> '' then
  546.       grp.i = ingrp
  547.     if name.i = '' then
  548.       name.i = left(email.i,pos('@',email)-1)
  549.     if alias.i = '' then do
  550.       do k=1 to name.0
  551.         if name.k = name.i then
  552.           alias.i = alias.k
  553.         end
  554.       end
  555.     call dbout 'Item' i 'setup for' name.i 'alias:' alias.i 'group:' grp.i
  556.     name.0 = i
  557.     i = i+1
  558.     end
  559.   call stream nets,'c','close'
  560.   call dbout 'File closed:' nets
  561.  
  562.   return
  563.  
  564. getbookdir:
  565.  
  566.   /* find the directories needed for the address books...                    */
  567.   nets = stream(netbook,'c','query exists')
  568.   mr2i = stream(mr2book,'c','query exists')
  569.   mr2b = stream(mr2grp,'c','query exists')
  570.   if nets = '' then
  571.     nets = SysSearchPath('PATH',netbook)
  572.   if mr2i = '' then
  573.     mr2i = SysSearchPath('PATH',mr2book)
  574.   if mr2b = '' then
  575.     mr2b = SysSearchPath('PATH',mr2grp)
  576.   if nets = '' | mr2i = '' then
  577.     Say ''
  578.   if mr2i = '' then do
  579.     mr2i = stream('mr2i.exe','c','query exists')
  580.     if mr2i = '' then
  581.       mr2i = SysSearchPath('PATH','mr2i.exe')
  582.     if mr2i = '' then do
  583.       Say 'Cannot find the directory for the' mr2book 'file.  Please insure'
  584.       Say 'it is in your PATH environment and retry.'
  585.       exit 8
  586.       end
  587.     else do
  588.       mr2path = FileSpec('Drive',mr2i) || FileSpec('Path',mr2i)
  589.       mr2i = mr2path || mr2book
  590.       Say 'Cannot find the MR2i' mr2book 'file - a new one will be created.'
  591.       end
  592.     end
  593.   if nets = '' then do
  594.     Say 'Cannot find the Netscape' netbook 'file.'
  595.     Say 'Please insure it is in the current directory or can be found via'
  596.     Say '  the PATH environment, and retry.'
  597.     exit 8
  598.     end
  599.   if mr2b = '' then do
  600.     mr2path = FileSpec('Drive',mr2i) || FileSpec('Path',mr2i)
  601.     mr2b = mr2path || mr2grp
  602.     end
  603.   return
  604.  
  605. synerr:
  606.   errline = sigl
  607.   linenbr= errline
  608.   Say 'Unexpected error occurred.'
  609.   if datatype(rc,'W') then
  610.     if errortext(rc) = ' ' then
  611.       Say 'Error on line' linenbr
  612.     else
  613.       Say 'Error on line' linenbr 'was 'errortext(rc)
  614.   else
  615.     Say 'Error on line' linenbr
  616.   Say 'Error line: 'sourceline(errline)
  617.   trace '?i'
  618.   errline = errline
  619.   exit 8
  620.  
  621. tell:
  622.   Say 'Convert Netscape for OS/2 addresses to MR/2 ICE format - version' version
  623.   Say '  Copyright (c) Art Heimsoth - 1997 - all rights reserved.'
  624.   Say ''
  625.   Say 'Calling syntax:'
  626.   Say ' ' ourname '[?] [update] [test] [addr1|2|3]'
  627.   Say '    where ?      = display this help information'
  628.   Say '          update = update any MR/2 ICE entries with the matching'
  629.   Say '                   information from the Netscape address book,'
  630.   Say '                   Default is to keep the existing MR/2 information.'
  631.   Say '          addr1|2|3 = format the imported (converted) email addresses'
  632.   Say '                   to one of 3 possible formats:'
  633.   Say '             addr1 = "Joe Blow" <jb123@windy.com'
  634.   Say '             addr2 = Joe Blow <jb123@windy.com'
  635.   Say '             addr3 = jb123@windyy.com (Joe Blow)'
  636.   Say '          test   = do not alter existing MR/2 ICE address entries,'
  637.   Say '                   but create new files of mr2inew.adr and mr2inew.grp'
  638.   Say '                   with the converted information.'
  639.   Say '    if multiple parameters are provided, they must be separated with'
  640.   Say '    one or more blanks.'
  641.   Say ''
  642.   Say ' This program will convert the address book from Netscape for OS/2'
  643.   Say ' to a format compatable with MR/2 ICE.  See the NSToMR2.DOC file'
  644.   Say ' in this package for additional detailed information.'
  645.   Say ''
  646.   exit 100
  647.