TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Russ Williams
from: Mike Ruskai
date: 1994-07-24 06:25:28
subject: Re: More REXX...

Some senseless babbling from Russ Williams to Mike Ruskai
on 07-23-94  21:22 about More REXX......

 RW> Mike Ruskai wrote the following to All on 07-20-1994 regarding More
 RW> REXX...:
 
 MR> I would like to redirect the output of the SAY command to a text
 MR> file which  is referred to, but I do not know how to redirect the
 MR> SAY command.  The  online REXX Information only says that the
 MR> "standard" rules for redirection  apply to the SAY command.  Well,
 MR> standard rules as far as I know include  using > and >>,
which translate
 RW> into a bad arithmetic attempt and the 
 MR> characters >> being printed when SAY encounters them.  So, how do
 MR> I  redirect the output of SAY to a file?  Or anything other than
 MR> STDOUT.

 RW> You are misusing the term "redirection".  What you really
want to do
 RW> is simply *write* to a specific file.  Use Lineout for that, i.e.
 RW> instead of

Not really.  Redirection only implies directing the output of the command 
to another device besides STDOUT, which is valid for many languages.

 RW> say "The following icons must be renamed."
 RW> use the command 
 RW> call lineout 'checking.txt', "The following icons must be renamed"
 RW> if you want to write to the file 'checking.txt'.

Got this from others, too.

 RW> The statement that "standard" rules for redirection apply
to the SAY
 RW> command means that if a Rexx program is executed with redirection, as
 RW> when you type the command
 RW> myrexx.cmd > output.txt
 RW> on the command line, then any Say commands within myrexx.cmd will be
 RW> redirected to the file output.txt.  You can redirect OS/2 commands
 RW> inside the REXX program (as you did with the dir command), but you can
 RW> only redirect Rexx commands like Say from outside, e.g. on the command
 RW> line.
 
I got a hint that there may be another way, but the entire idea is no 
longer needed with the other fix.

 MR> Beyond that, is there a way to check an individual filename for
 MR> the  presence of a bad character so that it could be checked upon
 MR> the conversion  of each icon file?  Doing a directory listing of a
 MR> couple thousand icons  even on my 486DX2/66 isn't a fun wait.  I
 MR> would like to have it check each  icon just before processing, and
 MR> if it contains a bad character (actually  only the & since it is the
 MR> only bad character unique to OS/2, not DOS) move  it to a directory
 MR> and notify the user that there are icons there that need  to be
 MR> renamed. 

 RW> If you have an icon name in the variable "iconname", just use
 RW> something like
 RW> If Pos( "&", iconname) > 0 Then /* name contains
"&" character */
 RW> If you want to check for any one of a list of bad characters,
 RW> investigate the Verify function.  You might want to look at
 RW> SysFileTree as a means of getting a list of names.  

Already solved this problem.  But that is still a useful command for other 
little projects.

 RW> If you are really interested in the names that appear beneath desktop
 RW> icons, then you have to get the "long name", which is stored in the
 RW> Extended Attributes.
 RW> rc = SysGetEA( filename, ".LONGNAME", "LNAME")
 RW> will put the file's long name in variable "lname".  If rc
is nonzero,
 RW> it failed. 

Haven't had a need to address this yet.  I will fool with it when I do.  
Thanks.

´Mike Ruskai ³ FidoNet(1:107/634) ³ RGSNet(50:130/12) ³ OS/2Net(81:135/30)Ã
´{Team OS/2} ³ ITCnet(85:862/207) ³         TerraNet(87:908/100)          Ã


... D.C.: Drugs and Crime.  And that's just congress.
___ Blue Wave/QWK v2.12 OS/2
--- RG 5-31 Exp/GE 1.02+

* Origin: The Licking Factory, OS/2 in NJ! (908)636-7245 (1:107/634)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430
SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 107/634 677 33 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.