- Integrated Systems
- About Us
- Integrated Systems
- About Us
08-25-2009 06:26 AM
08-25-2009 06:48 AM
but there's always the big one:
ALP $ show logi sys$sylogin
"SYS$SYLOGIN" = "SYS$MANAGER:SYLOGIN" (LNM$SYSTEM_TABLE)
08-25-2009 07:34 AM
In this case the code would call the $SET_PROCESS_PROPERTIESW system service with the PPROP$C_PARSE_STYLE_PERM flag (for interactive processes).
I could whip up an example for you if you wish, but it would be far easier to use s system wide login command procedure, as Steven suggested. If they are worried that users may not execute it (CTRL-Y or /NOCOMMAND), you could set all the accounts RESTRICTED with AUTHORIZE.
08-25-2009 07:41 AM
Use LOGIN.COM or SYLOGIN.COM here.
08-25-2009 02:54 PM
I'd strongly recommend that this NOT be made a system default, rather that the application which depends on it explicitly enables parse style (and restores the previous setting on exit). I wouldn't even put it in LOGIN, rather, it should be embedded in command procedure and images of the application.
Application dependencies should be made explicit and encapsulated inside the application itself, otherwise you can end up with conflicts between different applications, and mysterious failures when (not IF) invisible global settings are lost.
Relying on a SYSGEN setting is a recipe for errors and confusion down the track. I've seen this type of situation many times with site specific PQL settings being forgotten when moving software to a new system.
In DCL, the modular and version independent way to deal with parse style or token settings is:
$ IF F$GETSYI("VERSION").GTS."V7"
$ restore_parse_style="SET PROCESS/PARSE_STYLE="+F$GETJPI("","PARSE_STYLE_PERM")
$ SET PROCESS/PARSE_STYLE=EXTENDED
then just prior to exit:
(note quotes so it's a NOOP if the symbol is undefined)
Inside an image it's even easier,
Since the setting is temporary it is automatically reverted at image exit.
(note to MACRO32 programmers, the system service macro $SET_PROCESS_PROPERTIESW_S has typos that make it unusable - reported to HP).
08-25-2009 05:54 PM
But you need to get it done before the
command line has been parsed, so you may need
to use a mechanism like LIB$INITIALIZE for
that. (Good luck on a C++ program.)
> I wouldn't even put it in LOGIN, [...]
I took that chance some years ago, and the
biggest problems I've had are rogue
(HP-supplied) command procedures which set it
back to TRADITIONAL while I'm not looking,
and temporary confusion when I go back to a
VAX where TRADITIONAL is all there is, and I
need to remember to quote things again. It's
a personal/organizational choice, but I've
grown very fond of this in my LOGIN.COM:
$ if (f$getsyi( "HW_MODEL") .ge. 1024)
$ set process /parse_style = extended
I never worked up the courage (or had a need)
to do it to SYLOGIN.COM, but I have a
personal pseudo-LOGIN.COM which I use when
I'm SYSTEM, and there's one in there, too, so
unless someone messes with it, I do all my
personal and SYSTEM work with EXTENDED.
If your (unspecified) application is accessed
through command procedures, then they could
either check the setting or set it.
08-26-2009 04:10 AM
Parse_style also effects the way command-line attributes are passed to programs when the LIB$GET_FOREIGN system service is used.
When TRADITIONAL (normally default), the information will be converted to uppercase, where EXTENDED will leave the data unchanged:
Assume prg code:
IF sym = "A" THEN
$ prg :== $prg.exe
$ prg a
the effect of the condition depends on setting of PARSE_STYLE:
TRADITIONAL: since the parameter ("a") will be converted and passed as "A", the condition will return TRUE.
EXTENDED: since the parameter will be passed as-is, so as "a", the condition will return FALSE.
It's not that uncommon in older programs!
OpenVMS Developer & System Manager
08-26-2009 04:04 PM
>LIB$INITIALIZE for that
Doesn't work :-(
I guess the processing of the foreign command is done by DCL before the LIB$INITIALIZE routine has any effect.
08-26-2009 06:17 PM
LIB$INITIALIZE is good enough to get
"DECC$ARGV_PARSE_STYLE" set, which is good
enough to preserve case in argv, _if_
parse_style = extended. I never tried to
force extended parse_style in a program.