home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 15 Message / 15-Message.zip / oe991127.zip / Rx991126.txt < prev    next >
Text File  |  1999-11-27  |  40KB  |  1,131 lines

  1.  
  2.                     Programming/using OS/2 REXX      (echo)
  3.  
  4.                  Saturday, 20-Nov-1999 to Friday, 26-Nov-1999
  5.  
  6. +----------------------------------------------------------------------------+
  7.  
  8. From: Peter Knapper                                     20-Nov-99 13:36:25
  9.   To: All                                               20-Nov-99 08:40:00
  10. Subj: Copying files and EA's...
  11.  
  12. Hi Folks,
  13.  
  14. I wanted to automate the copying of files from one machine to another using
  15. REXX when a thought struck me. 
  16.  
  17. If a file has EA's, does the OS/2 COPY command copy EA's - 
  18.  1. Between a file copied to the SAME partition?
  19.  2. Between partitions/drives on the same machine?
  20.  3. Between machines connected using OS/2 Peer Services? 
  21.  
  22. I would expect 1 to be YES, 2 to be YES, 3 possibly...
  23.  
  24. Can similar/better functionality be performed using REXX commands, ensuring
  25. that EA's are also copied in each of the above situations?
  26.  
  27. NB: I do not want to split off EA's and re-combine them later...
  28.  
  29. Cheers...............pk.
  30.  
  31.  
  32. --- Maximus/2 3.01
  33.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  34.  
  35. +----------------------------------------------------------------------------+
  36.  
  37. From: Eddy Thilleman                                    18-Nov-99 20:40:25
  38.   To: Wim Bijlenga                                      20-Nov-99 15:43:20
  39. Subj: general open file routines
  40.  
  41. Hello Wim,
  42.  
  43. 16 Nov 99 08:23, Wim Bijlenga wrote to Eddy Thilleman:
  44.  
  45. ET>> I've written some (I hope) general (ofcourse) REXX file routines,
  46. ET>> with internal checking for file errors, these can be used as
  47. ET>> functions. Is there interest?
  48.  
  49. WB> Yes
  50.  
  51. You're the first to ask for it.
  52.  
  53. I've made these routines to make it easier to open, read/write and close
  54. files, and not have to code the checks, etc (write once, use many times). I
  55. just want to write something like openfile in the main code and not to have to 
  56. think about all the hassle to handle error situations (like file not present,
  57. or file is present but (for some reason) it can't be opened, etc.
  58.  
  59. /* file I/O subroutines */
  60.  
  61. /* search text in file and if found, returns that line */
  62. Search: procedure
  63. parse arg file, text
  64. found = 0
  65.   check = stream( file, 'C', "seek =1" )    /* seek to begin of file */
  66.   do while (Lines( file ) = 1) & \found     /* while not end of file and text
  67. not found */
  68.     Line = strip( LineIn( file ) )          /* read new line */
  69.     if Length( Line ) > 0 then do           /* if Line not empty */
  70.       if pos( translate(text), translate(Line) ) > 0 then do
  71.         found = 1
  72.       end  /* if text is found */
  73.     end  /* if Line not empty */
  74.   end  /* while not end of file */
  75.   if \found then Line = ""           /* if text not found, return empty line
  76. */
  77. return Line
  78.  
  79.  
  80. /* function OpenFile( fname ) */
  81. OpenFile: procedure
  82. parse arg fname
  83.   check = stream( fname, 'c', 'query exists' )
  84.   if length( check ) > 0 then
  85.    do
  86.     check = stream( fname, 'c', 'open' )
  87.     if (check == 'READY') | (check == 'READY:') then
  88.       result = 1
  89.     else
  90.      do
  91.       result = 0
  92.       say fname":" stream( InFile, 'D' )  /* display description about
  93. possible error */
  94.      end
  95.    end
  96.   else
  97.    do
  98.     say fname "not found"
  99.     result = 0
  100.    end
  101. return result
  102.  
  103.  
  104. /* function OpenReadFile( fname ) */
  105. OpenReadFile: procedure
  106. parse arg fname
  107.   check = stream( fname, 'c', 'query exists' )
  108.   if length( check ) > 0 then
  109.    do
  110.     check = stream( fname, 'c', 'open read' )
  111.     if (check == 'READY') | (check == 'READY:') then
  112.       result = 1
  113.     else
  114.      do
  115.       result = 0
  116.       say fname":" stream( InFile, 'D' )  /* display description about
  117. possible error */
  118.      end
  119.    end
  120.   else
  121.    do
  122.     say fname "not found"
  123.     result = 0
  124.    end
  125. return result
  126.  
  127.  
  128. /* function OpenWriteFile( fname ) */
  129. OpenWriteFile: procedure
  130. parse arg fname
  131.   check = stream( fname, 'c', 'open write' )
  132.   if (check == 'READY') | (check == 'READY:') then
  133.     result = 1
  134.   else
  135.    do
  136.     result = 0
  137.     say fname":" stream( InFile, 'D' )  /* display description about possible
  138. error */
  139.    end
  140. return result
  141.  
  142.  
  143. /* function OpenAppendFile( fname ) */
  144. OpenAppendFile: procedure
  145. parse arg fname
  146.   check = stream( fname, 'c', 'open write' )
  147.   if (check == 'READY') | (check == 'READY:') then
  148.    do
  149.     result = 1
  150.     check = stream( fname, 'C', 'seek <' 0 )     /* seek to end of file */
  151.    end
  152.   else
  153.    do
  154.     result = 0
  155.     say fname":" stream( InFile, 'D' )  /* display description about possible
  156. error */
  157.    end
  158. return result
  159.  
  160.  
  161. /* function CloseFile( fname ) */
  162. CloseFile: procedure
  163. parse arg fname
  164.   check = stream( fname, 'C', 'close' )
  165.   if (check == 'READY') | (check == 'READY:') then
  166.     result = 1
  167.   else
  168.    do
  169.     result = 0
  170.     say "Error closing" fname":" stream( InFile, 'D' )  /* display description 
  171. about possible error */
  172.    end
  173. return
  174.  
  175.  
  176. ET>>   Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl
  177.  
  178. WB> net.hcc.nl ? My provider is hccnet.nl !
  179.  
  180. I've that account too.
  181.  
  182.   Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl
  183.  
  184. ... OS/2: Taking the wind out of Windows.
  185. --- GoldED/2 3.0.1
  186.  * Origin: Windows98 is a graphic DOS extender (2:500/143.7)
  187. 3615/7
  188.  
  189. +----------------------------------------------------------------------------+
  190.  
  191. From: Harry Bush                                        20-Nov-99 18:25:13
  192.   To: Peter Knapper                                     20-Nov-99 20:10:06
  193. Subj: Copying files and EA's...
  194.  
  195. Hello Peter!
  196.  
  197. Saturday November 20 1999 from Peter Knapper 3:772/1.10 to All:
  198.  
  199.  PK> If a file has EA's, does the OS/2 COPY command copy EA's -
  200.  PK>  1. Between a file copied to the SAME partition?
  201.  PK>  2. Between partitions/drives on the same machine?
  202.  PK>  3. Between machines connected using OS/2 Peer Services?
  203.  
  204.  PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...
  205.  
  206. All three YES.  #3 - not only using OS/2 Peer Services but also to/from Warp
  207. Server HPFS386 disks _and_, what's interesting, also to/from shared NTFS disks 
  208. of WinNT 4 (Server or Workstation).  Certainly WinNT itself doesn't know
  209. anything about OS/2 EA's, but it can store and retrieve EA's just OK. :-)
  210. For example, best OS/2 image viewer - PMView - forms so called thumbnails
  211. (small icon-like copies of image) inside EA of image file.  It does that
  212. successfully even if image file at the moment happens to be on NTFS disk under 
  213. WinNT system.
  214.  
  215. Best wishes,                                   Harry
  216.                               Saturday November 20 1999 18:25
  217. --- GoldEd 1.1.1.2
  218.  * Origin: Info-Shelter (2:51/2)
  219. 209/7211
  220. 911
  221.  
  222. +----------------------------------------------------------------------------+
  223.  
  224. From: Peter Knapper                                     21-Nov-99 11:28:29
  225.   To: Harry Bush                                        20-Nov-99 23:27:09
  226. Subj: Copying files and EA's...
  227.  
  228. Hi Harry,
  229.  
  230.  PK>  3. Between machines connected using OS/2 Peer Services?
  231.  
  232.  PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...
  233.  
  234.  HB> All three YES.  #3 - not only using OS/2 Peer Services 
  235.  HB> but also to/from Warp Server HPFS386 disks _and_, 
  236.  HB> what's interesting, also to/from shared NTFS disks of 
  237.  HB> WinNT 4 (Server or Workstation).  Certainly WinNT 
  238.  HB> itself doesn't know anything about OS/2 EA's, but it 
  239.  HB> can store and retrieve EA's just OK. :-)
  240.  
  241. Ok, that leads to my next question......;-) If the handling of EA's CAN be
  242. replicated by other SMB environments, are they handled as part of SMB itself,
  243. or does it require a specific "add-on" to the SMB implementation to be able to 
  244. do this? IE, can ANY SMB peer handle EA's as part of File Serving? 
  245.  
  246. Thanks..........pk.
  247.  
  248.  
  249. --- Maximus/2 3.01
  250.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  251.  
  252. +----------------------------------------------------------------------------+
  253.  
  254. From: Francois Massonneau                               20-Nov-99 11:01:02
  255.   To: David Noon                                        21-Nov-99 06:12:05
  256. Subj: FrontDoor/Mailer and Re
  257.  
  258. Hello David!
  259.  
  260. As I do not know whether or not the first message I posted has been sent
  261. (France is no longer connected to the rest of the world ;-( ), i post it again 
  262. as I found another feed. I hope I will be sent this time.
  263.  
  264. ------------------------------------------------------------------------------
  265.  
  266. /.. On (Le) 10-24-99 20:33,
  267.     Subject (Sujet) : FrontDoor/Mailser and Re,
  268.     David Noon wrote to (ecrivait a) Francois Massonneau ../
  269.  
  270. Hi David,
  271.  
  272. Sorry for the delay, I'm just back home but for a few days only.
  273.  
  274.  DN> I would use = rather than == to compare the value to zero.
  275.  
  276.  DN>     if files.0 = 0 then
  277.  
  278. OK, I changed that.
  279.  
  280.  FM>I removed the "do forever" at the beginning and the "end" at the end of
  281.  FM>the script.
  282.  
  283.  DN> This means it will terminate after one poll. Also, the conditional
  284.  DN> leave statement (mentioned above for its IF part) will need to be
  285.  DN> changed to:
  286.  
  287.  DN>      if files.0 = 0 then
  288.  DN>          exit 0 /* was leave */
  289.  
  290. I did that, but it doesn't work as expected.
  291. If I put "exit 0", when no more files are in the subdirectory, the
  292. window is closed, but the windows that launched the script and the one
  293. where the dialer is running are still opened and wait for the signal the
  294. script must send to tell everything is done.
  295. so I left the "leave" statement.
  296.  
  297.  FM>And finally I removed those lines :
  298.  FM>  call SysSleep SleepTime
  299.  FM>  call stream SemaMailer, 'c', 'open write'
  300.  FM>  call lineout SemaMailer, 'inetmail semafore file'
  301.  FM>  call stream SemaMailer, 'c', 'close'
  302.  
  303.  DN> So you are no longer using a semphore file.
  304.  
  305. It's no longer a semafore file, but the script sends a signal to HWAIT.
  306.  
  307.  FM>3) At the end of the script, I saw you write two times (one before and
  308.  FM>one after the subroutine "StopDialler"), the following lines :
  309.  FM>  /* Reset elapsed time counter */
  310.  FM>  CALL TIME 'R'
  311.  FM>RETURN
  312.  FM>I suppose one is for the subroutine StartDialler, and the second one is
  313.  FM>for the subroutine StopDialler. Is it a code to give the time on line ?
  314.  
  315.  DN> It is part of that code.
  316.  
  317.  DN> There should be a TIME('E') call somewhere in the StopDialler
  318.  DN> subroutine that should display the elapsed time.
  319.  
  320. Where ?
  321. May I put at the beginning :
  322. CALL TIME('E')
  323. for example, just after the "CALL DIRECTORY DialerDir" statement and
  324. before the "ADDRESS 'CMD' KillDialer" line ?
  325. This is the subroutine you wrote :
  326. /* Subroutine to stop the dialer program and its related address spaces
  327. */
  328. StopDialer:
  329. PROCEDURE EXPOSE DialupLogFile DialerDir KillDialer kill inetmail pop3d
  330. smtpd
  331.   CurDir = DIRECTORY()
  332.   CALL DIRECTORY DialerDir
  333.  
  334.   ADDRESS 'CMD' KillDialer
  335.   CALL LogMsg 'dialer, if running, is killed.'
  336.   CALL LogMsg 'Dialer disconnected after ' || TIME('E') || '
  337.   seconds.'
  338.  
  339.   CALL DIRECTORY CurDir
  340.  
  341.   ADDRESS 'CMD' kill inetmail
  342.   CALL LogMsg 'inetmail, if running, is killed.'
  343.  
  344.   ADDRESS 'CMD' kill pop3d
  345.   CALL LogMsg 'pop3d process, if running, is killed.'
  346.  
  347.   ADDRESS 'CMD' kill smtpd
  348.   CALL LogMsg 'smtpd process, if running, is killed.'
  349.  
  350.   CALL SysSleep 2    /* just give it a little time to shut down... */
  351.  
  352.   /* Reset elapsed time counter */
  353.   CALL TIME 'R'
  354. RETURN
  355.  
  356.  FM>If so, where in the log file do I find it ??
  357.  
  358.  FM>22 Oct 1999 08:32:54  Dialler disconnected after 0 seconds.
  359.  
  360.  DN> Here. For some reason the elapsed timer has been reset again, giving a
  361.  DN> time of zero seconds.
  362.  
  363.  FM>So the time on line is not 0 second, but about 8 minutes.
  364.  
  365.  DN> That would be about 480 seconds then. That is what should have been
  366.  DN> returned by the TIME('E') call. Since there are 2 calls to StopDialler,
  367.  DN> the second one should have the correct elapsed time logged.
  368.  
  369. OK.
  370. Is it possible to add something to the routine to give the cost of the
  371. call. One parameter could be the cost for one minute on line
  372. "CostperMinute", and at the end of each run, the log could record the
  373. total time on line, and the resulting cost ?
  374.  
  375. I saw a problem with the log generated.
  376. A file is created in my root directory, named DIALUPLOGFILE. In it I
  377. have all the sentences that should be put in the dialup.log file, but
  378. the sentences are the ones generated by the PingServer Procedure.
  379. It seems that a "CALL LogMsg ..." statement contained in the PingServer
  380. procedure is not written in the dialup.log file, but in a dialuplogfile
  381. file in my root directory.
  382. Is it because I have the beginning of the procedure written that way :
  383. PingServer:
  384. procedure
  385.   call LogMsg 'PingServer starting'
  386.   .../.
  387. instead of :
  388. PingServer:
  389. PROCEDURE EXPOSE DialupLogFile
  390.   call LogMsg 'PingServer starting'
  391.   .../.
  392.  
  393.  FM>4) From time to time Injoy (the dialler), gives me problems as I said
  394.  
  395.  FM>Is there a way to check what's going on with the dialler,
  396.  FM>restart the BBS node ?
  397.  
  398.  DN> Not a good idea. You would then need this REXX program to monitor the
  399.  DN> other REXX program. If InJoy can be monitored at all, you can do it
  400.  DN> from within the current REXX program. Does InJoy write its output to
  401.  DN> stdout, allowing it to be redirected? If so, you can use a REXX queue
  402.  
  403.  I don't know. I'm gonna try to find out.
  404.  
  405. --------------------------------------------------------------------------
  406.  
  407. Bye, Francois!
  408.  
  409.  
  410. Email: fmas@celtes.com
  411. Web  : http://www.worldnet.net/~island/
  412.  
  413. ---
  414.  * Origin: Island's BBS, a Node in the Atlantic Ocean (2:326/2)
  415. 209/7211
  416. 911
  417.  
  418. +----------------------------------------------------------------------------+
  419.  
  420. From: Harry Bush                                        21-Nov-99 11:54:17
  421.   To: Peter Knapper                                     21-Nov-99 11:34:19
  422. Subj: Copying files and EA's...
  423.  
  424. Hello Peter!
  425.  
  426. Sunday November 21 1999 from Peter Knapper 3:772/1.10 to Harry Bush:
  427.  
  428.  PK> Ok, that leads to my next question......;-) If the handling of EA's CAN
  429. be
  430.  PK> replicated by other SMB environments, are they handled as part of SMB
  431.  PK> itself, or does it require a specific "add-on" to the SMB implementation
  432.  PK> to be able to do this? IE, can ANY SMB peer handle EA's as part of File
  433.  PK> Serving?
  434.  
  435. Could be, but I don't know for sure.  Seems like question for OS2LAN echo ;-)
  436.  
  437. Best wishes,                                   Harry
  438.                               Sunday November 21 1999 11:54
  439. --- GoldEd 1.1.1.2
  440.  * Origin: Info-Shelter (2:51/2)
  441. 209/7211
  442. 911
  443.  
  444. +----------------------------------------------------------------------------+
  445.  
  446. From: MIKE RUSKAI                                       20-Nov-99 19:55:00
  447.   To: PETER KNAPPER                                     21-Nov-99 21:30:15
  448. Subj: Copying files and EA's...
  449.  
  450. Some senseless babbling from Peter Knapper to All
  451. on 11-20-99  13:36 about Copying files and EA's......
  452.  
  453.  PK> Hi Folks,
  454.  
  455.  PK> I wanted to automate the copying of files from one machine to another
  456.  PK> using REXX when a thought struck me. 
  457.  
  458.  PK> If a file has EA's, does the OS/2 COPY command copy EA's - 
  459.  PK> 1. Between a file copied to the SAME partition?
  460.  PK> 2. Between partitions/drives on the same machine?
  461.  PK> 3. Between machines connected using OS/2 Peer Services? 
  462.  
  463.  PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...
  464.  
  465.  PK> Can similar/better functionality be performed using REXX commands,
  466.  PK> ensuring that EA's are also copied in each of the above situations?
  467.  
  468.  PK> NB: I do not want to split off EA's and re-combine them later...
  469.  
  470. The answer to question one is always "yes".
  471.  
  472. For question two, it depends on whether or not the destination file system
  473. supports EA's.  For FAT and HPFS, there are no problems.  But if you're
  474. using a different file system through an IFS, it depends entirely on what
  475. that file system supports.
  476.  
  477. Question three has the same answer, though beyond the file system on the
  478. remote machine, the LAN protocol needs to provide for such a need.
  479. Between two OS/2 machines, EA's are preserved without incident.  Between
  480. OS/2 and a Win95 machine, no EA preservation, even though that machine
  481. booted to OS/2 would support EA's.
  482.  
  483. Mike Ruskai
  484. thannymeister@yahoo.com
  485.  
  486.  
  487. ... Hey Billy, are you sure they wrote Windoze in Basic?
  488.  
  489. ___ Blue Wave/QWK v2.20
  490. --- Platinum Xpress/Win/Wildcat5! v3.0pr2
  491.  * Origin: FIDO QWK MAIL & MORE!  WWW.DOCSPLACE.ORG (1:3603/140)
  492. 209/7211
  493. 911
  494.  
  495. +----------------------------------------------------------------------------+
  496.  
  497. From: Tobias Ernst                                      21-Nov-99 18:27:24
  498.   To: Peter Knapper                                     22-Nov-99 07:24:19
  499. Subj: Copying files and EA's...
  500.  
  501. Hallo Peter!
  502.  
  503.  PK> Ok, that leads to my next question......;-) If the handling of EA's 
  504.  PK> CAN be replicated by other SMB environments, are they handled as part 
  505.  PK> of SMB itself, or does it require a specific "add-on" to the SMB 
  506.  PK> implementation to be able to do this? IE, can ANY SMB peer handle 
  507.  PK> EA's as part of File Serving? 
  508.  
  509. The Unix/Linux Samba server definitely cannot handle EAs. They are simply
  510. discarded, and the Samba docs also say so. The Workplace shell also tells you
  511. so (a warning message is issued that EAs will be lost when you try to move or
  512. copy a file via drag&drop to a Samba share).
  513.  
  514. I think it would not be too hard to hack EA support into the Samba code if one 
  515. invests the time to search for the specs, but then again, it was easier for me 
  516. to just move the disk on which I needed EAs into my OS/2 Lan Server :-).
  517.  
  518. Viele Grüße,
  519. Tobias
  520.  
  521. --- Msged/LNX TE 06 (pre)
  522.  * Origin: Running Redhat Linux (2:2476/418)
  523.  
  524. +----------------------------------------------------------------------------+
  525.  
  526. From: Roy J. Tellason                                   22-Nov-99 00:12:20
  527.   To: MIKE RUSKAI                                       22-Nov-99 07:24:20
  528. Subj: Copying files and EA's...
  529.  
  530. MIKE RUSKAI wrote in a message to PETER KNAPPER:
  531.  
  532.  MR> Some senseless babbling from Peter Knapper to All
  533.  MR> on 11-20-99  13:36 about Copying files and EA's......
  534.  
  535.  PK> Hi Folks,
  536.  
  537.  PK> I wanted to automate the copying of files from one machine to another
  538.  PK> using REXX when a thought struck me. 
  539.  
  540.  PK> If a file has EA's, does the OS/2 COPY command copy EA's - 
  541.  PK> 1. Between a file copied to the SAME partition?
  542.  PK> 2. Between partitions/drives on the same machine?
  543.  PK> 3. Between machines connected using OS/2 Peer Services? 
  544.  
  545.  PK> I would expect 1 to be YES, 2 to be YES, 3 possibly...
  546.  
  547.  PK> Can similar/better functionality be performed using REXX commands,
  548.  PK> ensuring that EA's are also copied in each of the above situations?
  549.  
  550.  PK> NB: I do not want to split off EA's and re-combine them later...
  551.  
  552.  MR> The answer to question one is always "yes".
  553.  
  554.  MR> For question two, it depends on whether or not the
  555.  MR> destination file system supports EA's.  For FAT and HPFS,
  556.  MR> there are no problems.  But if you're using a different file
  557.  MR> system through an IFS, it depends entirely on what that file
  558.  MR> system supports.
  559.  
  560.  MR> Question three has the same answer, though beyond the file
  561.  MR> system on the remote machine, the LAN protocol needs to
  562.  MR> provide for such a need. Between two OS/2 machines, EA's are
  563.  MR> preserved without incident.  Between OS/2 and a Win95
  564.  MR> machine, no EA preservation, even though that machine booted
  565.  MR> to OS/2 would support EA's.
  566.  
  567. How about between OS/2 and a Linux share using SAMBA?  :-)
  568.  
  569. --- 
  570.  * Origin: TANSTAAFL BBS 717-838-8539 (1:270/615)
  571.  
  572. +----------------------------------------------------------------------------+
  573.  
  574. From: Peter Knapper                                     22-Nov-99 19:43:21
  575.   To: Harry Bush                                        22-Nov-99 07:24:20
  576. Subj: Copying files and EA's...
  577.  
  578. Hi Harry,
  579.  
  580.  
  581.  PK> IE, can ANY SMB peer handle EA's as part of File Serving?
  582.  
  583.  HB> Could be, but I don't know for sure.  Seems like 
  584.  HB> question for OS2LAN echo ;-)
  585.  
  586. Hmmmmmm, that seems like a reasonable idea, however you can't duck that
  587. quickly....;-) 
  588.  
  589. So as far as REXX is concerned, I guess that using SysCopyObject() with full
  590. path/filenames for copying over the LAN would probably be reasonably safe, as
  591. far as copying EA's are concerned?
  592.  
  593. Cheers.............pk.
  594.  
  595.  
  596. --- Maximus/2 3.01
  597.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  598.  
  599. +----------------------------------------------------------------------------+
  600.  
  601. From: Peter Knapper                                     22-Nov-99 19:54:12
  602.   To: Mike Ruskai                                       22-Nov-99 07:24:20
  603. Subj: Copying files and EA's...
  604.  
  605. Hi Mike,
  606.  
  607.  MR> Question three has the same answer, though beyond the file system on the
  608.  MR> remote machine, the LAN protocol needs to provide for such a need.
  609.  MR> Between two OS/2 machines, EA's are preserved without incident.  Between
  610.  MR> OS/2 and a Win95 machine, no EA preservation, even though that machine
  611.  MR> booted to OS/2 would support EA's.
  612.  
  613. See my other message, in that case I would expect SysCopyObject() to provide
  614. support for EA copying if BOTH source/destination systems are OS/2 on HPFS?
  615.  
  616. Cheers...........pk.
  617.  
  618.  
  619. --- Maximus/2 3.01
  620.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  621.  
  622. +----------------------------------------------------------------------------+
  623.  
  624. From: Peter Knapper                                     22-Nov-99 23:21:11
  625.   To: Tobias Ernst                                      22-Nov-99 09:21:04
  626. Subj: Copying files and EA's...
  627.  
  628. Hi Tobias,
  629.  
  630.  PK> IE, can ANY SMB peer handle EA's as part of File Serving? 
  631.  
  632.  TE> The Unix/Linux Samba server definitely cannot handle 
  633.  TE> EAs. They are simply discarded, and the Samba docs also 
  634.  TE> say so. The Workplace shell also tells you so (a 
  635.  TE> warning message is issued that EAs will be lost when 
  636.  TE> you try to move or copy a file via drag&drop to a Samba 
  637.  TE> share).
  638.  
  639. Thanks for the confirmation, it was pretty much as I expected.
  640.  
  641. Cheers............pk.
  642.  
  643.  
  644.  
  645. --- Maximus/2 3.01
  646.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  647.  
  648. +----------------------------------------------------------------------------+
  649.  
  650. From: Harry Bush                                        22-Nov-99 19:54:16
  651.   To: Tobias Ernst                                      22-Nov-99 19:44:15
  652. Subj: Copying files and EA's...
  653.  
  654. Hello Tobias!
  655.  
  656. Sunday November 21 1999 from Tobias Ernst 2:2476/418@fidonet to Peter Knapper:
  657.  
  658.  TE> it was easier for me to just move the disk on which I needed EAs into
  659.  TE> my OS/2 Lan Server :-).
  660.  
  661. Right.  OS/2 does it's job very reliably - all that somebody might want from a 
  662. file server.  And it keeps EA's just in the right way! ;-)
  663.  
  664. BTW, if somebody is interested, there is an IBM Redbook "Installing OS2 Warp
  665. Server on Warp4" (wsonw4.pdf). It is written in Germany in 1997.  My main home 
  666. Warp Server is installed exactly this way, plus IBM-made features to make
  667. server and shares visible for WinNT and Winxx machines etc.
  668.  
  669. Best wishes,                                   Harry
  670.                               Monday November 22 1999 19:54
  671. --- GoldEd 1.1.1.2
  672.  * Origin: Info-Shelter (2:51/2)
  673.  
  674. +----------------------------------------------------------------------------+
  675.  
  676. From: MIKE RUSKAI                                       22-Nov-99 11:32:00
  677.   To: ROY J. TELLASON                                   23-Nov-99 06:06:09
  678. Subj: Copying files and EA's...
  679.  
  680. Some senseless babbling from Roy J. Tellason to Mike Ruskai
  681. on 11-22-99  00:12 about Copying files and EA's......
  682.  
  683.  RJT> MIKE RUSKAI wrote in a message to PETER KNAPPER:
  684.  
  685. [snip]
  686.  
  687.  MR> Question three has the same answer, though beyond the file
  688.  MR> system on the remote machine, the LAN protocol needs to
  689.  MR> provide for such a need. Between two OS/2 machines, EA's are
  690.  MR> preserved without incident.  Between OS/2 and a Win95
  691.  MR> machine, no EA preservation, even though that machine booted
  692.  MR> to OS/2 would support EA's.
  693.  
  694.  RJT> How about between OS/2 and a Linux share using SAMBA?  :-)
  695.  
  696. I'll let you know when I try it.
  697.  
  698. Mike Ruskai
  699. thannymeister@yahoo.com
  700.  
  701.  
  702. ... Looks like I picked the wrong day to quit drinking.
  703.  
  704. ___ Blue Wave/QWK v2.20
  705. --- Platinum Xpress/Win/Wildcat5! v3.0pr2
  706.  * Origin: FIDO QWK MAIL & MORE!  WWW.DOCSPLACE.ORG (1:3603/140)
  707.  
  708. +----------------------------------------------------------------------------+
  709.  
  710. From: MIKE RUSKAI                                       22-Nov-99 11:32:00
  711.   To: PETER KNAPPER                                     23-Nov-99 06:06:09
  712. Subj: Copying files and EA's...
  713.  
  714. Some senseless babbling from Peter Knapper to Mike Ruskai
  715. on 11-22-99  19:54 about Copying files and EA's......
  716.  
  717.  PK> Hi Mike,
  718.  
  719.  MR> Question three has the same answer, though beyond the file system on the
  720.  MR> remote machine, the LAN protocol needs to provide for such a need.
  721.  MR> Between two OS/2 machines, EA's are preserved without incident.  Between
  722.  MR> OS/2 and a Win95 machine, no EA preservation, even though that machine
  723.  MR> booted to OS/2 would support EA's.
  724.  
  725.  PK> See my other message, in that case I would expect SysCopyObject() to
  726.  PK> provide support for EA copying if BOTH source/destination systems are
  727.  PK> OS/2 on HPFS? 
  728.  
  729. Anything at all which calls the DosCopy() API will work, between two OS/2
  730. LAN machines.  You don't need to be clever with REXX at all.
  731.  
  732. Mike Ruskai
  733. thannymeister@yahoo.com
  734.  
  735.  
  736. ... 'If it ain't broke, you can probably still fix it.' - Tim Allen
  737.  
  738. ___ Blue Wave/QWK v2.20
  739. --- Platinum Xpress/Win/Wildcat5! v3.0pr2
  740.  * Origin: FIDO QWK MAIL & MORE!  WWW.DOCSPLACE.ORG (1:3603/140)
  741.  
  742. +----------------------------------------------------------------------------+
  743.  
  744. From: Harry Bush                                        23-Nov-99 08:58:19
  745.   To: Peter Knapper                                     23-Nov-99 09:10:04
  746. Subj: Copying files and EA's...
  747.  
  748. Hello Peter!
  749.  
  750. Monday November 22 1999 from Peter Knapper 3:772/1.10 to Harry Bush:
  751.  
  752.  PK> So as far as REXX is concerned, I guess that using SysCopyObject() with
  753.  PK> full path/filenames for copying over the LAN would probably be reasonably
  754.  PK> safe, as far as copying EA's are concerned?
  755.  
  756. Do you mean using full path name kinda \\computer\directory\file instead of
  757. Object ID?  Don't know if it would work even between OS/2 machines, in general 
  758. case.  Haven't tried it that way.
  759.  
  760. Taylor (the guy who was mainly in charge for writing WPS) several years ago
  761. told at one of conferences that he wanted to make WPS objects really shareable 
  762. over networks, but AFAIK it wasn't done because of overall strangulation of
  763. OS/2 at IBM (poo to IBM forever).  Pity because many nice things might
  764. result... just for example, dropping some scheme from my computer onto shared
  765. remote desktop would mean using scheme there.
  766.  
  767. Best wishes,                                   Harry
  768.                               Tuesday November 23 1999 08:58
  769. --- GoldEd 1.1.1.2
  770.  * Origin: Info-Shelter (2:51/2)
  771.  
  772. +----------------------------------------------------------------------------+
  773.  
  774. From: Eddy Thilleman                                    22-Nov-99 19:57:05
  775.   To: Francois Massonneau                               23-Nov-99 20:10:11
  776. Subj: FrontDoor/Mailer and Re
  777.  
  778. Hello Francois,
  779.  
  780. 20 Nov 99 11:01, Francois Massonneau wrote to David Noon:
  781.  
  782. FM> As I do not know whether or not the first message I posted has been
  783. FM> sent (France is no longer connected to the rest of the world ;-( ), i
  784. FM> post it again as I found another feed. I hope I will be sent this
  785. FM> time.
  786.  
  787. your message was already sent out on 11 November 1999. :)
  788.  
  789. FM> but the windows that launched the script and the one where the dialer
  790. FM> is running are still opened and wait for
  791.  
  792. if you start a program (including a REXX script) via the command processor
  793. with the /C parameter then if that program ends the command processor ends and 
  794. (if it's not running under another program) that session is closed
  795. automatically.
  796.  
  797. See also the online command book CMDREF.INF the CMD entry.
  798.  
  799. you can let injoy quit automatically if nothing is going (checkout its
  800. timeout)
  801.  
  802. FM> the signal the script must send to tell everything is done. so I left
  803. FM> the "leave" statement.
  804.  
  805. I think the leave statement is not necessary, but I'm not sure in your case.
  806.  
  807. DN>> If InJoy can be monitored at all, you can do it from within the
  808. DN>> current REXX program. Does InJoy write its output to stdout, allowing
  809. DN>> it to be redirected? If so, you can use a REXX queue
  810.  
  811. You could check Injoy's trace option (look for "T R A C I N G" / "Capturing
  812. Tech Data" / "Trace setup"
  813. in the file userguid.txt in Injoy's docs directory), this can be output to
  814. Injoy's window and/or to a
  815. text file. This includes the date and time of events. stdout is not mentioned.
  816.  
  817.   Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl
  818.  
  819. ... WindowError:016 Door locked.  Try control-alt-delete
  820. --- GoldED/2 3.0.1
  821.  * Origin: Windows95 is a graphic DOS extender (2:500/143.7)
  822.  
  823. +----------------------------------------------------------------------------+
  824.  
  825. From: Peter Knapper                                     24-Nov-99 20:29:28
  826.   To: Harry Bush                                        24-Nov-99 06:35:29
  827. Subj: Copying files and EA's...
  828.  
  829. Hi Harry,
  830.  
  831.  PK> So as far as REXX is concerned, I guess that using 
  832.  PK> SysCopyObject() with full path/filenames for copying 
  833.  PK> over the LAN would probably be reasonably
  834.  PK> safe, as far as copying EA's are concerned?
  835.  
  836.  HB> Do you mean using full path name kinda 
  837.  HB> \\computer\directory\file instead of Object ID?  
  838.  
  839. Hmmm, I was actually thinking of copying using drive letters rather than a
  840. UNC, however I am now not sure that I would want EA's copied in all cases..;-) 
  841. I see others have comented on this also, so I guess I need to actually do some 
  842. tests myself to see what happens.
  843.  For example, the EA's for a REXX script may contain machine specific data
  844. (EG: drive letters) that would probably need to change on another platform.
  845. Without EA's REXX would automatically re-build it anyway, but if the REXX code 
  846. HAD to change then there is not much point in copying EA's...
  847.  
  848. Cheers........pk.
  849.  
  850.  
  851. --- Maximus/2 3.01
  852.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  853.  
  854. +----------------------------------------------------------------------------+
  855.  
  856. From: Larry Snider                                      25-Nov-99 12:32:01
  857.   To: All                                               26-Nov-99 03:58:15
  858. Subj: SysCopyObject
  859.  
  860. Hi All,
  861.  
  862. Could someone please provide me with a working example of SysCopyObject
  863. using fully specified file names?  For some reason, I cannot get it to
  864. work.
  865.  
  866. I've tried it this way:
  867.  
  868. call SysCopyObject('e:\popuplog.os2', 'e:\SCO_popuplog.os2')
  869.  
  870. and
  871.  
  872. call SysCopyObject(test1, test2)
  873.  
  874. and
  875.  
  876. call SysCopyObject 'e:\popuplog.os2',  'e:\SCO_popuplog.os2'
  877.  
  878. and
  879.  
  880. call SysCopyObject test1, test2
  881.  
  882.  
  883. I am running Object REXX and do load all of the RexxUtil functions.
  884.  
  885.  
  886. Larry Snider
  887. Larry.Snider@attglobal.net
  888.  
  889. --- Terminate 5.00/Pro [OS/2]
  890.  * Origin: OS/2: Not just another pretty program loader! (1:109/921.52)
  891.  
  892. +----------------------------------------------------------------------------+
  893.  
  894. From: Larry Snider                                      25-Nov-99 13:05:28
  895.   To: All                                               26-Nov-99 03:58:15
  896. Subj: SysCopyObject
  897.  
  898. After reading the INF a little closer I noticed that destination can only
  899. be a folder.  Since this is the case, how can I rename the copied file?
  900.  
  901.  
  902. 25-Nov-99 12:32:03, Larry Snider wrote to All
  903.            Subject: SysCopyObject
  904.  
  905.  
  906.  LS> Hi All,
  907.  
  908.  LS> Could someone please provide me with a working example of SysCopyObject
  909.  LS> using fully specified file names?  For some reason, I cannot get it to
  910.  LS> work.
  911.  
  912.  LS> I've tried it this way:
  913.  
  914.  LS> call SysCopyObject('e:\popuplog.os2', 'e:\SCO_popuplog.os2')
  915.  
  916.  LS> and
  917.  
  918.  LS> call SysCopyObject(test1, test2)
  919.  
  920.  LS> and
  921.  
  922.  LS> call SysCopyObject 'e:\popuplog.os2',  'e:\SCO_popuplog.os2'
  923.  
  924.  LS> and
  925.  
  926.  LS> call SysCopyObject test1, test2
  927.  
  928.  
  929.  LS> I am running Object REXX and do load all of the RexxUtil functions.
  930.  
  931.  
  932.  LS> Larry Snider
  933.  LS> Larry.Snider@attglobal.net
  934.  
  935.  LS> -!- Terminate 5.00/Pro [OS/2]
  936.  LS>  - Origin: OS/2: Not just another pretty program loader! (1:109/921.52)
  937.  
  938.  
  939.  
  940.  
  941. Larry Snider
  942. Larry.Snider@attglobal.net
  943.  
  944. --- Terminate 5.00/Pro [OS/2]
  945.  * Origin: Researching:Plunckett,Seale,Sullivan,Brookshire,Jolly
  946. (1:109/921.52)
  947.  
  948. +----------------------------------------------------------------------------+
  949.  
  950. From: David Noon                                        25-Nov-99 22:49:25
  951.   To: Francois Massonneau                               26-Nov-99 12:58:17
  952. Subj: FrontDoor/Mailer and Re
  953.  
  954. Hi Francois,
  955.  
  956. Replying to a message of Francois Massonneau to David Noon:
  957.  
  958.  FM> As I do not know whether or not the first message I posted has been
  959.  FM> sent (France is no longer connected to the rest of the world ;-( ), i
  960.  FM> post it again as I found another feed. I hope I will be sent this
  961.  FM> time.
  962.  
  963. I saw your earlier message last month and replied.
  964.  
  965.  DN>> This means it will terminate after one poll. Also, the conditional
  966.  DN>> leave statement (mentioned above for its IF part) will need to be
  967.  DN>> changed to:
  968.  
  969.  DN>>      if files.0 = 0 then
  970.  DN>>          exit 0 /* was leave */
  971.  
  972.  FM> I did that, but it doesn't work as expected.
  973.  FM> If I put "exit 0", when no more files are in the subdirectory, the
  974.  FM> window is closed, but the windows that launched the script and the
  975.  FM> one where the dialer is running are still opened and wait for the
  976.  FM> signal the script must send to tell everything is done. so I left the
  977.  FM> "leave" statement.
  978.  
  979. This should cause the REXX program to terminate in error. The LEAVE statement
  980. applies to the context of a DO group, and removing the DO FOREVER removes that 
  981. context.
  982.  
  983.  FM>> And finally I removed those lines :
  984.  FM>>  call SysSleep SleepTime
  985.  FM>>  call stream SemaMailer, 'c', 'open write'
  986.  FM>>  call lineout SemaMailer, 'inetmail semafore file'
  987.  FM>>  call stream SemaMailer, 'c', 'close'
  988.  
  989.  DN>> So you are no longer using a semphore file.
  990.  
  991.  FM> It's no longer a semafore file, but the script sends a signal to
  992.  FM> HWAIT.
  993.  
  994. What kind of signal? Does it post an event semaphore (not a file) instead?
  995.  
  996.  FM>> 3) At the end of the script, I saw you write two times (one before
  997.  FM>> and one after the subroutine "StopDialler"), the following lines : 
  998.  FM>> /* Reset elapsed time counter */  CALL TIME 'R' RETURN I suppose one
  999.  FM>> is for the subroutine StartDialler, and the second one is for the
  1000.  FM>> subroutine StopDialler. Is it a code to give the time on line ?
  1001.  
  1002.  DN>> It is part of that code.
  1003.  
  1004.  DN>> There should be a TIME('E') call somewhere in the StopDialler
  1005.  DN>> subroutine that should display the elapsed time.
  1006.  
  1007.  FM> Where ?
  1008.  
  1009. Down below ...
  1010.  
  1011.  FM> May I put at the beginning :
  1012.  FM> CALL TIME('E')
  1013.  FM> for example, just after the "CALL DIRECTORY DialerDir" statement and
  1014.  FM> before the "ADDRESS 'CMD' KillDialer" line ? This is the subroutine
  1015.  FM> you wrote :
  1016.  FM> /* Subroutine to stop the dialer program and its related address spaces
  1017. */ 
  1018.  FM> StopDialer: PROCEDURE EXPOSE DialupLogFile DialerDir KillDialer kill
  1019. inetmail pop3d smtpd
  1020.  FM>   CurDir = DIRECTORY()  
  1021.  FM>   CALL DIRECTORY DialerDir
  1022.  
  1023.  FM>   ADDRESS 'CMD' KillDialer
  1024.  FM>   CALL LogMsg 'dialer, if running, is killed.'
  1025.  FM>   CALL LogMsg 'Dialer disconnected after ' || TIME('E') || ' seconds.'
  1026.  
  1027. ... right here! (Above)
  1028.  
  1029.  FM>   CALL DIRECTORY CurDir
  1030.  
  1031.  FM>   ADDRESS 'CMD' kill inetmail
  1032.  FM>   CALL LogMsg 'inetmail, if running, is killed.'
  1033.  
  1034.  FM>   ADDRESS 'CMD' kill pop3d
  1035.  FM>   CALL LogMsg 'pop3d process, if running, is killed.'
  1036.  
  1037.  FM>   ADDRESS 'CMD' kill smtpd
  1038.  FM>   CALL LogMsg 'smtpd process, if running, is killed.'
  1039.  
  1040.  FM>   CALL SysSleep 2    /* just give it a little time to shut down... */
  1041.  
  1042.  FM>   /* Reset elapsed time counter */
  1043.  FM>   CALL TIME 'R'
  1044.  FM> RETURN
  1045.  
  1046.  FM>> If so, where in the log file do I find it ??
  1047.  
  1048.  FM>> 22 Oct 1999 08:32:54  Dialler disconnected after 0 seconds.
  1049.  
  1050.  DN>> Here. For some reason the elapsed timer has been reset again, giving
  1051.  DN>> a time of zero seconds.
  1052.  
  1053.  FM>> So the time on line is not 0 second, but about 8 minutes.
  1054.  
  1055.  DN>> That would be about 480 seconds then. That is what should have been
  1056.  DN>> returned by the TIME('E') call. Since there are 2 calls to
  1057.  DN>> StopDialler, the second one should have the correct elapsed time
  1058.  DN>> logged.
  1059.  
  1060.  FM> OK.
  1061.  FM> Is it possible to add something to the routine to give the cost of the
  1062.  FM> call. One parameter could be the cost for one minute on line
  1063.  FM> "CostperMinute", and at the end of each run, the log could record the
  1064.  FM> total time on line, and the resulting cost ?
  1065.  
  1066. If you know the cost per second (or minute) then you can use the result
  1067. returned by the TIME('E') call to calculate the  cost of the call. It should
  1068. be simple multiplication.
  1069.  
  1070.  FM> I saw a problem with the log generated.
  1071.  FM> A file is created in my root directory, named DIALUPLOGFILE. In it I
  1072.  FM> have all the sentences that should be put in the dialup.log file, but
  1073.  FM> the sentences are the ones generated by the PingServer Procedure. It
  1074.  FM> seems that a "CALL LogMsg ..." statement contained in the PingServer
  1075.  FM> procedure is not written in the dialup.log file, but in a
  1076.  FM> dialuplogfile file in my root directory. Is it because I have the
  1077.  FM> beginning of the procedure written that way : 
  1078.  FM> PingServer: procedure  
  1079.  FM> call LogMsg 'PingServer starting'
  1080.  FM>   .../. instead of :
  1081.  FM> PingServer:
  1082.  FM> PROCEDURE EXPOSE DialupLogFile   
  1083.  FM> call LogMsg 'PingServer starting'  
  1084.  FM> .../.
  1085.  
  1086. It could be. I no longer have your code. If the variable DialpuLogFile
  1087. contains the full path/filename of your log file then the PingServer
  1088. subroutine will need to access it in order to write its results to the correct 
  1089. log file. In such a case you should either pass it as a parameter or expose it 
  1090. on the PROCEDURE statement.
  1091.  
  1092. Regards
  1093.  
  1094. Dave
  1095. <Team PL/I>
  1096.  
  1097. --- FleetStreet 1.24.1
  1098.  * Origin:  (2:257/609.5)
  1099.  
  1100. +----------------------------------------------------------------------------+
  1101.  
  1102. From: Peter Knapper                                     27-Nov-99 09:25:14
  1103.   To: David Noon                                        26-Nov-99 23:18:03
  1104. Subj: REXX FtpPing.
  1105.  
  1106. Hi David,
  1107.  
  1108. When talking to Francois Massonneau recently the subject of performing a PING
  1109. came up, so you may have an answer for this. 
  1110.  
  1111. Most of the REXX FTP functions appear to be implemented with some quite
  1112. lengthy timeouts, and it can take 1-2 minutes to decide that the remote end is 
  1113. not contactable. I tried to "test" for this using a single FtpPing, however if 
  1114. the destination/target system is not contactable, FtpPing suffers from the
  1115. same long timeout. Do you know of a way to alter the REXX FTP timeout period
  1116. to something like 10-20 seconds rather than 2 minutes?
  1117.  
  1118. Alternatively, can you (or someone else) suggest some REXX Sockets code to
  1119. perform the equivalent task, if the timeout periods can be controlled from
  1120. there?
  1121.  
  1122. Thanks.............pk.
  1123.  
  1124.  
  1125. --- Maximus/2 3.01
  1126.  * Origin: Another Good Point About OS/2 (3:772/1.10)
  1127.  
  1128. +----------------------------------------------------------------------------+
  1129.  
  1130. +============================================================================+
  1131.