T.R | Title | User | Personal Name | Date | Lines |
---|
132.1 | | WEBSTR::NELSON | | Sun Jul 28 1985 16:15 | 3 |
| It generates the DCL error ARGREQ on VMS V4.1
JENelson
|
132.2 | | RANI::LEICHTERJ | | Sun Aug 04 1985 23:51 | 28 |
| What you meant - executing a DWIM for you :-) - was:
'f$pid(GOTO)'
The f$pid() function steps through successive processes on the system. The
way you are supposed to use it is:
$ context = ""
$loop:
$ next_pid = f$pid(context)
$ if next_pid .eqs. "" then goto done
... do what you want with the process whose pid is in next_pid
$ goto loop
$done:
The symbol passed to f$pid() is used by DCL to store context so that on the
next call you will get the next pid. On the first call, the symbol should
either be the null string, or undefined. I think what actually gets stored in
context is the pid returned, but that may have changed since V3 days, and I may
remember it wrong anyway.
So, the effect of the f$pid(GOTO) call is to define the symbol GOTO as some
random string. Should the procedure in which this occurs have a GOTO in it
anywhere - say, in an ON CONTROL_Y GOTO ... - trying to execute it will produce
severe DCL problems. This allows you to break into any DCL procedure that in
any way lets you force it to execute arbitrary text you type in.
-- Jerry
|
132.3 | | BIZET::BARABASH | | Fri Aug 30 1985 17:16 | 20 |
| A real lexical function obscurity that I came across follows.
According to the great DCL dictionary (page DCL-348):
"You can truncate function names to any unique abbreviation."
Also, (page DCL-419):
"F$USER returns the current user identification code (UIC)...
RETURN VALUE A character string containing the current user
identification (UIC), including square brackets.
The UIC is returned in the format [group-identifier,
member-identifier]."
The minimal unique abbreviation of the lexical function F$USER is F$U.
QUESTION: What does the following statement do?
$ write sys$output f$u()
-- Bill B.
|
132.4 | | R2ME2::GILBERT | | Fri Aug 30 1985 19:04 | 2 |
| Bill -
May we assume you've entered a QAR on this?
|
132.5 | | DVINCI::FISHER | | Tue Sep 10 1985 17:23 | 6 |
| Aaah....am I being dense? On V4.2, Write Sys$output f$u() causes the UIC
string to be written to sys$output. That is what I would expect. Did you
expect something different?
Burns
|
132.6 | | TURTLE::GILBERT | | Tue Sep 10 1985 18:42 | 1 |
| On V4.1, it writes the default directory; i.e., same as f$directory().
|
132.7 | | BEECH::ECKERT | | Tue Sep 10 1985 20:52 | 8 |
| re: .6
Are you sure it's not giving you the symbolic form of the UIC (i.e., the
rights identifier assigned to the username)?
Try SHOW SYSTEM/FULL.
- Jerry
|
132.8 | | BEECH::ECKERT | | Tue Sep 10 1985 20:55 | 5 |
| re: .6, .7
I forgot to mention that the identifier [abc,xyz] is equivalent to [xyz].
- Jerry
|
132.9 | | WEBSTR::NELSON | | Tue Sep 10 1985 21:31 | 4 |
| On MY V4.2 system, F$U() prints out the default directory. F$US() properly
prints the UIC.
JENelson
|
132.10 | | THRINT::WARWICK | | Wed Sep 11 1985 05:13 | 4 |
| I get the same results as Mr. JENelson
Trev
|
132.11 | | DVINCI::FISHER | | Wed Sep 11 1985 11:55 | 6 |
| Oops...it does that for me too. I was in a subdirectory at the which happened
to be very similar to the UIC identifier. I just missed the fact that it
was [X.Y] rather than [X,Y].
Burns
|
132.12 | f$u() still sick in Vms v4.5 ... | PILOU::BONGARTZ | Happy Hacker | Fri Apr 17 1987 05:15 | 1 |
|
|
132.13 | And in 4.6 | MDVAX3::COAR | A wretched hive of bugs and flamers. | Fri Oct 30 1987 11:07 | 0
|