TUCoPS :: Antique Systems :: vaxfaq2.txt

Faq on VAX Part 2


Archive-name:   info-vax/part02
Last-modified:  1992/10/28

[Changes since last posting: Rewrote the MAI1 for clarity..]

           The Info-VAX Monthly Posting
           ----------------------------
           PART 2 -- Beginner "Common Questions".
           (Coordinated by Dick Munroe, written by many others)

(Part 1 is an introduction to Info-VAX.  Part 3 is Advanced Common Questions.
Part 4 is about how to find software.)

Save this message for future reference!

Table of Contents:

,GEN   -- General beginner questions (the Top 7 quickies) updated 1989-10-03
          Many, many authors
,RDT   -- Why doesn't my program work when RUN/DETATCH'ed?  added 1990-01-31
          sommar@enea.se (Erland Sommarskog)
          Leichter-Jerry@cs.yale.edu (Jerry Leichter)
,LIC   -- Linking and VAX C                               updated 1989-01-06
          pjt@yin.cpac.washington.edu (Larry Setlow)
          TAYLORT@decus.com.au (Trevor Taylor)
,TIM   -- Why does VMS time start at November 17, 1858    updated 1989-08-28
          billy@vaxb.acs.unt.edu (Billy Barron & DEC)
,VAC   -- The VAX Vacuum cleaner                            added 1989-12-28
          schuette@acoustics.nrl.navy.mil (Larry Schuette)
      and KLENSIN@infoods.mit.edu (John C. Klensin)
,MAI   -- Mail tips                                       updated 1992-10-28
          CADS_COLE@GALLUA.BITNET (Kevin Cole)
          BRYDON@dsny25.SINet.SLB.COM
,MAI1  -- Resetting the new mail counter.                   added 1992-10-28
	  Fairfield@Slacvx.Slac.Stanford.Edu (Dr. Kenneth H. Fairfield)
          BRYDON@dsny25.SINet.SLB.COM
,QU1   -- Disk quotas                                     updated 1989-09-02
          Rollo.Ross@levels.sait.oz.au
,QU2   -- Diskquota Discrepency                           updated 1989-09-02
          R602MS5U@vb.cc.cmu.edu (Marc Shannon)
,U*XARGS -- How to get my U*x program to accept arguments.        1992-10-28
          tp@mccall.com (Terry Poot)
,VI    -- Where is VI for VMS?                              added 1992-10-28
          ewilts@galaxy.gov.bc.ca (Ed Wilts)
          
[There are two articles on disk quota because I couldn't decide which to use.
If someone would like to edit them into one article and submit it, fine. -TAL]
,CPD   -- How to copy an entire directory structure       updated 1989-08-03
          bfoss@goofy.apple.com (Brad Foss)

(the ",REQ", ",GEN", etc. are keywords.  If you search for that text
(including the ",") you will be brought to the beginning of that article.)

---------------------------------------------------------------------
,GEN
General questions answered (from various sources)

1.  Where can I get old Info-VAX messages?

The archives are held at SRI.COM (128.18.10.1), in files with obvious names
like "info-vax.txt.1".  Ramon Curiel <RAY@CRVAX.SRI.COM> does the thankless
job of maintaining them.  (Yea Ramon!)

In the UK, archives are accessible via a mail server.  People should
send a message, with EITHER the subject field OR the message body
containing HELP, to info-vax-request@Uk.Ac.Ulcc.Ncdlab (addresses in the
UK are the opposite way round from the rest of the worlds ...  sigh...)
The server will tell you what to do.

Two years worth of Info-VAX messages are stored at VTVM2 which is a
Bitnet redistribution point.  If you have an account there, it is best
to use the database searcher.  Otherwise send the commands to
LISTSERV@VTVM2 using TELL (on an IBM system) or SEND (on a VMS system)
or "netwrite" (on a Unix system with the UREP software).  Send HELP
and INFO commands to get started.  A sample command is something like:
"$ SEND LISTSERV@VTVM2 SEND INFO-VAX LOG8901B" which will get you some
of the messages from Jan 1989.  You can also use INDEX to get a list
of the Info-VAX files archived.

[Any more places?  Please tell me!  -TAL ]

2.  How do I reset my new mail count when it gets out of sync?
In other words, what do I do when it says, "You have 1 new mail
message" but I really don't?

Simple: Send yourself a mail message OR have someone else mail you a
message.  If you are in MAIL, exit and re-enter mail.  At the MAIL>
prompt, type READ/NEW until it tells you that there are no new
messages.  Then enter READ/NEW one more time.  Everything is fixed.

3.  What is the plural of VAX?

VAXen, VAXln, VAXlen, VAXs, VAXes and just about everything else you can
imagine.  It's been discussed on the net many times and there has never been
a conclusion.  Therefore, you may call it anything you want.

It has been pointed out that officially DEC and its lawyers consider VAX an
adjective. This is required by trademark law, since you apparently can't
trademark a noun. Thus the "correct" plural is VAX systems or VAX
processors. There is no such thing as a VAX! :-)

4.  Where do I get VI, Kermit, (X,Y,Z)Modem, UUCP, ANU news, GNU software,
LZW/Compress/Decompress ?

See the monthly "Info-VAX: How to find software" posting.

5.  What's DECUS?

There is a separate monthly posting about DECUS.  Look for it.

6.   What do you do about "undeliverable mail" messages that bounce back
to you from various sites when you post a message to Info-VAX?
     
If the reason is "MTA congestion" just delete them.  If the reason is a bad
address, contact the postmaster at the destination site, suggesting that he
request that the addressee be removed from the Info-VAX mailing list.

7.  How can I submit a correction or addition to this monthly posting?

Check out the signature for addresses.  Additions are always welcome,
corrections are prefered to be in VMS DIFF format if they are specific.
Unix DIFF format isn't as human-readable and almost never matches up with
the text I have stored here.

---------------------------------------------------------------------
,RDT
Date: Tue, 2 Jan 90 22:53:30 +0100
>From: "Erland Sommarskog" <sommar@enea.se>
Subject: Why doesn't my program work when RUN/DETATCH'ed?

     A question that seem to be fairly common goes like this:  "We
have program that runs as a detached process and tries to create a
subprocess with LIB$Spawn but always fail.  When we run the program
in the debugger everything works OK."

     The answer to this one is when you run a program in a detached
process there is no command line interpreter (CLI) - e.g. DCL - and
since LIB$Spawn is a callback to the CLI it can't but fail.  The same
applies to other callback routines like LIB$Set_logical and LIB$Set_symbol.

The solution is simple.  Instead of starting the program
with RUN/DETACH Prog you should do:

        RUN/DETACH SYS$SYSTEM:LOGINOUT/INPUT=PROG.COM
where PROG.COM contains the line RUN PROG.

>From: Leichter-Jerry@cs.yale.edu
Date: Wed, 31 Jan 90 12:51 EST

[What Erland said is] basically correct, but there is one tricky thing
that it's important to watch out for:  The names you use for /INPUT and
/OUTPUT and /ERROR on RUN/DET (you would normally define all three so
that you could see what happened) are passed to the created process
UNTRANSLATED.  The new process will use them to define its values of
SYS$INPUT, SYS$OUTPUT, and SYS$ERROR.  At the point that the new
process does that, the names must be valid.  Hence, the only logical
names you can use are those known system-wide.

You can use $CREPRC in place of LIB$SPAWN if you don't need LIB$SPAWN's
ability to pass logical names and such.
							-- Jerry

---------------------------------------------------------------------
,LIC
Subject: Linking and VAX C
>From: Larry Setlow <pjt@yin.cpac.washington.edu>
Date: Fri, 8 Sep 89 10:35:48 -0700

A recent posting (maybe you saw it) reminds me of another
frequently-asked question:  "How come we have to have the vaxcrtl
explicitly added to the LINK command?"

I'm not sure I know the whole answer, other than "the C library's
names are too likely to conflict with user-named routines, so we can't
do it automatically without pissing a lot of people off, and we don't
like C very much, anyway, so nyah." but I know it's been covered a few
times before.

Larry

[ Note from the editor:  Trevor Taylor <TAYLORT@decus.com.au> has
pointed out some other information which encouraged me to write this: ]

If you explicitly link with that library you'll get an old library.
It's better to link to the sharable library, then you'll aways get the
newest library.

This is not documented in the HELP file (try HELP CC LINK for the old
method), just the VAX C manual that I have.  The manual doesn't mention
the dangers of the first method but does mention that using the
sharable library saves disk space and makes your program load faster.
One program I use was 154 blocks, with the shareable library it is 5 blocks.

You must use the shareable image if you want to have the most
up-to-date library.  The only way is to use an options file.  Create
a file called VAXC.OPT containing the line:

	SYS$LIBRARY:VAXCRTL/SHARE

Then link as follows:

	$ LINK myprog,VAXC/OPT

---------------------------------------------------------------------
,TIM
[ DEC wrote it, Billy Barron <billy@vaxb.acs.unt.edu> submitted it, I edited
it down (it included a complete history of time telling and calendars) -TAL ]

COMPONENT:  SYSTEM TIME                  OP/SYS:     VMS, Version 4.n

LAST TECHNICAL REVIEW:  06-APR-1988

SOURCE:   Customer Support Center/Colorado Springs

QUESTION: Why is Wednesday, November 17, 1858 the base time for VAX/VMS?

ANSWER:   November 17, 1858 is the base of the Modified Julian Day system.

The Modified Julian Day was adopted by the Smithsonian Astrophysical Obser-
vatory (SAO) in 1957 for satellite tracking.

Eighteen bits would allow the Modified Julian Day (the SAO day) to grow as
large as 262,143 ((2 ** 18) - 1).  From Nov.  17, 1858, this allowed for
seven centuries.  Using only 17 bits, the date could possibly grow only as
large as 131,071, but this still covers 3 centuries, as well as leaving the
possibility of representing negative time.  The year 1858 preceded the
oldest star catalog in use at SAO, which also avoided having to use negative
time in any of the satellite tracking calculations.

This base time of Nov.  17, 1858 has since been used by TOPS-10, TOPS-20,
and VAX/VMS.  Given this base date, the 100 nanosecond granularity
implemented within VAX/VMS, and the 63-bit absolute time representation (the
sign bit must be clear), VMS should have no trouble with time until:
     
   31-JUL-31086 02:48:05.47
     
At this time, all clocks and time-keeping operations within VMS will
suddenly stop, as system time values go negative.
     
Note that all time display and manipulation routines within VMS allow
for only 4 digits within the 'YEAR' field.  We expect this to be corrected
in a future release of VAX/VMS sometime prior to 31-DEC-9999.

---------------------------------------------------------------------
,VAC
Date: 26 Dec 89 09:49:00 EDT
>From: "Larry Schuette" <schuette@acoustics.nrl.navy.mil>
Subject: VAX vacuum

	The VAX vacuum has been available in the U.K. long before DEC
ever thought of building a 32bit processor.  When DEC did a trademark search
they only checked the U.S. (or at least not the U.K).  Much to their chagrin,
DEC discovered (too late) that VAX was already a licensed trademark in the U.K.
A deal was struck, and because the products are not similar, life goes on.
	However, DEC would be in trouble should the vacuum cleaner company
decide to make "computers that suck" as well.
	The best part of this story is that, every few years, a new eager 
Digital lawyer will "discover" that some British company has "stolen" the 
VAX trademark.  Typically, in an effort to impress the boss, they will fire
off letters threatening legal action unless some license (read money) is sent
DEC's way.  The lawyer is then shot down in flames when the same standard form
letter is sent from the U.K.

Larry

[ Thanks, Larry.  I also got a note from John C.
Klensin <KLENSIN@infoods.mit.edu> on Thu, 28 Dec 1989 asking:

>     If there is really any interest in this, the term apparently also
>  means something (non-computer) in Sweden.  When I was last there,
>  I saw "VAX" plastered in large letters on the outside of several
>  buildings out in the sticks along highways.  I never got around to
>  asking what they were associated with, but the buildings tended to
>  be surrounded by heavy machinery, of the road-grading variety.
>    I can pursue this if you like, otherwise will leave well enough
>  alone.
>     John Klensin
>     Klensin@INFOODS.MIT.EDU

[ Ok Info-VAXers, any answers?  Them to me.  -TAL ]

---------------------------------------------------------------------
,MAI
>From: "Kevin Cole at Gallaudet U. Washington DC" <CADS_COLE@GALLUA.BITNET>
Subject: Mail tips

[Some of these symbols may conflict with those in the ,SIGS posting, but the
information is still good.  -TAL
The following applies to VMS systems prior to VMS V5.0.  The MAIL$EDIT logical
may not be supported in later versions of VMS.]

To tell MAIL to use an editor, include the following line in your LOGIN.COM:
     
        $ MAIL  :== MAIL/EDIT=(SEND,REPLY=EXTRACT,FORWARD)
     
(Remove the "=EXTRACT" from the above line if you do not want the text from
old messages to be included in replies and forwarded messages.)  MAIL will
default to CALLABLE_EDT as it's choice of editor.  If you would prefer to use
EVE/TPU, put the folllowing in your LOGIN.COM as well:
     
        $ DEFINE/NOLOG MAIL$EDIT        CALLABLE_TPU
     
Another option is to have MAIL spawn a seperate process for editing.  You might
wish to do this if you have a COM file which you want executed every time you
use MAIL.  For example, I have one which turns off broadcasts before starting
the editor so that I do not get interrupted while sending mail.  In that case,
just define the logical MAIL$EDIT to point to your COM file instead of a
callable editor.  Like so:
     
        $ DEFINE/NOLOG MAIL$EDIT        SYS$LOGIN:MAILEDIT.COM
     
Finally, if you wish to redefine the numeric keypad functions while within mail
you can create a file (say, for example MAIL.INI) which contains the new
definitions:
     
        DEFINE/KEY PF2                "SHOW KEY/ALL"/TERMINATE
        DEFINE/KEY PF2/IF_STATE=GOLD  "SHOW KEY/ALL/STATE=GOLD"/TERMINATE
        DEFINE/KEY PF3                "EXTRACT"/TERMINATE
        DEFINE/KEY PF4                "IN%"""INFO-VAX@KL.SRI.COM""""/TERMINATE
        DEFINE/KEY PERIOD             "DELETE"/TERMINATE
        DEFINE/KEY ENTER              ""/TERMINATE
     
And add a line in your LOGIN.COM which points the logical MAIL$INIT at the file
     
        $ DEFINE/NOLOG MAIL$INIT        SYS$LOGIN:MAIL.INI

This supported mechanism in VMS V5.0 and later is:

        $ MAIL 
        MAIL> SET EDIT TPU
        MAIL> EXIT

and remove any definitions of MAIL$EDIT that you may have.
--------------------------------------------------------------------------------
,MAI1
>From: fairfield@slacvx.slac.stanford.edu
>Subject:Re: New Mail won't die!
>
>In article <bs6m_l_.mendi@netcom.com>, mendi@netcom.com (Greg Mendizabal) writes:
>> ...
>> Now, everytime I logon I have 1638 new mail messages.  I cannot eradicate
>> this "flag".  I've tried deleting my mail directory, the "mail" itself 
>> (ie send myself new mail and then do a del/all within mail). 
>> ...
>> So, where is this flag bit set and kept????  We have another account with
>> the same problem (only 2 msgs however).
>> 
>> This is driving me nuts!  ;-)

    1. Start up MAIL.
    2. If your MAIL.MAI file has been deleted, send yourself a mail message
       (any mail message).
    3. Issue READ/NEW until you see the following:

       %MAIL-W-NONEWMAIL, no new messages

    4. Exit mail.

The new mail counter has been reset.
---------------------------------------------------------------------
,QU1
>From: Rollo.Ross@levels.sait.oz.au
Subject: Diskquotas
Date: Sat, 2 Sep 89 22:52 +0930

         Users often complain that their disk usage as shown by SHOW QUOTA
doesn't match the total size of their files. Here are some reasons why this
happens:

1) Every file consists of at least one 1-block header and some number of
clusters, which are usually 3 blocks long. You may have only 1 block of
data, but you have removed 4 blocks from the space available to others, and
your quota shows 4 blocks gone. To see the effect of this, use
        $ DIR [...]/SIZE=ALL/GRAND
The "SIZE=ALL" shows both the space used and the number of blocks allocated
to the file. It does not show the 1 block header for each file, but you can
see how much this adds up to by looking at the count of files shown. So, if
you add together the LARGER of the two sizes shown in the grand total given by
the command above, and the total number of files, you have a better idea of
the total number of blocks allocated to you.

2) You may have files owned by you but stored in other directories. Your
own top-level directory is an example - it is is a xxxxx.DIR file stored in
the directory "above" where you log in. You can check the size of that file
using  the command DIR/SIZE=ALL/BY [-]

3) The quota file is sometimes inaccurate. For example, it may not get
updated if the system crashes just after you increase or decrease your
usage. Bugs in VMS on a cluster also cause the quota file to drift out of
touch with reality.  Your system manager may need to do some disk maintenance
(ANALYZE/DISK/REPAIR dev) to fix this problem.  Check with him/her to see
if this is the case.

        So, your problem is probably partly misunderstanding of how your
disk  quota works (items 1 and 2 above), possibly confused by a bug in the
system (item 3).

Rollo Ross, Network Manager
Comp Centre,  Sth Aust Institute of Technology, The Levels, SA 5095, Australia
Voice: +61 8 343 3158                 Old way:  Rollo.Ross@levels.sait.oz{.au}
Fax: 349 6939      DTE 505282622004       Standard way: Rollo.Ross@sait.edu.au

---------------------------------------------------------------------
,QU2
Subject: Diskquota Discrepency
>From: Marc Shannon <R602MS5U@vb.cc.cmu.edu>
Date: Sat,  2 Sep 89 16:35:58
     
     The SHOW QUOTA returns the number of blocks you have allocated over
the entire disk.  Presuming that all of your files are in your directory
tree, use the DIRECTORY/SIZE=ALLOC/GRAND [...] command (from your home
directory) to see just how many blocks you are using.

     Note the "/SIZE=ALLOC" qualifier; this has DIRECTORY report the
number of blocks which each file is *allocated*, not just in actual use.
(Most systems have a "cluster-size" of 3 which means that every file
must take up a multiple of 3 blocks, so even files with one line in them
take up 3 blocks.)

     Okay, now you're getting close, but VMS still charges you a bit
more.  For every file you own, you are also charged 1 block so that VMS
can store information in the INDEXF.SYS file on your disk about how to
find your file.  So, take your total number of blocks and add the number
of files and directories found in your directory tree.

       Now you should be almost at the number reached by SHOW QUOTA.
Don't forget your main directory.  Use DIR/SIZE=ALLOC [-]username.DIR to
see how large your main directory file is and add that (plus 1 for its
INDEXF entry) to your total.
     
       This final total should be what SHOW QUOTA returns.
     
--Marc

---------------------------------------------------------------------
,U*XARGS

From: tp@mccall.com (Terry Poot)
Subject:Re: Passing args to C programs

In the C code, everything is the same. However, you have to define a foreign
command symbol for your program. For instance, if your executable is
dua0:[foo]test.exe, enter

foo :== $dua0:[foo]test.exe

You can then run your program as:

foo arg1 arg2

and the command line arguments will be passed through argc and argv as usual.

A few notes:

1) Note the "$" at the beginning of the file spec, it's required. Also, the
filespec will default to looking in sys$system for the executable so be sure to
use a fully qualified file name (i.e. include the device and directory or some
logical name that points to the device and directory.

2) DCL normally forces all unquoted arguments to upper case. The C run-time
library counters this by forcing them all to lower case. If you want an
argument
to be passed in upper or mixed case, you have to quote it, as in:

foo "-AaBb" arg1 Arg2 ARG3 "Arg4"

In the above, the options string and Arg4 will get through in mixed case, args
1-3 will all be lower case. And don't try the short cut of quoting all the args
with one set of quotes, because that will make the whole quoted string one
argument.

3) argv[0] is NOT the command typed to run the program, it is the whole fully
qualified file name. This can mess up the way most unix programs print their
error messages. Of course, your program can do something like:

#ifdef VMS
argv[0] = "foo"
#endif

to get around this.

Obtw, yes this is the right group for this type of question.
---------------------------------------------------------------------
,VI
From: ewilts@galaxy.gov.bc.ca (Ed Wilts)
Subject:Re: VMS version of vi

In article <1992Oct15.170036.569@cine88.cineca.it>, le9miiwa@cine88.cineca.it
writes:
> 
> Does somewhere exist a VMS version of 'vi, the Unix editor
> quite a lot of people here would *jump*  on it!

This should be in the FAQ...  It's bundled with Posix (and the Posix license is
*free* with VMS 5.5 - just load the media from the CD.

$ posix posix$bin:vi. login.com

---------------------------------------------------------------------
,CPDIR
>From: bfoss@goofy.apple.com (Brad Foss)
Subject: Copy-Directory to Remote Host
Organization: Network Innovations
Lines: 26

>    Does anyone know why DECNET doesn't support the copying of directories
> with unknown sub-directory structure?  Right now, to copy a directory
> between 2 vaxes I must login to the destination host, create all the
> sub-directories required in the destiation directory and use individual
> copy commands to pull the files from each source host sub-directory into
> the destination directory.

I've had occasion to move directory structures, even whole disks to a remote
node.  The only way I've succeeded at it is to use BACKUP to create a
saveset on the remote host, then log in to the remote host and backup
(restore) the saveset to the desired disk.  Like this;

    (at local host)
$ BACKUP/LOG DISK:[DIR...]*.*;* REMOTE::DISK:[DIR]SAVESET.BCK/SAVE

( at remote host)
$ BACKUP/LOG DISK:[DIR]SAVESET.BCK/SAVE DISK:[*...]

You said any help would be appreciated, and this sure beats having to create
directories and use COPY.  BACKUP will create the directories as needed.  I
expect others will suggest that you create the saveset on the local host,
then DECnet it to the remote host.  It seems to run a little quicker that
way.
--
Dick Munroe				Internet: munroe@dmc.com
Doyle Munroe Consultants, Inc.		UUCP: ...uunet!thehulk!munroe
267 Cox St.				Office: (508) 568-1618
Hudson, Ma. USA				FAX: (508) 562-1133

GET CONNECTED!!! Send mail to info@dmc.com to find out about DMConnection.


TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH