Assigns in 2.1
31 messages in this thread
I recently upgraded from 2.04 to 2.1. Now VLT gives me occasional AREXX
macro error: host not found. And Turbotext can't find my macros in
Sys:RExx. and PPage can't find the genies.
If I do Assign Rexx: exits, I still get the three directories assigned to
Rexx: (sys:s, sys:rexx, and sys:rexxc) but on Dir REXX: only the first is
appears on the screen.
What have they done to ASSIGN? How do I fix this?
Jim,
I believe you need to move the RexxMast icon to the wbstartup-drawer.
-sja
Jim,
DIR doesn't show any directory but the 1st <sigh>.
hmmm… Didn't see the parent of this thread, but..
DIR will show all subdirectories down from the current one. Just try DIR
ALL. As a matter of fact, you can use the DIRS switch to see just the
subdirectory names under the current level (DIR ALL DIRS). A DIR ALL
shows the subdirectory names AND all the files in them.
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
The topic was doing DIR on an assign with multiple directories attached
Hi, Vic,
I remember making adding additional multiple logical device assigns for
REXX: or CGFONTS: with v2.04 and typing DIR REXX: or DIR CGFONTS: I woould
only see the files in the first ASSIGN never any further. Plus if I have
REXX: assigned to multiple directories ARexx only looks in the first one.
ASSIGN REXX: SYS:REXX DH0:REXX DH2:REXX
When I try to call an ARexx script that is not in Sys:Rexx it isn't found.
So is it the programs that don't know how to find the added assigns or
that ASSIGN isn't showing them where to look?
Chris
I don't know why ARexx doesn't look through all the things assigned to
REXX:. Perhaps Bill will 'step in' and explain how to do what you want.
Oh, I see. Took me a moment to figure out what you meant. So, if I do a
multiple directory assign, I can only see the first assigned directory
with DIR.
Seems like DIR could be a little smarter.
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
Steve,
It's not clear that you WANT 'DIR' to be any smarter. I suspect most
folks view DIR as a disk maintenance utility, and having it show things
that appear where they really aren't could cause some problems, IMHO.
Vic,
It wouldn't be too confusing if DIR showed files from ASSIGNed directories
in a way similar to the ASSIGN command itself. (say, with a + beside
files from logically assigned directories.)
However, from Chris' comments regarding ARexx and multiple assigns, I see
I had the wrong impression on how multiple ASSIGNs work. I thought it
WOULD be transparent to applications; evidently, from his observations, it
is not.
Now I'm thinking ASSIGN could be smarter! <g>
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
There IS no smarter for ASSIGN to get. The problem is (apparently) the
applications. Our applications find files in all the directories, and we
haven't changed them since 1987…LONG before ASSIGN allowed multiple
directories
Hey guys – rather than worrying about the 2.1 assign command and the way
most commands do not completely follow the "assign" implicit path go get
WShell and install PathHandler. IT handles things correctly and VERY
flexibly. It is wonderful to use. Meanwhile, either place rexxmast in the
wbstartup drawer or add it to your user-startup script. That'll solve the
environment not found problems.
{@_@}
Joanne,
I have WShell, and haven't installed it <sigh>. My machine is still
'straight vanilla C=' although it has later stuff than most. Well, I use
Khalids FR rather than ASL, but that's about it.
I was glad to see Andy's comment on where the 'magic' is in the C= code
(Open()). It's disappointing that it wasn't included in ExNext()…scan
all the directories.
Jim,
You say you have sys:s, sys:rexx and sys:rexxc all assigned to Rexx:. Does
this mean you are using the PathHandler that comes with WShell 2.0? As far
as I knew, this was the only way to assign a logical device to more than
one directory.
Mike,
Under 2.x, you can have multiple directories ASSIGNed to a logical device
by using the ADD keyword with ASSIGN.
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
Steve,
Right multiple ASSIGNs but how many programs actually will use it? I had
hoped the OS would have made the transition transparent for any program
but now it looks like the programmer must use it in the code.
Chris
Chris,
I don't know why _other_ programs don't find things in all the
directories. Programs that WE wrote in 1986 do (and we haven't modified
them for any new capabilities regarding this).
Chris,
What you're saying is news to me! I've only used multiple assigns a
couple of times, and in those cases it worked the way I expected. I had
been under the impression that the OS handled the assigns in a manner
transparent to the applications.
So ARexx in particular won't see the additional directories ASSIGNed to
REXX:!?? That is one case in particular it would have been really
useful!
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
Steve,
Well maybe I'm doing something wrong then. I used:
Assign REXX: sys:rexx
Assign REXX: dh2:rexx ADD
Then from a shell (a WSHell BTW) I issued an ARexx script
rx menu.rexx /* I used the exact name although a WSHell doesn't require */
/* the [rx] or the .rexx suffix */
01.249 REXX: 4>menu
Unknown command menu
00.083 REXX: 4>rx menu
Command returned 5/1: Program not found
00.133 REXX: 4>rx rexx:menu
Type Number OR Letters of Program you wish to RUN.
Now it worked here when I included the device name, good.
.01.249 REXX: 4>menu
Unknown command menu
00.083 REXX: 4>rx menu
Command returned 5/1: Program not found
00.133 REXX: 4>rx rexx:menu
It didn't work here like it should, WSHell should look in REXX: for
menu.rexx
00.983 REXX: 4>copy dh2:rexx/menu.rexx sys:rexx
00.199 REXX: 4>menu
Type Number OR Letters of Program you wish to RUN.
01.016 REXX: 4>delete sys:rexx/menu.rexx
sys:rexx/menu.rexx Deleted
00.183 REXX: 4>menu
Unknown command menu
00.083 REXX: 4>rx menu
Command returned 5/1: Program not found
What am I doing wrong?
Chris
Chris,
What's happening to you isn't clear to me from your example. I don't have
WSHell, so I'm not familiar with the prompt you have. Are you actually
having ARexx find the script when you use the rexx: device name one time
and fail the next?
What I've seen from playing around with this is that ARexx will only find
scripts from ADDed ASSIGNs to rexx: if the rexx: device name is included
as part of the script's filename:
4.Ram Disk:ttt> dir
greet.rexx
4.Ram Disk:ttt> rx greet
Hello, ARexx found me!
4.Ram Disk:ttt> assign rexx: exists
REXX Work:programming/rexx
+ Ram Disk:ttt
4.Ram Disk:ttt> cd /
4.Ram Disk:> rx greet
Command returned 5/1: Program not found
4.Ram Disk:> rx rexx:greet
Hello, ARexx found me!
4.Ram Disk:> rexx:
4.Work:programming/rexx> rx greet
Command returned 5/1: Program not found
4.Work:programming/rexx> rx rexx:greet
Hello, ARexx found me!
4.Work:programming/rexx> dir rexx:greet#?
4.Work:programming/rexx>
4.Work:programming/rexx>
As you can see, ARexx wouldn't find the script even when IN rexx: unless
rexx: was specified. DIR wouldn't find the script in rexx: even IF rexx:
was specified!
It does seem (at least when using AmigaShell) that ARexx will find scripts
in directories ASSIGN ADDed to rexx: if and only if the logical device
name is specified. Whether this is true of other instances, I don't know.
DIR sure doesn't work this way!
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
Steve,
You've duplicated my exact same results. However, WSHell, which I use,
doesn't need the RX command or the .rexx suffix if the script is in the
REXX: assigned device, it knows to look for an ARexx script if the shell
doesn't first find a command by that name, actually though, I think it
looks for an ARexx script first. I had a rexx script called break.rexx and
of course the command BREAK in C:, well unless I used the path C:BREAK
when calling the command the break.rexx would get run instead. It looks
like even WSHell needs more in the argument string when using multiple
assigns.
Chris
Chris,
Hmmm.. That's interesting that WSHell searches REXX: before C:. Do you
by chance have REXX: in your search path?
AmigaShell doesn't require the .rexx extension, either (its the default).
I wonder which commands/applications honor multiple assigns and which
don't. I find it interesting, for example, that TurboText will locate
ram:ttt/greet.rexx (from my earlier example) if invoked with "ttx
rexx:greet.rexx", but the file doesn't show up in the TurboText rexx:
directory file requester, and if saved, it goes into the FIRST assigned
REXX: directory, while the file in ram:ttt gets DELETED! (The .info file
for it remains, though!?)
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
Steve,
You mention that AmigaShell doesn't requires the .rexx extension. Let
me explain what Chris was referring to.
WShell considers both AmigaDOS and ARexx as native script languages.
Because of this, single-line ARexx commands maybe executed just as
single-line AmigaDOS commands. Because ARexx is a native language, it
will look for 'greet.rexx' in REXX: if you just type 'greet' at your
prompt. To do the same thing in AmigaShell, you'd do "rx greet" _or_
"greet.rexx". In other words, you either give AmigaShell the means with
which to find the file (rx) or you explicitly name the file in its
entirety (greet.rexx). WShell _automatically_ executes rexx programs as a
native language and will find '*.rexx' files without '.rexx' being
specified.
Incidentally, a major feature of WShell is that it is itself an ARexx
host. Makes it very handy for doing ARexx stuff!!! <G>
Ric Fischer
SoftWood Tech Support
Phoenix, Arizona, USA
(602) 431-9151
Ric,
Thanks for the info re. WShell being an ARexx host. That would indeed be
handy!
The more I play around with this (and I _don't_ know why I started!), the
more interesting effects I turn up. One more thing that is interesting is
that AmigaShell WILL execute invoke ARexx for files without the .rexx
extension if the file has the 's' bit set in the file header!
4.Ram Disk:ttt> list
greet 41 —-rwed Today 13:30:33
1 file – 2 blocks used
4.Ram Disk:ttt> greet
greet: file is not executable
4.Ram Disk:ttt> protect greet +s
4.Ram Disk:ttt> greet
hello, ARexx found me!
4.Ram Disk:ttt> cd /
4.Ram Disk:> rexx:greet
hello, ARexx found me!
4.Ram Disk:>
(Again, I had ASSIGN ADDed ram:ttt/ to REXX:.) I don't think this
behavior is documented anywhere. AmigaShell will invoke ARexx if EITHER
the file has the .rexx extension OR the 's' script bit is set for the
file!
//
\X/ Amiga -Steve ——> On AutoPilot from Silicon Valley
The transition is transparent if the program does an Open. AmigaDOS does
its multi-assign magic on the Open call. Programs that scan the directory
first, or do other tricks first, are going to skip the AmigaDOS multiple
assign code.
So, basically, the non-tricky apps will work. The tricky ones will not
follow the multi-assign.
andy
Who'da thunk that dir and list were tricky apps. :/
Malcolm
Different problem; Dir and List don't Open anything. They ExNext instead.
andy
It doesn't seem too unreasonable to expect to be able to do a dir or list
and actually see what the volume contains.
Malcolm
Its not unreasonable to expect that; however, it has to be done in either
the dir and list commands, or the ExNext AmigaDOS call. Currently, the Open
AmigaDOS call knows about it, which is how most programs can automatically
use the multiple assigns.
andy
Steve,
Thanks for the info about Assign ADD. I have 2.04 but did not know that.
Thing is, multiple assigns seem to only work with the ASSIGN command.
Surely, SOMETHING works with it. …but I don't know what it is.
Malcolm