home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
autorep3.zip
/
AppendLock.cmd
next >
Wrap
OS/2 REXX Batch file
|
1996-03-12
|
705b
|
34 lines
/* ------------------------------------------------------------------ */
TRUE = 1
FALSE = 0
AppendLock:
parse arg SrcFile DestFile
rc = LockOpen(SrcFile 'READ')
if rc = FALSE then
return FALSE
rc = LockOpen(DestFile 'WRITE')
if rc = FALSE then do
rc = UnLock(SrcFile)
return FALSE
end
rc = stream(DestFile, 'C', 'SEEK <0') /* go to end of file */
do while lines(SrcFile) <> 0 /* until end of file */
Line = linein(SRcFile) /* get a line of the file */
rc = lineout(DestFile, Line, )
end
rc = LockClose(SrcFile)
rc = LockClose(DestFile)
return TRUE
/* ------------------------------------------------------------------ */