Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

 
peresw
Occasional Advisor

LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

Running OpenVMS V7.1 . Most of users are UNIX guys and we only have this old OpenVMS box. Using LOGIN.COM, I would like to know if would be possible to have UNIX commands "aliases" to OpenVMS commands...for example: 

$ LL=="DIR/DATE/OWNER/PROT/PAGE"
$ WHO=="SHOW USER"
$ DIR=="DIR"
$ EDT=="EDIT/TPU"
$ CLS=="SET TERMINAL/WITH=80"

I did try, but isn't working.... any ideas or suggestions?

 

 

 

 

 

 

11 REPLIES 11
Steven Schweda
Honored Contributor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

> [...] I would like to know if would be possible [...]

   Sure.  Whether it's a great idea is open to argument (without end).

> I did try, but isn't working.... any ideas or suggestions?

   What, exactly, did you try?  What, exactly, happens when it "isn't
working"?

> $ CLS=="SET TERMINAL/WITH=80"

   That one may need some help.

   Where did you put these DCL symbol definitions?  A user's LOGIN.COM?
The system-wide SYS$MANAGER:SYLOGIN.COM?  Either way, those get run
automatically at log-in time.  If you edit one, then any user would need
to re-process ("@") it manually (or log in again).

peresw
Occasional Advisor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

Dear Steven,

Thanks for your reply. To clarify, I am by no means a "OpenVMS Person". Although I have ways been an great enthusiastic.

  1. Since our access and work with OpenVMS is simple to verify space, logs and few commands, I thought to simplify by creating "symbols"(?) (I mean to say "aliases") to the common user we have on OpenVMS. We all logon using same user, perform few tasks and logout.
  2. The goal was to be able to "execute" UNIX commands on OpenVMS, such as for example, the ones I posted. Basically, when we logon into OpenVMS we would do a command such as ls -ltr instead of native "DIR/DATE/OWNER"
  3. I did add to user LOGIN.COM as I thought to work "similar" to UNIX .profile
  4. I added entries like:
    1. $WHO=="SHOW USER" or $ WHO :== "SHOW USER"
    2. Logout and logon back
    3. issue "WHO" and get message below:
    4. $ who
      %DCL-W-IVVERB, unrecognized command verb - check validity and spelling
      \WHO\
      $
  5. My questions starts on to what should I set/point the "aliases" WHO ? 
  6. $ show system
    OpenVMS V7.1

Any tips or guidance will be great appreciated... :)

 

Steven Schweda
Honored Contributor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

> 1. [...] by creating "symbols"(?) (I mean to say "aliases") [...]

   DCL symbols.  They work like aliases (more or less).

> 2. [...] we would do a command such as ls -ltr instead of native
> "DIR/DATE/OWNER"

   "ls -ltr" is two tokens, so that'd be harder, but something like,
say, "lsltr" or "ls_ltr" would be easy.

> 3. I did add to user LOGIN.COM as I thought to work "similar" to UNIX
> .profile

   Or ".login".  Yup.  Should work.

> 4. [...]
> [...]
>    1. $WHO=="SHOW USER" or $ WHO :== "SHOW USER"

      $ WHO == "SHOW USER"
   or:
      $ WHO :== SHOW USER

> Logout and logon back

   If that's not doing the job, then there may be a problem with
LOGIN.COM.

      DIRE /DATE /OWNE /PROT LOGIN.COM

Is it readable, executable, and owned by the intended user?

   You might add something like the following near your new commands to
verify that your commands are getting executed:

      write sys$output "Hi, Mom."

> 6. $ show system
>    OpenVMS V7.1

   Old, but this stuff has been working for much longer than that.

   You can also define those symbols interactively, and use them
immediately.  For example:

alp $ who
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
 \WHO\
alp $ WHO :== SHOW USER
alp $ who
      OpenVMS User Processes at 20-SEP-2017 21:50:59.32
    Total number of users = 2,  number of processes = 26

 Username  Node     Interactive  Subprocess   Batch
 SMS         ALP            4
 SYSTEM      ALP           19         -         3

peresw
Occasional Advisor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

  1. LOGIN.COM ...."Is it readable, executable, and owned by the intended user?"

$ DIRE /DATE /OWNE /PROT LOGIN.COM

Directory $1$DUA110:[INGRES]

LOGIN.COM;24 21-SEP-2017 07:39:05.34 [SYSTEM] (RWED,RWED,RE,RE)
LOGIN.COM;23 20-SEP-2017 12:44:49.19 [SYSTEM] (RWED,RWED,RE,RE)
LOGIN.COM;22 20-SEP-2017 12:33:42.82 [SYSTEM] (RWED,RWED,RE,RE)

Contents of LOGIN.COM;24

$ingp :== "@ii_system:[ingres]ingp.com"
$setwork :== "set def $1$dua120:[ingres.feehan]"
$who :== "SHOW USER"
$lsltr :== "DIR/DATE/OWNER"

[End of file]

Note:  after logout and logon back, the "ingp" it's working  (this entry was there and always worked) and "who" or "lsltr" (I added) is not...
$ ingp
================================================================================
OpenVMS V7.1 on node AEMQA3 21-SEP-2017 07:56:35.90 Uptime 32 08:25:36
Pid Process Name State Pri I/O CPU Page flts Pages
================================================================================
000002E0 DMFRCP HIB 5 333 0 00:00:00.07 137 245
000002E1 DMFACP HIB 6 61 0 00:00:00.04 160 222
000002ED II_GCN HIB 6 254 0 00:00:00.07 91 133
000002EE II_GCC_2EE HIB 5 81 0 00:00:00.19 116 188
000002EF II_DBMS_2EF HIB 6 168 0 00:00:00.09 327 616
Process Summary Info: DBMS Servers: 1 Comm Servers: 1
$ lsltr
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\LSLTR\
$ who
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\WHO\

2.  I interactively define the "symbols" 'lsltr' and 'who', as below. Seems like either "==" or ":==" works.

$ lsltr :== "DIR/DATE/OWNER"
$ lsltr

Directory $1$DUA110:[INGRES]

ABF.DIR;1 29-DEC-1997 11:08:38.17 [SYSTEM]
ACP_START.COM;4 1-AUG-2017 14:47:06.58 [SYSTEM]
ACP_START1.COM;4 1-AUG-2017 14:47:06.59 [SYSTEM]
ACP_START1.LOG;2 19-AUG-2017 23:33:56.75 [SYSTEM]
ADVISOR.DIR;1 29-DEC-1997 09:44:57.61 [SYSTEM]

and also,

$who :== "SHOW USER"
$ who
OpenVMS User Processes at 21-SEP-2017 07:31:00.91
Total number of users = 3, number of processes = 3

Username Interactive Subprocess Batch
INGRES 1
RABBIN 1
UNKRICH 1

3.  At this point,  I can say "symbols" works  when defined interactively but not when place on LOGIN.COM.

Open to suggestions....

 

 

Francisco Hermida
Occasional Advisor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

It is really wierd.

Can you add some tracing to LOGIN.COM to be sure it is really being executed.

Like:

$write sys$output "Defining WHO,LSLRT symbols"
$who :== "SHOW USER"
$lsltr :== "DIR/DATE/OWNER"
$write sys$output "WHO,LSLRT symbols defined"
$sh sym who
$sh sym lsltr

Regards.

peresw
Occasional Advisor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

  1. Contents of LOGIN.com

$write sys$output "Defining WHO,LSLRT symbols"
$ingp :== "@ii_system:[ingres]ingp.com"
$who :== "SHOW USER"
$write sys$output "WHO,LSLRT symbols defined"
$sh sym who
$sh sym lsltr

[End of file]

2. Logout/Logon

Username: ingres
Password:

AEMDV3

OpenVMS AXP v7.1

Last interactive login on Thursday, 21-SEP-2017 08:19:25.95
Last non-interactive login on Saturday, 19-AUG-2017 23:33:25.88

INGRES on node : AEMQA3
$ $ who
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\WHO\


$ ingp
================================================================================
OpenVMS V7.1 on node AEMQA3 21-SEP-2017 09:19:49.07 Uptime 32 09:48:49
Pid Process Name State Pri I/O CPU Page flts Pages
================================================================================
000002E0 DMFRCP HIB 5 333 0 00:00:00.07 137 245
000002E1 DMFACP HIB 6 61 0 00:00:00.04 160 222
000002ED II_GCN HIB 6 254 0 00:00:00.07 91 133
000002EE II_GCC_2EE HIB 5 81 0 00:00:00.19 116 188
000002EF II_DBMS_2EF HIB 6 168 0 00:00:00.09 327 616
Process Summary Info: DBMS Servers: 1 Comm Servers: 1
$

 

Volker Halle
Honored Contributor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

As it's obvious from the various attempts to help you, your LOGIN.COM file is NOT being executed during login, at least not the file you think is your LOGIN.COM.

Try DIR SYS$LOGIN:LOGIN.COM - is that the file with your commands in it ?

Check your user entry in SYSUAF: what is shown as LGICMD and Default disk:[directory] ?

Volker.

peresw
Occasional Advisor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

Thank you for your imputs.  I think you are correct...

$ DIR SYS$LOGIN:LOGIN.COM

Directory $1$DUA110:[INGRES64.INGRES]

LOGIN.COM;13

"Check your user entry in SYSUAF: what is shown as LGICMD and Default disk:[directory] ?"

Not a OpenVMS person, so.. haven difficulties on get the information for you...

 

Thanks,

 

Steven Schweda
Honored Contributor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

> $ DIR SYS$LOGIN:LOGIN.COM
>
> Directory $1$DUA110:[INGRES64.INGRES]
>
> LOGIN.COM;13

   Looks different from:

> $ DIRE /DATE /OWNE /PROT LOGIN.COM
>
> Directory $1$DUA110:[INGRES]
>
> LOGIN.COM;24 21-SEP-2017 07:39:05.34 [SYSTEM] (RWED,RWED,RE,RE)


> Not a OpenVMS person, so.. haven difficulties [...]

   There's a ton of VMS documentation on the Web, including some basic
system administration stuff.  In the mean time, ...

      $ set default sys$system
      $ run authorize
      UAF> show ingres

Interesting items would include:

      Default:
      LGICMD:

   You seem to be editing one LOGIN.COM, while the system is using a
different one.

peresw
Occasional Advisor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

All,

After setting  to the proper LOGIN.COM (as suggested), the entries or "aliases" are working.

1. set def $1$DUA110:[INGRES64.INGRES]

$ dir

Directory $1$DUA110:[INGRES64.INGRES]

edit LOGIN.COM
added
$! UNIX like commands
$who :== "SHOW USER"
$lsltr :== "DIR/DATE/OWNER"

logout/logon

$ who
OpenVMS User Processes at 21-SEP-2017 13:07:12.35
Total number of users = 4, number of processes = 15

Username Interactive Subprocess Batch
A27O6QT 3
INGRES 1
RABBIN 1
UNKRICH 10
$ lsltr

Directory $1$DUA110:[INGRES]

ABF.DIR;1 29-DEC-1997 11:08:38.17 [SYSTEM]
ACP_START.COM;4 1-AUG-2017 14:47:06.58 [SYSTEM]

Thank you all for the imputs and contribuitions. :)

 

Steven Schweda
Honored Contributor

Re: LOGIN.COM file. How, if possible, can I add UNIX commands to my LOGIN.COM ?

> After setting  to the proper LOGIN.COM (as suggested), the entries or
> "aliases" are working.

   What could go wrong?

> $who :== "SHOW USER"

   You still don't need the quotation marks with := (or :==).  (That's
the benefit of := .)

      help :=
      help =