home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / sm2try.zip / EHSINSCS.CMD < prev    next >
OS/2 REXX Batch file  |  1994-10-28  |  3KB  |  65 lines

  1. /*====================================================================*/
  2. /*  Name:  EHSINSCS.CMD  -  CMD file for installation                 */
  3. /*====================================================================*/
  4. /*                                                                    */
  5. /*  Licensed Materials - Property of IBM                              */
  6. /*                                                                    */
  7. /*  5622-018 (C) Copyright IBM Corp. 1993                             */
  8. /*                                                                    */
  9. /*  All rights reserved.                                              */
  10. /*  US Government Users Restricted Rights -                           */
  11. /*  Use, duplication or disclosure restricted                         */
  12. /*  by GSA ADP Schedule Contract with IBM Corp.                       */
  13. /*                                                                    */
  14. /*  See Copyright Instructions.                                       */
  15. /*                                                                    */
  16. /*====================================================================*/
  17. /* Create Search Service and Sample Documents objects for SM/2 (SWS)  */
  18.  
  19. arg filepath
  20.  
  21. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  22. call SysLoadFuncs
  23.  
  24. samppath=filepath'\DOCS'
  25. sampath2=filepath'\DEMO'
  26.  
  27. /* build ea value  -  add long name to sample directory     */
  28. /* 0xfdffxxxx' where xxxx is a USHORT containing the length */
  29.  
  30. longname='Sample documents'
  31. test='fdff'D2X(LENGTH(longname) + 4 + LENGTH(samppath),2)'00'
  32. longname=x2c(test)longname''x2c('0d0a')'('samppath')'
  33. res = SysPutEA(samppath,'.LONGNAME',longname)
  34. /*if res \== 0 then                                           */
  35. /*   say 'Warning: Longname processing failed - continue....' */
  36.  
  37. longnam2='Demo documents'
  38. test='fdff'D2X(LENGTH(longnam2) + 4 + LENGTH(sampath2),2)'00'
  39. longnam2=x2c(test)longnam2''x2c('0d0a')'('sampath2')'
  40. res = SysPutEA(sampath2,'.LONGNAME',longnam2)
  41. /*if res \== 0 then                                           */
  42. /*   say 'Warning: Longname processing failed - continue....' */
  43.  
  44. objset = 'OBJECTID=<EHS_SERV>;LOCATION=0;ICONVIEWPOS=15 45 50 30;NODELETE=YES;SERVERNAME=SM2'
  45. if SysCreateObject(WPZEHSS, "Search Service", '<EHS_PROD>', objset,'r') then
  46.   say '.'
  47. else
  48.   signal END
  49.  
  50. objset = 'SHADOWID='samppath';OBJECTID=<EHS_SD>'
  51. if SysCreateObject(WPShadow, "Sample documents", '<EHS_SERV>',objset,'r') then
  52.   say '.'
  53. else
  54.   signal END
  55.  
  56. objset = 'SHADOWID='sampath2';OBJECTID=<EHS_DD>'
  57. if SysCreateObject(WPShadow, "Demo documents", '<EHS_SERV>',objset,'r') then
  58.   say '.'
  59. else
  60.   signal END
  61.  
  62. END:
  63.  
  64. return
  65.