
                    Programming/using OS/2 REXX      (echo)

                 Saturday, 06-Nov-1999 to Friday, 12-Nov-1999

+----------------------------------------------------------------------------+

From: Jack Stein                                        02-Nov-99 07:23:20
  To: All                                               07-Nov-99 14:47:09
Subj: REXX Babble October Part 1 of 1

                               Part  1                               
                    The OS/2 REXX BabbloMeter Report                    
      Monthly Babble received in OS2REXX at Jack's Free Lunch BBS       
                            October, 1999                            

                    14 users babbled 51 Messages                     

Outbound Babble        %     K   Avg K | Incoming Babble         %
=======================================|============================
 10 EDDY THILLEMAN   19.6%   23k   2.3 |   8 JOHN CLARKE       15.7%
  8 DAVID NOON       15.7%   30k   3.7 |   7 EDDY THILLEMAN    13.7%
  5 JONATHAN DE BOYN  9.8%   10k   1.9 |   7 JONATHAN DE BOY   13.7%
  5 MIKE RUSKAI       9.8%   12k   2.4 |   7 ALL               13.7%
  5 JOHN CLARKE       9.8%    8k   1.6 |   5 MIKE RUSKAI        9.8%
  4 FRANCOIS MASSONN  7.8%   32k   8.1 |   4 RON MITCHELL       7.8%
  3 RON MITCHELL      5.9%    4k   1.4 |   4 DAVID NOON         7.8%
  3 RICH WONNEBERGER  5.9%    3k   1.1 |   3 RICH WONNEBERGE    5.9%
  2 GORD HANNAH       3.9%    2k   1.2 |   2 STEVE MCCRYSTAL    3.9%
  2 STEVE MCCRYSTAL   3.9%    2k   1.1 |   2 FRANCOIS MASSON    3.9%
  1 MURRAY LESSER     2.0%    2k   2.3 |   1 JACK STEIN         2.0%
  1 MOD RULES POSTER  2.0%    4k   3.7 |   1 GORD HANNAH        2.0%
  1 JACK STEIN        2.0%    2k   1.8 |  
  1 GEORGE WHITE      2.0%    2k   2.1 |  

--- MakeMsg v2.1
 * Origin: Jack's Free Lunch 4OS2 USR16.8 Pgh Pa (412)492-0822 (1:129/171.0)

+----------------------------------------------------------------------------+

From: Eddy Thilleman                                    03-Nov-99 09:20:25
  To: Mike Ruskai                                       07-Nov-99 14:47:09
Subj: FrontDoor/Mailser and Re

Hello Mike,

30 Oct 99 19:55, MIKE RUSKAI wrote to EDDY THILLEMAN:

ET>> Has the concatenation operator (||) advantages over the syntax
ET>> '\'variable ? Are there any differences, if so what are they?

MR> Easier to see what you're trying to do.

OK, I see. :)

MR> If you accidentally put a space between the two, it becomes space
MR> concatenation (breaking the filename), rather than abuttal.

I'm aware of that. :)

MR> If you stick with the concatenation operator, you'll notice when a
MR> space is where it doesn't belong.  I *always* use them, even to put a
MR> space in the string (string||' '||restofstring).

with the ||, extra spaces between the strings doesn't influence the script

string || ' ' || restofstring

  is the same as

string||' '||restofstring

but without the || the above two concatenations are different

(but you already know that)

MR> As a result, I've never had a problem with problems due to undesirable
MR> concatenation side-effects.

I got never stuck on that. :)  But I see your point.

  Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl

... "The adventures of WIN.INI the Pooh" by W. Gates
--- GoldED/2 3.0.1
 * Origin: Windows98 is a graphic DOS extender (2:500/143.7)
3615/7

+----------------------------------------------------------------------------+

From: Jonathan de Boyne Pollard                         03-Nov-99 10:21:02
  To: All                                               07-Nov-99 14:47:09
Subj: A script that demonstrates the use of RxFTP

/* GET_GLOBAL.CMD -- Retrieve 00GLOBAL.TXT from Hobbes FTP site */
/*
 * This is a REXX script that retrieves the 00GLOBAL.TXT file from the
 * Hobbes OS/2 FTP site in New Mexico State University in the United State.
 *
 * (c) Copyright 1997 Jonathan de Boyne Pollard.  All rights reserved.
 *
 * Permission is hereby granted for you to use, copy, modify, and redistribute
 * this script to your heart's content, as long as you make no money from
 * doing so, and as long as you realise that I accept no responsibility for
 * whatever posession or use of this script may do to your machine, data,
 * cat, or marital status.
 *
 * NOTE: This script requires that you have installed the RxFTP library.
 */

call RxFuncAdd 'FtpLoadFuncs','RxFTP','FtpLoadFuncs'
rc = FtpLoadFuncs()

if FtpSetUser('hobbes.nmsu.edu', 'anonymous', 'os2user@') then do
        say 'Successfully connected to hobbes.nmsu.edu.'
        if FtpChDir('/pub/os2') >= 0 then do
                say 'Downloading "/pub/os2/00global.txt" ...'
                if FtpGet('00global.txt', '00global.txt', 'Ascii') >= 0 then
                        say '"00global.txt" has been successfully retrieved'
                else
                        say 'FTP error 'FtpErrNo' retrieving "00global.txt"'
        end
        else
                say 'FTP error 'FtpErrNo' changing to directory "/pub/os2"'
end
else
        say 'Cannot log in to the Hobbes OS/2 FTP site !'
call FtpLogoff

/*  JdeBP  */

--- FleetStreet 1.22 NR
 * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
209/7211
103

+----------------------------------------------------------------------------+

From: Jonathan de Boyne Pollard                         03-Nov-99 10:22:14
  To: All                                               07-Nov-99 14:47:09
Subj: A script that sets .SUBJECT EAs

/* CONVERT_DESCRIPTION.CMD -- Convert FILES.BBS to 4OS2 description */
/*
 * This is a REXX script that parses the contents of FILES.BBS and
 * DESCRIPT.ION and sets the .SUBJECT extended attribute to the files's
 * description for for each file found. This script is intended to be
 * used when 4OS2 or Take Command for OS/2 is configured to use
 * extended attributes for its descriptions.  You can also see the
 * description on the [File] page of a file's settings notebook in
 * Workplace Shell, and several OS/2 utilities (such as NcFTP) give
 * .SUBJECTs to the files that they create.
 *
 * (c) Copyright 1998 Jonathan de Boyne Pollard.  All rights reserved.
 *
 * Permission is hereby granted for you to use, copy, modify, and redistribute
 * this script to your heart's content, as long as you make no money from
 * doing so, and as long as you realise that I accept no responsibility for
 * whatever posession or use of this script may do to your machine, data,
 * cat, or marital status.
 *
 * NOTE: This script requires Object REXX.
 */

call RxFuncAdd 'SysMkDir','RexxUtil','SysMkDir'
call RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
call RxFuncAdd 'SysPutEA','RexxUtil','SysPutEA'
call RxFuncAdd 'SysGetMessage','RexxUtil','SysGetMessage'

if "" \= stream('FILES.BBS','c','query exists') then
        call ParseFile 'FILES.BBS'
if "" \= stream('DESCRIPT.ION','c','query exists') then
        call ParseFile 'DESCRIPT.ION'

if SysFileTree('*', 'dirs', 'SDO') == 0 then
        do i = 1 to dirs.0
                olddir = directory()
                call directory dirs.i
                if "" \= stream('FILES.BBS','c','query exists') then
                        call ParseFile 'FILES.BBS'
                if "" \= stream('DESCRIPT.ION','c','query exists') then
                        call ParseFile 'DESCRIPT.ION'
                call directory olddir
        end
else
        say Error reading the directory tree.
exit

ParseFile: procedure
        parse arg DescriptionFileName

        DescriptionFile = .stream~new(DescriptionFileName)
        do while DescriptionFile~lines() \= 0
                Line = DescriptionFile~linein()
                select
                when line == '' then nop
                when line~left(1) == '-' then nop
                when line~left(1) == '"' then do
                        parse var line '"'filename'"' description
                        call Describe filename description
                end
                otherwise do
                        parse var line filename description
                        call Describe filename description
                end
                end
        end
        error = DescriptionFile~close()
        drop DescriptionFile
return

Describe: procedure
        parse arg Filename Description
        subject =
x2c("FDFF")||description~length()~d2c(2)~reverse()||description
        error = SysPutEA(Filename, ".SUBJECT", subject)
        if 0 \= error then
                say SysGetMessage(error,,directory()||"\"||Filename),
                    ' "'directory()'\'Filename'"'
        /*address 'CMD' 'describe '||filename||' /D"'||description||'"'*/
return

/*  JdeBP  */

--- FleetStreet 1.22 NR
 * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
209/7211
103

+----------------------------------------------------------------------------+

From: Jonathan de Boyne Pollard                         03-Nov-99 10:23:08
  To: All                                               07-Nov-99 14:47:09
Subj: A script that generates FILES.BBS files

/* CONVERT_GLOBAL.CMD -- Convert 00GLOBAL.TXT to FILES.BBS */
/*
 * This is a REXX script that takes the 00GLOBAL.TXT file that can be found
 * in the root directory on most FTP sites, and which is next to useless, and
 * generates from it in the appropriate subdirectories a set of FILES.BBS
 * files, which are a *LOT* more useful, understood as they are by a wide
 * range of file management tools from InspectA to the DIR command in 4DOS
 * and Take Command.
 *
 * (c) Copyright 1997 Jonathan de Boyne Pollard.  All rights reserved.
 *
 * Permission is hereby granted for you to use, copy, modify, and redistribute
 * this script to your heart's content, as long as you make no money from
 * doing so, and as long as you realise that I accept no responsibility for
 * whatever posession or use of this script may do to your machine, data,
 * cat, or marital status.
 *
 * NOTE: This script requires Object REXX.
 */

call RxFuncAdd 'SysMkDir','RexxUtil','SysMkDir'

directory_prefix='./'
DescriptionFile = .stream~new('00GLOBAL.TXT')
FilesBBS = .stream~new("FILES.BBS")
FilesBBS~lineout('-')
FilesBBS~lineout('- Added to FILES.BBS from 00GLOBAL.TXT on ',
                ||date('S')||' '||time('N'))
FilesBBS~lineout('-')
do while DescriptionFile~lines() \= 0
        Line = DescriptionFile~linein()
        select
        when line~left(directory_prefix~length()) == directory_prefix then do
                parse var Line (directory_prefix) dir':'
                dir = translate(dir, '\', '/')
                if dir~right(1) == '\' then
                        dir = dir~left(dir~length()-1)
                call MakeDirectory dir
                say dir':'
                error = FilesBBS~close()
                drop FilesBBS
                FilesBBS = .stream~new(dir||"\FILES.BBS")
                FilesBBS~lineout('-')
                FilesBBS~lineout('- Added to FILES.BBS from 00GLOBAL.TXT on ',
                                ||date('S')||' '||time('N'))
                FilesBBS~lineout('-')
        end
        when line \= '' then do
                parse var Line name . . description
                if name~right(1) == '/' then
                        name = name~left(name~length()-1)
                if strip(description) \= '' then
                        FilesBBS~lineout(name||description)
        end
        otherwise nop
        end
end
drop FilesBBS
exit

MakeDirectory: procedure
        parse arg dir

        rc = SysMkDir(dir)
        if rc == 3 then do
                parent = filespec("Drive",dir)||filespec("Path",dir)
                rc = MakeDirectory(parent)
                if rc \= 0 then return rc
                rc = SysMkDir(dir)
        end

return rc

/*  JdeBP  */

--- FleetStreet 1.22 NR
 * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
209/7211
103

+----------------------------------------------------------------------------+

From: Peter Knapper                                     06-Nov-99 09:14:10
  To: Jonathan de Boyne Pollard                         07-Nov-99 14:47:09
Subj: A script that demonstrates the use of RxFTP

Hi Johnathan,

Just a minor point about your recent script -

 JdBP> /* GET_GLOBAL.CMD -- Retrieve 00GLOBAL.TXT from Hobbes FTP site */

  <... snip ...>

 JdBP> if FtpSetUser('hobbes.nmsu.edu', 'anonymous', 'os2user@') then do
 JdBP>         say 'Successfully connected to hobbes.nmsu.edu.'

While your script will probably work in most cases, it may be interesting to
note that the FtpSetUser() call will ALWAYS return success, if the local
machine REXX FTP environment is working correctly, you do not NEED an Internet 
connection to be running at this stage to have the FtpSetUser() function
return "success", it does not even do a DNS lookup at that point...

All FtpSetUser() does is STORE the Site and User parameters locally, so that
the FIRST REXX FTP command that actually REQUIRES a Server response will
perform the FTP OPEN command using those parameters stored from the
FtpSetUser() command, BEFORE it issues the command that needs the response. 

 JdBP>         if FtpChDir('/pub/os2') >= 0 then do

In you case, this is the point at which one can safely assume a "connection"
WAS established. I actually use an FtpPwd() call AFTER the FtpSetUser() to
determine the FTP connection status before I report that the connection was
successful. FtpPwd() MUST obtain a Server response, and because it is
"non-destructive" call, any access/permission issues on the FTP Server will
mask the connection issue. Once the Login is confirmed, THEN I try and change
directories...

Regards...........pk.

--- Maximus/2 3.01
 * Origin: Another Good Point About OS/2 (3:772/1.10)

+----------------------------------------------------------------------------+

From: Jonathan de Boyne Pollard                         05-Nov-99 11:23:28
  To: All                                               07-Nov-99 14:47:09
Subj: A script that converts .SUBJECT EAs back to FILES.BBS

/* CONVERT_SUBJECT.CMD -- Convert 4OS2 descriptions to FILES.BBS */
/*
 * This is a REXX script that reads the .SUBJECT extended attributes
 * of files and writes appropriate FILES.BBS files for the benefit of
 * certain backward utilities that haven't converted to using .SUBJECT
 * EAs yet (such as 4DOS).  Lines are only ever appended to the FILES.BBS
 * files, so no existing FILES.BBS contents will be overwritten.
 *
 * (c) Copyright 1999 Jonathan de Boyne Pollard.  All rights reserved.
 *
 * Permission is hereby granted for you to use, copy, modify, and redistribute
 * this script to your heart's content, as long as you make no money from
 * doing so, and as long as you realise that I accept no responsibility for
 * whatever posession or use of this script may do to your machine, data,
 * cat, or marital status.
 *
 * NOTE: This script requires Object REXX.
 */

call RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
call RxFuncAdd 'SysGetEA','RexxUtil','SysGetEA'
call RxFuncAdd 'SysGetMessage','RexxUtil','SysGetMessage'

if SysFileTree('*', 'names', 'SBO') == 0 then
    do i = 1 to names.0

        error = SysGetEA(names.i, ".SUBJECT", "subject")
        if error \= 0 then do
            say SysGetMessage(error,,names.i) ' "'names.i'"'
            iterate
        end

        if subject \= "" then do
            say names.i

            len = subject~substr(3,2)~reverse()~c2d()
            description = subject~substr(5,len)

            if len > 0 then do
                path = filespec("Drive",names.i)||filespec("Path",names.i)

                FilesBBS = .stream~new(path||"FILES.BBS")
                FilesBBS~open("write append")
                FilesBBS~lineout(filespec("Name",names.i)||" "||description)
                FilesBBS~close()
            end
        end
    end
else
    say Error reading the directory tree.
exit

/*  JdeBP  */

--- FleetStreet 1.22 NR
 * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
209/7211
911
801/161

+----------------------------------------------------------------------------+

From: Jonathan de Boyne Pollard                         07-Nov-99 12:25:19
  To: Peter Knapper                                     08-Nov-99 14:32:26
Subj: A script that demonstrates the use of RxFTP

 PK> FTP connection status before I report that the connection was successful.
 PK> FtpPwd() MUST obtain a Server response, and because it is 
 PK> "non-destructive" call, any access/permission issues on the FTP Server 
 PK> will mask the connection issue. Once the Login is confirmed, THEN I try 
 PK> and change directories...

In light of this tip, I've modified the script to separate the connection
check from the first directory change using the FtpSys() function.  

I decided not to use FtpPwd() because it might, depending from the server's
configuration, be expensive on the server side.  If an UNIX FTP server needs
to do a PWD, for example, it has to backtrack up the ".." links from whatever
the current directory is until it reaches the root.  This will be non-trivial
if the server is configured to start in a non-root directory, and will involve 
disc I/O.  It seems unfriendly to make the server do all of that work and then 
simply ignore the result.  It seems especially unfriendly to do this to the
Hobbes FTP server.

Querying the operating system, by comparison, is far less expensive at the
server end, since it should at most cause the server to spit out as its
response a literal string that was compiled into its executable.

Here is the modified script:

-------------------------------------------------------------------------------

/* GET_GLOBAL.CMD -- Retrieve 00GLOBAL.TXT from Hobbes FTP site */
/*
 * This is a REXX script that retrieves the 00GLOBAL.TXT file from the
 * Hobbes OS/2 FTP site in New Mexico State University in the United State.
 *
 * (c) Copyright 1997-1999 Jonathan de Boyne Pollard.  All rights reserved.
 *
 * Permission is hereby granted for you to use, copy, modify, and redistribute
 * this script to your heart's content, as long as you make no money from
 * doing so, and as long as you realise that I accept no responsibility for
 * whatever posession or use of this script may do to your machine, data,
 * cat, or marital status.
 *
 * NOTE: This script requires that you have installed the RxFTP library.
 */

call RxFuncAdd 'FtpLoadFuncs','RxFTP','FtpLoadFuncs'
rc = FtpLoadFuncs()

if FtpSetUser('hobbes.nmsu.edu', 'anonymous', 'os2user@') then do
    say 'Successfully connected to hobbes.nmsu.edu.'
    if FtpSys('opsys') >= 0 then do
        if FtpChDir('/pub/os2') >= 0 then do
            say 'Downloading "/pub/os2/00global.txt" ...'
            if FtpGet('00global.txt', '00global.txt', 'Ascii') >= 0 then
                say '"00global.txt" has been successfully retrieved'
            else
                say 'FTP error 'FtpErrNo' retrieving "00global.txt"'
        end
        else
            say 'FTP error 'FtpErrNo' changing to directory "/pub/os2"'
    end
    else
        say 'FTP error 'FtpErrNo' querying the remote server'
end
else
    say 'Cannot log in to the Hobbes OS/2 FTP site !'
call FtpLogoff
-------------------------------------------------------------------------------


  JdeBP 

--- FleetStreet 1.22 NR
 * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
209/7211
911

+----------------------------------------------------------------------------+

From: Jonathan de Boyne Pollard                         07-Nov-99 12:25:27
  To: Peter Knapper                                     08-Nov-99 14:32:26
Subj: A script that demonstrates the use of RxFTP

 PK> Just a minor point about your recent script -

"Recent" is relative.  I wrote it almost three years ago as you can see by the 
date.  I've posted it in this echo a couple of times before now, too.  (-:

  JdeBP 

--- FleetStreet 1.22 NR
 * Origin: JdeBP's point, using Squish <yuk!> (2:257/609.3)
209/7211
911

+----------------------------------------------------------------------------+

From: Francois Massonneau                               11-Nov-99 00:00:00
  To: David Noon                                        11-Nov-99 00:00:00
Subj: FrontDoor/Mailser and Re

/.. On (Le) 10-24-99 20:33, 
    Subject (Sujet) : FrontDoor/Mailser and Re, 
    David Noon wrote to (ecrivait a) Francois Massonneau ../

Hi David,

Sorry for the delay, I'm just back home but for a few days only.

 DN> I would use = rather than == to compare the value to zero.

 DN>     if files.0 = 0 then

OK, I changed that.

 FM>I removed the "do forever" at the beginning and the "end" at the end of
 FM>the script.

 DN> This means it will terminate after one poll. Also, the conditional
 DN> leave statement (mentioned above for its IF part) will need to be
 DN> changed to:

 DN>      if files.0 = 0 then
 DN>          exit 0 /* was leave */

I did that, but it doesn't work as expected.
If I put "exit 0", when no more files are in the subdirectory, the
window is closed, but the windows that launched the script and the one
where the dialer is running are still opened and wait for the signal the
script must send to tell everything is done.
so I left the "leave" statement.

 FM>And finally I removed those lines :
 FM>  call SysSleep SleepTime
 FM>  call stream SemaMailer, 'c', 'open write'
 FM>  call lineout SemaMailer, 'inetmail semafore file'
 FM>  call stream SemaMailer, 'c', 'close'

 DN> So you are no longer using a semphore file.

It's no longer a semafore file, but the script sends a signal to HWAIT.

 FM>3) At the end of the script, I saw you write two times (one before and
 FM>one after the subroutine "StopDialler"), the following lines :
 FM>  /* Reset elapsed time counter */
 FM>  CALL TIME 'R'
 FM>RETURN
 FM>I suppose one is for the subroutine StartDialler, and the second one is
 FM>for the subroutine StopDialler. Is it a code to give the time on line ?

 DN> It is part of that code.

 DN> There should be a TIME('E') call somewhere in the StopDialler
 DN> subroutine that should display the elapsed time.

Where ?
May I put at the beginning :
CALL TIME('E')
for example, just after the "CALL DIRECTORY DialerDir" statement and
before the "ADDRESS 'CMD' KillDialer" line ?
This is the subroutine you wrote :
/* Subroutine to stop the dialer program and its related address spaces
*/
StopDialer:
PROCEDURE EXPOSE DialupLogFile DialerDir KillDialer kill inetmail pop3d
smtpd
  CurDir = DIRECTORY()
  CALL DIRECTORY DialerDir

  ADDRESS 'CMD' KillDialer
  CALL LogMsg 'dialer, if running, is killed.'
  CALL LogMsg 'Dialer disconnected after ' || TIME('E') || '
  seconds.'

  CALL DIRECTORY CurDir

  ADDRESS 'CMD' kill inetmail
  CALL LogMsg 'inetmail, if running, is killed.'

  ADDRESS 'CMD' kill pop3d
  CALL LogMsg 'pop3d process, if running, is killed.'

  ADDRESS 'CMD' kill smtpd
  CALL LogMsg 'smtpd process, if running, is killed.'

  CALL SysSleep 2    /* just give it a little time to shut down... */

  /* Reset elapsed time counter */
  CALL TIME 'R'
RETURN

 FM>If so, where in the log file do I find it ??

 FM>22 Oct 1999 08:32:54  Dialler disconnected after 0 seconds.

 DN> Here. For some reason the elapsed timer has been reset again, giving a
 DN> time of zero seconds.

 FM>So the time on line is not 0 second, but about 8 minutes.

 DN> That would be about 480 seconds then. That is what should have been
 DN> returned by the TIME('E') call. Since there are 2 calls to StopDialler,
 DN> the second one should have the correct elapsed time logged.

OK.
Is it possible to add something to the routine to give the cost of the
call. One parameter could be the cost for one minute on line
"CostperMinute", and at the end of each run, the log could record the
total time on line, and the resulting cost ?

I saw a problem with the log generated.
A file is created in my root directory, named DIALUPLOGFILE. In it I
have all the sentences that should be put in the dialup.log file, but
the sentences are the ones generated by the PingServer Procedure.
It seems that a "CALL LogMsg ..." statement contained in the PingServer
procedure is not written in the dialup.log file, but in a dialuplogfile
file in my root directory.
Is it because I have the beginning of the procedure written that way :
PingServer:
procedure
  call LogMsg 'PingServer starting'
  .../.
instead of :
PingServer:
PROCEDURE EXPOSE DialupLogFile
  call LogMsg 'PingServer starting'
  .../.

 FM>4) From time to time Injoy (the dialler), gives me problems as I said

 FM>Is there a way to check what's going on with the dialler,
 FM>restart the BBS node ?

 DN> Not a good idea. You would then need this REXX program to monitor the
 DN> other REXX program. If InJoy can be monitored at all, you can do it
 DN> from within the current REXX program. Does InJoy write its output to
 DN> stdout, allowing it to be redirected? If so, you can use a REXX queue

 I don't know. I'm gonna try to find out.



  Bye, 
                    Francois

  (Email: fmas@celtes.com - http://www.worldnet.fr/~island/)
 
___ MultiMail/OS/2 v0.32

--- Maximus/2 2.02
 * Origin: OS/2 Shareware BBS, telnet://bbs.os2bbs.com (1:109/347)


+----------------------------------------------------------------------------+

From: Eddy Thilleman                                    10-Nov-99 07:57:11
  To: All                                               12-Nov-99 15:22:02
Subj: seek

Hello All,

I've written a REXX file to add missing descriptions about area's for GoldEd.

I tried to seek by giving a variable to the stream function:

BeginOfFile = "seek =1"

check = stream( file, 'C', BeginOfFile )    /* seek to begin of file */

but this results in error messages. I don't understand that.

this works:
check = stream( file, 'C', "seek =1" )    /* seek to begin of file */

So why doesn't work the one with the variable and with a literal string it
does work??

  Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl

... He orders you to surrender this `wessel'! -- Checkov
--- GoldED/2 3.0.1
 * Origin: Windows95 is a graphic DOS extender (2:500/143.7)
3615/7

+----------------------------------------------------------------------------+

From: Eddy Thilleman                                    10-Nov-99 07:57:17
  To: All                                               12-Nov-99 15:22:02
Subj: general open file routines

Hello All,

I've written some (I hope) general (ofcourse) REXX file routines, with
internal checking for file errors, these can be used as functions. Is there
interest?

untested sample code to use these functions:

if OpenReadFile( file1 ) & OpenAppendFile( file2 ) then do
  do while Lines( file1 ) = 1          /* while not end of file1 */
    Line = LineIn( file1 )             /* read new line */
    say Line
    written = LineOut( file2, Line )   /* append to file2 */
  end  /* while not end of file1 */
  call CloseFile( file1 )
  call CloseFile( file2 )
end  /* if files are open */

I've these routines (slightly modified) also incorporated into wgetmir.cmd, is 
there interest for this?
I have moved the inputfiles for wget into a separate subdirectory.

  Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl

... ABANDON all hope, ye who press <ENTER> here!
--- GoldED/2 3.0.1
 * Origin: Windows95 is a graphic DOS extender (2:500/143.7)
3615/7

+----------------------------------------------------------------------------+

+============================================================================+
