
                    Programming/using OS/2 REXX      (echo)

                 Saturday, 20-Nov-1999 to Friday, 26-Nov-1999

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

From: Peter Knapper                                     20-Nov-99 13:36:25
  To: All                                               20-Nov-99 08:40:00
Subj: Copying files and EA's...

Hi Folks,

I wanted to automate the copying of files from one machine to another using
REXX when a thought struck me. 

If a file has EA's, does the OS/2 COPY command copy EA's - 
 1. Between a file copied to the SAME partition?
 2. Between partitions/drives on the same machine?
 3. Between machines connected using OS/2 Peer Services? 

I would expect 1 to be YES, 2 to be YES, 3 possibly...

Can similar/better functionality be performed using REXX commands, ensuring
that EA's are also copied in each of the above situations?

NB: I do not want to split off EA's and re-combine them later...

Cheers...............pk.


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

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

From: Eddy Thilleman                                    18-Nov-99 20:40:25
  To: Wim Bijlenga                                      20-Nov-99 15:43:20
Subj: general open file routines

Hello Wim,

16 Nov 99 08:23, Wim Bijlenga wrote to Eddy Thilleman:

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

WB> Yes

You're the first to ask for it.

I've made these routines to make it easier to open, read/write and close
files, and not have to code the checks, etc (write once, use many times). I
just want to write something like openfile in the main code and not to have to 
think about all the hassle to handle error situations (like file not present,
or file is present but (for some reason) it can't be opened, etc.

/* file I/O subroutines */

/* search text in file and if found, returns that line */
Search: procedure
parse arg file, text
found = 0
  check = stream( file, 'C', "seek =1" )    /* seek to begin of file */
  do while (Lines( file ) = 1) & \found     /* while not end of file and text
not found */
    Line = strip( LineIn( file ) )          /* read new line */
    if Length( Line ) > 0 then do           /* if Line not empty */
      if pos( translate(text), translate(Line) ) > 0 then do
        found = 1
      end  /* if text is found */
    end  /* if Line not empty */
  end  /* while not end of file */
  if \found then Line = ""           /* if text not found, return empty line
*/
return Line


/* function OpenFile( fname ) */
OpenFile: procedure
parse arg fname
  check = stream( fname, 'c', 'query exists' )
  if length( check ) > 0 then
   do
    check = stream( fname, 'c', 'open' )
    if (check == 'READY') | (check == 'READY:') then
      result = 1
    else
     do
      result = 0
      say fname":" stream( InFile, 'D' )  /* display description about
possible error */
     end
   end
  else
   do
    say fname "not found"
    result = 0
   end
return result


/* function OpenReadFile( fname ) */
OpenReadFile: procedure
parse arg fname
  check = stream( fname, 'c', 'query exists' )
  if length( check ) > 0 then
   do
    check = stream( fname, 'c', 'open read' )
    if (check == 'READY') | (check == 'READY:') then
      result = 1
    else
     do
      result = 0
      say fname":" stream( InFile, 'D' )  /* display description about
possible error */
     end
   end
  else
   do
    say fname "not found"
    result = 0
   end
return result


/* function OpenWriteFile( fname ) */
OpenWriteFile: procedure
parse arg fname
  check = stream( fname, 'c', 'open write' )
  if (check == 'READY') | (check == 'READY:') then
    result = 1
  else
   do
    result = 0
    say fname":" stream( InFile, 'D' )  /* display description about possible
error */
   end
return result


/* function OpenAppendFile( fname ) */
OpenAppendFile: procedure
parse arg fname
  check = stream( fname, 'c', 'open write' )
  if (check == 'READY') | (check == 'READY:') then
   do
    result = 1
    check = stream( fname, 'C', 'seek <' 0 )     /* seek to end of file */
   end
  else
   do
    result = 0
    say fname":" stream( InFile, 'D' )  /* display description about possible
error */
   end
return result


/* function CloseFile( fname ) */
CloseFile: procedure
parse arg fname
  check = stream( fname, 'C', 'close' )
  if (check == 'READY') | (check == 'READY:') then
    result = 1
  else
   do
    result = 0
    say "Error closing" fname":" stream( InFile, 'D' )  /* display description 
about possible error */
   end
return


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

WB> net.hcc.nl ? My provider is hccnet.nl !

I've that account too.

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

... OS/2: Taking the wind out of Windows.
--- GoldED/2 3.0.1
 * Origin: Windows98 is a graphic DOS extender (2:500/143.7)
3615/7

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

From: Harry Bush                                        20-Nov-99 18:25:13
  To: Peter Knapper                                     20-Nov-99 20:10:06
Subj: Copying files and EA's...

Hello Peter!

Saturday November 20 1999 from Peter Knapper 3:772/1.10 to All:

 PK> If a file has EA's, does the OS/2 COPY command copy EA's -
 PK>  1. Between a file copied to the SAME partition?
 PK>  2. Between partitions/drives on the same machine?
 PK>  3. Between machines connected using OS/2 Peer Services?

 PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...

All three YES.  #3 - not only using OS/2 Peer Services but also to/from Warp
Server HPFS386 disks _and_, what's interesting, also to/from shared NTFS disks 
of WinNT 4 (Server or Workstation).  Certainly WinNT itself doesn't know
anything about OS/2 EA's, but it can store and retrieve EA's just OK. :-)
For example, best OS/2 image viewer - PMView - forms so called thumbnails
(small icon-like copies of image) inside EA of image file.  It does that
successfully even if image file at the moment happens to be on NTFS disk under 
WinNT system.

Best wishes,                                   Harry
                              Saturday November 20 1999 18:25
--- GoldEd 1.1.1.2
 * Origin: Info-Shelter (2:51/2)
209/7211
911

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

From: Peter Knapper                                     21-Nov-99 11:28:29
  To: Harry Bush                                        20-Nov-99 23:27:09
Subj: Copying files and EA's...

Hi Harry,

 PK>  3. Between machines connected using OS/2 Peer Services?

 PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...

 HB> All three YES.  #3 - not only using OS/2 Peer Services 
 HB> but also to/from Warp Server HPFS386 disks _and_, 
 HB> what's interesting, also to/from shared NTFS disks of 
 HB> WinNT 4 (Server or Workstation).  Certainly WinNT 
 HB> itself doesn't know anything about OS/2 EA's, but it 
 HB> can store and retrieve EA's just OK. :-)

Ok, that leads to my next question......;-) If the handling of EA's CAN be
replicated by other SMB environments, are they handled as part of SMB itself,
or does it require a specific "add-on" to the SMB implementation to be able to 
do this? IE, can ANY SMB peer handle EA's as part of File Serving? 

Thanks..........pk.


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

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

From: Francois Massonneau                               20-Nov-99 11:01:02
  To: David Noon                                        21-Nov-99 06:12:05
Subj: FrontDoor/Mailer and Re

Hello David!

As I do not know whether or not the first message I posted has been sent
(France is no longer connected to the rest of the world ;-( ), i post it again 
as I found another feed. I hope I will be sent this time.

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

/.. 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
Web  : http://www.worldnet.net/~island/

---
 * Origin: Island's BBS, a Node in the Atlantic Ocean (2:326/2)
209/7211
911

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

From: Harry Bush                                        21-Nov-99 11:54:17
  To: Peter Knapper                                     21-Nov-99 11:34:19
Subj: Copying files and EA's...

Hello Peter!

Sunday November 21 1999 from Peter Knapper 3:772/1.10 to Harry Bush:

 PK> Ok, that leads to my next question......;-) If the handling of EA's CAN
be
 PK> replicated by other SMB environments, are they handled as part of SMB
 PK> itself, or does it require a specific "add-on" to the SMB implementation
 PK> to be able to do this? IE, can ANY SMB peer handle EA's as part of File
 PK> Serving?

Could be, but I don't know for sure.  Seems like question for OS2LAN echo ;-)

Best wishes,                                   Harry
                              Sunday November 21 1999 11:54
--- GoldEd 1.1.1.2
 * Origin: Info-Shelter (2:51/2)
209/7211
911

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

From: MIKE RUSKAI                                       20-Nov-99 19:55:00
  To: PETER KNAPPER                                     21-Nov-99 21:30:15
Subj: Copying files and EA's...

Some senseless babbling from Peter Knapper to All
on 11-20-99  13:36 about Copying files and EA's......

 PK> Hi Folks,

 PK> I wanted to automate the copying of files from one machine to another
 PK> using REXX when a thought struck me. 

 PK> If a file has EA's, does the OS/2 COPY command copy EA's - 
 PK> 1. Between a file copied to the SAME partition?
 PK> 2. Between partitions/drives on the same machine?
 PK> 3. Between machines connected using OS/2 Peer Services? 

 PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...

 PK> Can similar/better functionality be performed using REXX commands,
 PK> ensuring that EA's are also copied in each of the above situations?

 PK> NB: I do not want to split off EA's and re-combine them later...

The answer to question one is always "yes".

For question two, it depends on whether or not the destination file system
supports EA's.  For FAT and HPFS, there are no problems.  But if you're
using a different file system through an IFS, it depends entirely on what
that file system supports.

Question three has the same answer, though beyond the file system on the
remote machine, the LAN protocol needs to provide for such a need.
Between two OS/2 machines, EA's are preserved without incident.  Between
OS/2 and a Win95 machine, no EA preservation, even though that machine
booted to OS/2 would support EA's.

Mike Ruskai
thannymeister@yahoo.com


... Hey Billy, are you sure they wrote Windoze in Basic?

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr2
 * Origin: FIDO QWK MAIL & MORE!  WWW.DOCSPLACE.ORG (1:3603/140)
209/7211
911

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

From: Tobias Ernst                                      21-Nov-99 18:27:24
  To: Peter Knapper                                     22-Nov-99 07:24:19
Subj: Copying files and EA's...

Hallo Peter!

 PK> Ok, that leads to my next question......;-) If the handling of EA's 
 PK> CAN be replicated by other SMB environments, are they handled as part 
 PK> of SMB itself, or does it require a specific "add-on" to the SMB 
 PK> implementation to be able to do this? IE, can ANY SMB peer handle 
 PK> EA's as part of File Serving? 

The Unix/Linux Samba server definitely cannot handle EAs. They are simply
discarded, and the Samba docs also say so. The Workplace shell also tells you
so (a warning message is issued that EAs will be lost when you try to move or
copy a file via drag&drop to a Samba share).

I think it would not be too hard to hack EA support into the Samba code if one 
invests the time to search for the specs, but then again, it was easier for me 
to just move the disk on which I needed EAs into my OS/2 Lan Server :-).

Viele Gre,
Tobias

--- Msged/LNX TE 06 (pre)
 * Origin: Running Redhat Linux (2:2476/418)

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

From: Roy J. Tellason                                   22-Nov-99 00:12:20
  To: MIKE RUSKAI                                       22-Nov-99 07:24:20
Subj: Copying files and EA's...

MIKE RUSKAI wrote in a message to PETER KNAPPER:

 MR> Some senseless babbling from Peter Knapper to All
 MR> on 11-20-99  13:36 about Copying files and EA's......

 PK> Hi Folks,

 PK> I wanted to automate the copying of files from one machine to another
 PK> using REXX when a thought struck me. 

 PK> If a file has EA's, does the OS/2 COPY command copy EA's - 
 PK> 1. Between a file copied to the SAME partition?
 PK> 2. Between partitions/drives on the same machine?
 PK> 3. Between machines connected using OS/2 Peer Services? 

 PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...

 PK> Can similar/better functionality be performed using REXX commands,
 PK> ensuring that EA's are also copied in each of the above situations?

 PK> NB: I do not want to split off EA's and re-combine them later...

 MR> The answer to question one is always "yes".

 MR> For question two, it depends on whether or not the
 MR> destination file system supports EA's.  For FAT and HPFS,
 MR> there are no problems.  But if you're using a different file
 MR> system through an IFS, it depends entirely on what that file
 MR> system supports.

 MR> Question three has the same answer, though beyond the file
 MR> system on the remote machine, the LAN protocol needs to
 MR> provide for such a need. Between two OS/2 machines, EA's are
 MR> preserved without incident.  Between OS/2 and a Win95
 MR> machine, no EA preservation, even though that machine booted
 MR> to OS/2 would support EA's.

How about between OS/2 and a Linux share using SAMBA?  :-)

--- 
 * Origin: TANSTAAFL BBS 717-838-8539 (1:270/615)

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

From: Peter Knapper                                     22-Nov-99 19:43:21
  To: Harry Bush                                        22-Nov-99 07:24:20
Subj: Copying files and EA's...

Hi Harry,


 PK> IE, can ANY SMB peer handle EA's as part of File Serving?

 HB> Could be, but I don't know for sure.  Seems like 
 HB> question for OS2LAN echo ;-)

Hmmmmmm, that seems like a reasonable idea, however you can't duck that
quickly....;-) 

So as far as REXX is concerned, I guess that using SysCopyObject() with full
path/filenames for copying over the LAN would probably be reasonably safe, as
far as copying EA's are concerned?

Cheers.............pk.


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

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

From: Peter Knapper                                     22-Nov-99 19:54:12
  To: Mike Ruskai                                       22-Nov-99 07:24:20
Subj: Copying files and EA's...

Hi Mike,

 MR> Question three has the same answer, though beyond the file system on the
 MR> remote machine, the LAN protocol needs to provide for such a need.
 MR> Between two OS/2 machines, EA's are preserved without incident.  Between
 MR> OS/2 and a Win95 machine, no EA preservation, even though that machine
 MR> booted to OS/2 would support EA's.

See my other message, in that case I would expect SysCopyObject() to provide
support for EA copying if BOTH source/destination systems are OS/2 on HPFS?

Cheers...........pk.


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

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

From: Peter Knapper                                     22-Nov-99 23:21:11
  To: Tobias Ernst                                      22-Nov-99 09:21:04
Subj: Copying files and EA's...

Hi Tobias,

 PK> IE, can ANY SMB peer handle EA's as part of File Serving? 

 TE> The Unix/Linux Samba server definitely cannot handle 
 TE> EAs. They are simply discarded, and the Samba docs also 
 TE> say so. The Workplace shell also tells you so (a 
 TE> warning message is issued that EAs will be lost when 
 TE> you try to move or copy a file via drag&drop to a Samba 
 TE> share).

Thanks for the confirmation, it was pretty much as I expected.

Cheers............pk.



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

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

From: Harry Bush                                        22-Nov-99 19:54:16
  To: Tobias Ernst                                      22-Nov-99 19:44:15
Subj: Copying files and EA's...

Hello Tobias!

Sunday November 21 1999 from Tobias Ernst 2:2476/418@fidonet to Peter Knapper:

 TE> it was easier for me to just move the disk on which I needed EAs into
 TE> my OS/2 Lan Server :-).

Right.  OS/2 does it's job very reliably - all that somebody might want from a 
file server.  And it keeps EA's just in the right way! ;-)

BTW, if somebody is interested, there is an IBM Redbook "Installing OS2 Warp
Server on Warp4" (wsonw4.pdf). It is written in Germany in 1997.  My main home 
Warp Server is installed exactly this way, plus IBM-made features to make
server and shares visible for WinNT and Winxx machines etc.

Best wishes,                                   Harry
                              Monday November 22 1999 19:54
--- GoldEd 1.1.1.2
 * Origin: Info-Shelter (2:51/2)

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

From: MIKE RUSKAI                                       22-Nov-99 11:32:00
  To: ROY J. TELLASON                                   23-Nov-99 06:06:09
Subj: Copying files and EA's...

Some senseless babbling from Roy J. Tellason to Mike Ruskai
on 11-22-99  00:12 about Copying files and EA's......

 RJT> MIKE RUSKAI wrote in a message to PETER KNAPPER:
 
[snip]

 MR> Question three has the same answer, though beyond the file
 MR> system on the remote machine, the LAN protocol needs to
 MR> provide for such a need. Between two OS/2 machines, EA's are
 MR> preserved without incident.  Between OS/2 and a Win95
 MR> machine, no EA preservation, even though that machine booted
 MR> to OS/2 would support EA's.

 RJT> How about between OS/2 and a Linux share using SAMBA?  :-)

I'll let you know when I try it.

Mike Ruskai
thannymeister@yahoo.com


... Looks like I picked the wrong day to quit drinking.

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr2
 * Origin: FIDO QWK MAIL & MORE!  WWW.DOCSPLACE.ORG (1:3603/140)

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

From: MIKE RUSKAI                                       22-Nov-99 11:32:00
  To: PETER KNAPPER                                     23-Nov-99 06:06:09
Subj: Copying files and EA's...

Some senseless babbling from Peter Knapper to Mike Ruskai
on 11-22-99  19:54 about Copying files and EA's......

 PK> Hi Mike,
 
 MR> Question three has the same answer, though beyond the file system on the
 MR> remote machine, the LAN protocol needs to provide for such a need.
 MR> Between two OS/2 machines, EA's are preserved without incident.  Between
 MR> OS/2 and a Win95 machine, no EA preservation, even though that machine
 MR> booted to OS/2 would support EA's.

 PK> See my other message, in that case I would expect SysCopyObject() to
 PK> provide support for EA copying if BOTH source/destination systems are
 PK> OS/2 on HPFS? 

Anything at all which calls the DosCopy() API will work, between two OS/2
LAN machines.  You don't need to be clever with REXX at all.

Mike Ruskai
thannymeister@yahoo.com


... 'If it ain't broke, you can probably still fix it.' - Tim Allen

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr2
 * Origin: FIDO QWK MAIL & MORE!  WWW.DOCSPLACE.ORG (1:3603/140)

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

From: Harry Bush                                        23-Nov-99 08:58:19
  To: Peter Knapper                                     23-Nov-99 09:10:04
Subj: Copying files and EA's...

Hello Peter!

Monday November 22 1999 from Peter Knapper 3:772/1.10 to Harry Bush:

 PK> So as far as REXX is concerned, I guess that using SysCopyObject() with
 PK> full path/filenames for copying over the LAN would probably be reasonably
 PK> safe, as far as copying EA's are concerned?

Do you mean using full path name kinda \\computer\directory\file instead of
Object ID?  Don't know if it would work even between OS/2 machines, in general 
case.  Haven't tried it that way.

Taylor (the guy who was mainly in charge for writing WPS) several years ago
told at one of conferences that he wanted to make WPS objects really shareable 
over networks, but AFAIK it wasn't done because of overall strangulation of
OS/2 at IBM (poo to IBM forever).  Pity because many nice things might
result... just for example, dropping some scheme from my computer onto shared
remote desktop would mean using scheme there.

Best wishes,                                   Harry
                              Tuesday November 23 1999 08:58
--- GoldEd 1.1.1.2
 * Origin: Info-Shelter (2:51/2)

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

From: Eddy Thilleman                                    22-Nov-99 19:57:05
  To: Francois Massonneau                               23-Nov-99 20:10:11
Subj: FrontDoor/Mailer and Re

Hello Francois,

20 Nov 99 11:01, Francois Massonneau wrote to David Noon:

FM> As I do not know whether or not the first message I posted has been
FM> sent (France is no longer connected to the rest of the world ;-( ), i
FM> post it again as I found another feed. I hope I will be sent this
FM> time.

your message was already sent out on 11 November 1999. :)

FM> but the windows that launched the script and the one where the dialer
FM> is running are still opened and wait for

if you start a program (including a REXX script) via the command processor
with the /C parameter then if that program ends the command processor ends and 
(if it's not running under another program) that session is closed
automatically.

See also the online command book CMDREF.INF the CMD entry.

you can let injoy quit automatically if nothing is going (checkout its
timeout)

FM> the signal the script must send to tell everything is done. so I left
FM> the "leave" statement.

I think the leave statement is not necessary, but I'm not sure in your case.

DN>> If InJoy can be monitored at all, you can do it from within the
DN>> current REXX program. Does InJoy write its output to stdout, allowing
DN>> it to be redirected? If so, you can use a REXX queue

You could check Injoy's trace option (look for "T R A C I N G" / "Capturing
Tech Data" / "Trace setup"
in the file userguid.txt in Injoy's docs directory), this can be output to
Injoy's window and/or to a
text file. This includes the date and time of events. stdout is not mentioned.

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

... WindowError:016 Door locked.  Try control-alt-delete
--- GoldED/2 3.0.1
 * Origin: Windows95 is a graphic DOS extender (2:500/143.7)

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

From: Peter Knapper                                     24-Nov-99 20:29:28
  To: Harry Bush                                        24-Nov-99 06:35:29
Subj: Copying files and EA's...

Hi Harry,

 PK> So as far as REXX is concerned, I guess that using 
 PK> SysCopyObject() with full path/filenames for copying 
 PK> over the LAN would probably be reasonably
 PK> safe, as far as copying EA's are concerned?

 HB> Do you mean using full path name kinda 
 HB> \\computer\directory\file instead of Object ID?  

Hmmm, I was actually thinking of copying using drive letters rather than a
UNC, however I am now not sure that I would want EA's copied in all cases..;-) 
I see others have comented on this also, so I guess I need to actually do some 
tests myself to see what happens.
 For example, the EA's for a REXX script may contain machine specific data
(EG: drive letters) that would probably need to change on another platform.
Without EA's REXX would automatically re-build it anyway, but if the REXX code 
HAD to change then there is not much point in copying EA's...

Cheers........pk.


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

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

From: Larry Snider                                      25-Nov-99 12:32:01
  To: All                                               26-Nov-99 03:58:15
Subj: SysCopyObject

Hi All,

Could someone please provide me with a working example of SysCopyObject
using fully specified file names?  For some reason, I cannot get it to
work.

I've tried it this way:

call SysCopyObject('e:\popuplog.os2', 'e:\SCO_popuplog.os2')

and

call SysCopyObject(test1, test2)

and

call SysCopyObject 'e:\popuplog.os2',  'e:\SCO_popuplog.os2'

and

call SysCopyObject test1, test2


I am running Object REXX and do load all of the RexxUtil functions.


Larry Snider
Larry.Snider@attglobal.net

--- Terminate 5.00/Pro [OS/2]
 * Origin: OS/2: Not just another pretty program loader! (1:109/921.52)

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

From: Larry Snider                                      25-Nov-99 13:05:28
  To: All                                               26-Nov-99 03:58:15
Subj: SysCopyObject

After reading the INF a little closer I noticed that destination can only
be a folder.  Since this is the case, how can I rename the copied file?


25-Nov-99 12:32:03, Larry Snider wrote to All
           Subject: SysCopyObject


 LS> Hi All,

 LS> Could someone please provide me with a working example of SysCopyObject
 LS> using fully specified file names?  For some reason, I cannot get it to
 LS> work.

 LS> I've tried it this way:

 LS> call SysCopyObject('e:\popuplog.os2', 'e:\SCO_popuplog.os2')

 LS> and

 LS> call SysCopyObject(test1, test2)

 LS> and

 LS> call SysCopyObject 'e:\popuplog.os2',  'e:\SCO_popuplog.os2'

 LS> and

 LS> call SysCopyObject test1, test2


 LS> I am running Object REXX and do load all of the RexxUtil functions.


 LS> Larry Snider
 LS> Larry.Snider@attglobal.net

 LS> -!- Terminate 5.00/Pro [OS/2]
 LS>  - Origin: OS/2: Not just another pretty program loader! (1:109/921.52)




Larry Snider
Larry.Snider@attglobal.net

--- Terminate 5.00/Pro [OS/2]
 * Origin: Researching:Plunckett,Seale,Sullivan,Brookshire,Jolly
(1:109/921.52)

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

From: David Noon                                        25-Nov-99 22:49:25
  To: Francois Massonneau                               26-Nov-99 12:58:17
Subj: FrontDoor/Mailer and Re

Hi Francois,

Replying to a message of Francois Massonneau to David Noon:

 FM> As I do not know whether or not the first message I posted has been
 FM> sent (France is no longer connected to the rest of the world ;-( ), i
 FM> post it again as I found another feed. I hope I will be sent this
 FM> time.

I saw your earlier message last month and replied.

 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 */

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

This should cause the REXX program to terminate in error. The LEAVE statement
applies to the context of a DO group, and removing the DO FOREVER removes that 
context.

 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.

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

What kind of signal? Does it post an event semaphore (not a file) instead?

 FM>> 3) At the end of the script, I saw you write two times (one before
 FM>> and one after the subroutine "StopDialler"), the following lines : 
 FM>> /* Reset elapsed time counter */  CALL TIME 'R' RETURN I suppose one
 FM>> is for the subroutine StartDialler, and the second one is for the
 FM>> 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.

 FM> Where ?

Down below ...

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

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

... right here! (Above)

 FM>   CALL DIRECTORY CurDir

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

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

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

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

 FM>   /* Reset elapsed time counter */
 FM>   CALL TIME 'R'
 FM> 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
 DN>> a 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
 DN>> StopDialler, the second one should have the correct elapsed time
 DN>> logged.

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

If you know the cost per second (or minute) then you can use the result
returned by the TIME('E') call to calculate the  cost of the call. It should
be simple multiplication.

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

It could be. I no longer have your code. If the variable DialpuLogFile
contains the full path/filename of your log file then the PingServer
subroutine will need to access it in order to write its results to the correct 
log file. In such a case you should either pass it as a parameter or expose it 
on the PROCEDURE statement.

Regards

Dave
<Team PL/I>

--- FleetStreet 1.24.1
 * Origin:  (2:257/609.5)

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

From: Peter Knapper                                     27-Nov-99 09:25:14
  To: David Noon                                        26-Nov-99 23:18:03
Subj: REXX FtpPing.

Hi David,

When talking to Francois Massonneau recently the subject of performing a PING
came up, so you may have an answer for this. 

Most of the REXX FTP functions appear to be implemented with some quite
lengthy timeouts, and it can take 1-2 minutes to decide that the remote end is 
not contactable. I tried to "test" for this using a single FtpPing, however if 
the destination/target system is not contactable, FtpPing suffers from the
same long timeout. Do you know of a way to alter the REXX FTP timeout period
to something like 10-20 seconds rather than 2 minutes?

Alternatively, can you (or someone else) suggest some REXX Sockets code to
perform the equivalent task, if the timeout periods can be controlled from
there?

Thanks.............pk.


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

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

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