TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Ruskai
from: Daniel Doran
date: 1994-07-22 19:19:00
subject: More Rexx...

MIKE RUSKAI had something deep to write about More REXX...

MR> This also involves my little icon conversion script.
MR> 
MR> One thing that is sure to make it puke is for one of the icons to
MR> have an  invalid filename character in it, namely the '&' character.

One way around this is to put the filename in quotes.
 'TYPE THIS&THAT'    doesn't work, but
 'TYPE "THIS&THAT"' does.
 'cvtico' current_icon 'temp.ico'  doesn't work, but
 'cvtico "'current_icon'" temp.ico' should.

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.
You cannot redirect a single say command, only the output of all say
commands in an entire script, as:  rexxthing.cmd>afile

You can use LINEOUT instead, where FILE contains the filename: 
 CALL LINEOUT FILE "The following icons must be renamed."
 x=lineout(FILE, badname.bad)
note that case in the keywords is not important, and that there are
two ways to use a function.  If file='BADFILES', the output will be
placed in the BADFILES file.

MR> Beyond that, is there a way to check an individual filename for
MR> the  presence of a bad character

 tail=""
 parse value filename.n with head '&' tail
 if tail \= "" then do; /* whatever you do with a bad filename */
/*head will contain everything left of &, tail, everything to the
right*/ or
 if pos('&',filename.n)>0 then do; /* whatever */

Also, instead of using REN to _move_ files from one directory to
another, use OS/2's MOVE: MOVE C:\here\*  \there
     This will not work across drives.  Here and there must be on the
same drive.

 * KWQ/2 1.2e * That which does not kill me had better be able to run away fast


--- QScan v1.064b

* Origin: * La Cantina BBS * El Paso 915-532-0332 v.32bis/DS 4G (1:381/123)
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: 381/123 900 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™.