TIP: Click on subject to list as thread! ANSI
echo: os2rexx
to: Steve Mccrystal
from: Jack Stein
date: 1999-09-22 08:03:17
subject: Classic REXX files?

Steve Mccrystal wrote in a message to Jack Stein:

 ET>> Then you have to turn the whole startup.cmd file into a REXX
 ET>> file (I don't know if that's possible).

 JS> Sure.  I do it that way here.  If you are calling a rexx script
 JS> from startup.cmd, then, why would you not be able to use the
 JS> start-up to call the Rexx Utilities?

 SM> I'm not sure *why* it doesn't work, but I got error messages
 SM> (unknown function in line xx, as I recall) when I added the
 SM> lines to startup.  When I CALLed the same lines in a
 SM> seperate script, it worked.  I left it that way! :^) 

Either you did not turn your STARTUP.CMD into a REXX script, or, you turned it 
into a REXX script, but had normal batch language (syntax) in the script.  

The first thing OS/2 does is determine if the script is regular cmd file, or,
a REXX script, it knows this by the very first line at position 0,0 in the
file.  If it is a comment, then what follows MUST be REXX code, using REXX
syntax.  If your script is a REXX script, then you can start the REXX Extended 
Utilities from the startup.cmd file, as well as use any other REXX commands.  

You can also use any regular batch commands, but you must use proper quoting
so REXX knows what is meant as literals to be passed to cmd.exe, and what are
internal instructions to to REXX.

For example, to load my 4OS2 alias file a regular cmd file would have:

ALIAS /r e:\4os2301\os2alias

REXX has no clue what "ALIAS" is, so he passes ALIAS to CMD.EXE.  The
paramaters however are very confusing to REXX, since it recognizes some of the 
symbols, such as "/", and "\".  Because of this, you must quote the parameters 
so REXX doesn't try to divide something by r, for example, so the line looks
like this in a REXX script:

ALIAS '/r e:\4os2301\os2alias'

Also, to make a directory, the same thing applies:

md "z:\xpress"

You have to understand this enough so you can use REXX fully, and the
STARTUP.CMD file is no different than any other REXX script. 

 In short, it's OK not to start up the extended utilities in your startup.cmd, 
but it's not OK to not know why you got the errors.:-) 
               
                               Jack 
--- timEd/2-B11
* Origin: Jack's Free Lunch 4OS2 USR 56k Pgh Pa (412)492-0822 (1:129/171)

SOURCE: echoes via The OS/2 BBS

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™.