home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / mtw32301.zip / OUTFILE.CMD < prev    next >
OS/2 REXX Batch file  |  1996-02-09  |  1KB  |  67 lines

  1. ;
  2. ; Assignement of values to variables
  3. ;
  4. $(A) := "10"
  5. $(B) := "1000"
  6. $(C) := $(B) + $(A)
  7. ;
  8. ; We write some values to a external file
  9. ;
  10. O log.txt
  11. W $(A)
  12. W $(B)
  13. W $(C)
  14. W $(_INIFILE)
  15. W $(_INIPATH)
  16. ;
  17. ; We use another outputfile, the old one is closed
  18. ;
  19. O log2.txt
  20. W $(_CMDFILE)
  21. W $(_CMDPATH)
  22.  
  23. ;
  24. ; The ccEnv variable is set to a key-value
  25. ;
  26. $(ccEnv) := $(_INIVALUE[CC:MAIL]LastUserID)
  27. ;
  28. ; Based on the above ccEnv variable we construct a new key
  29. ; for which we get the new Value
  30. ;
  31. ;
  32. $(CCUSERDIR) := $(_INIVALUE[CC:MAIL]USER$(ccEnv)Dir)
  33.  
  34. ;
  35. ; Example INI file-content
  36. ;
  37. ;
  38. ; [cc:Mail]
  39. ; LastUserID=2
  40. ; User1Dir=C:\WINDOWS\CCMAIL
  41. ; User1Name=FUNG, HS
  42. ; User2Dir=C:\WINDOWS\CCMAIL\cc1dir
  43. ; User2Name=FUNG, Alex
  44. ;
  45. ;
  46. ; Now we write the found directory to a batch-file
  47. ; so it sets a permanent environment value
  48. ;
  49. O DOSSET.BAT
  50. W @ECHO OFF
  51. W SET CCMAIL=$(CCUSERDIR)
  52.  
  53. ;
  54. ; We display the content of the current directory
  55. ;
  56. E DIR
  57. ;
  58. ; How much memory have we free ???
  59. ;
  60. EE mem /c /p
  61. ;
  62. ; The errorcode is stored in the _ERRORCODE variable
  63. ;
  64. ;W $_ERRORCODE$
  65. ;
  66.  
  67.