home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
mtw16301.zip
/
OUTFILE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-02-09
|
1KB
|
67 lines
;
; Assignement of values to variables
;
$(A) := "10"
$(B) := "1000"
$(C) := $(B) + $(A)
;
; We write some values to a external file
;
O log.txt
W $(A)
W $(B)
W $(C)
W $(_INIFILE)
W $(_INIPATH)
;
; We use another outputfile, the old one is closed
;
O log2.txt
W $(_CMDFILE)
W $(_CMDPATH)
;
; The ccEnv variable is set to a key-value
;
$(ccEnv) := $(_INIVALUE[CC:MAIL]LastUserID)
;
; Based on the above ccEnv variable we construct a new key
; for which we get the new Value
;
;
$(CCUSERDIR) := $(_INIVALUE[CC:MAIL]USER$(ccEnv)Dir)
;
; Example INI file-content
;
;
; [cc:Mail]
; LastUserID=2
; User1Dir=C:\WINDOWS\CCMAIL
; User1Name=FUNG, HS
; User2Dir=C:\WINDOWS\CCMAIL\cc1dir
; User2Name=FUNG, Alex
;
;
; Now we write the found directory to a batch-file
; so it sets a permanent environment value
;
O DOSSET.BAT
W @ECHO OFF
W SET CCMAIL=$(CCUSERDIR)
;
; We display the content of the current directory
;
E DIR
;
; How much memory have we free ???
;
EE mem /c /p
;
; The errorcode is stored in the _ERRORCODE variable
;
;W $_ERRORCODE$
;