A From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 10-MAY-1993 10:24:03.49  To:	EVERHART CC:	( Subj:	Info-VAX: "Basic" Common Questions  2 X-Newsgroups: vmsnet.misc,comp.os.vms,news.answers+ Subject: Info-VAX: "Basic" Common Questions 0 Message-ID: <info-vax-2.19930201.040054@dmc.com> From: munroe@dmc.com Date: 10 May 93 05:40:39 EDT Followup-To: vmsnet.misc Expires: 15 Mar 93 00:00:00 GMT E Organization: Doyle, Munroe Consultants, Inc., Hudson, Ma. 01749, USA  Approved: munroe@dmc.com0 Supersedes: <info-vax-2.19930101.040251@dmc.com>
 Lines: 535 To: Info-VAX@KL.SRI.COM  X-Gateway-Source-Info: USENET    Archive-name:   info-vax/part02  Last-modified:  1992/10/28  < [Changes since last posting: Rewrote the MAI1 for clarity..]  '            The Info-VAX Monthly Posting '            ---------------------------- 1            PART 2 -- Beginner "Common Questions". ?            (Coordinated by Dick Munroe, written by many others)   M (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:  L ,GEN   -- General beginner questions (the Top 7 quickies) updated 1989-10-03           Many, many authorsL ,RDT   -- Why doesn't my program work when RUN/DETATCH'ed?  added 1990-01-31,           sommar@enea.se (Erland Sommarskog)5           Leichter-Jerry@cs.yale.edu (Jerry Leichter) L ,LIC   -- Linking and VAX C                               updated 1989-01-064           pjt@yin.cpac.washington.edu (Larry Setlow).           TAYLORT@decus.com.au (Trevor Taylor)L ,TIM   -- Why does VMS time start at November 17, 1858    updated 1989-08-285           billy@vaxb.acs.unt.edu (Billy Barron & DEC) L ,VAC   -- The VAX Vacuum cleaner                            added 1989-12-28:           schuette@acoustics.nrl.navy.mil (Larry Schuette)3       and KLENSIN@infoods.mit.edu (John C. Klensin) L ,MAI   -- Mail tips                                       updated 1992-10-28.           CADS_COLE@GALLUA.BITNET (Kevin Cole)%           BRYDON@dsny25.SINet.SLB.COM L ,MAI1  -- Resetting the new mail counter.                   added 1992-10-28@ 	  Fairfield@Slacvx.Slac.Stanford.Edu (Dr. Kenneth H. Fairfield)%           BRYDON@dsny25.SINet.SLB.COM L ,QU1   -- Disk quotas                                     updated 1989-09-02&           Rollo.Ross@levels.sait.oz.auL ,QU2   -- Diskquota Discrepency                           updated 1989-09-02/           R602MS5U@vb.cc.cmu.edu (Marc Shannon) L ,U*XARGS -- How to get my U*x program to accept arguments.        1992-10-28$           tp@mccall.com (Terry Poot)L ,VI    -- Where is VI for VMS?                              added 1992-10-28,           ewilts@galaxy.gov.bc.ca (Ed Wilts)
           M [There are two articles on disk quota because I couldn't decide which to use. N If someone would like to edit them into one article and submit it, fine. -TAL]L ,CPD   -- How to copy an entire directory structure       updated 1989-08-03+           bfoss@goofy.apple.com (Brad Foss)   D (the ",REQ", ",GEN", etc. are keywords.  If you search for that textJ (including the ",") you will be brought to the beginning of that article.)  E ---------------------------------------------------------------------  ,GEN1 General questions answered (from various sources)   * 1.  Where can I get old Info-VAX messages?  K The archives are held at SRI.COM (128.18.10.1), in files with obvious names K like "info-vax.txt.1".  Ramon Curiel <RAY@CRVAX.SRI.COM> does the thankless & job of maintaining them.  (Yea Ramon!)  D In the UK, archives are accessible via a mail server.  People shouldA send a message, with EITHER the subject field OR the message body H containing HELP, to info-vax-request@Uk.Ac.Ulcc.Ncdlab (addresses in theG UK are the opposite way round from the rest of the worlds ...  sigh...) $ The server will tell you what to do.  C Two years worth of Info-VAX messages are stored at VTVM2 which is a F Bitnet redistribution point.  If you have an account there, it is best= to use the database searcher.  Otherwise send the commands to F LISTSERV@VTVM2 using TELL (on an IBM system) or SEND (on a VMS system)C or "netwrite" (on a Unix system with the UREP software).  Send HELP F and INFO commands to get started.  A sample command is something like:F "$ SEND LISTSERV@VTVM2 SEND INFO-VAX LOG8901B" which will get you someD 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?  D Simple: Send yourself a mail message OR have someone else mail you aC 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 newC messages.  Then enter READ/NEW one more time.  Everything is fixed.    3.  What is the plural of VAX?  H VAXen, VAXln, VAXlen, VAXs, VAXes and just about everything else you canL 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.  K It has been pointed out that officially DEC and its lawyers consider VAX an H adjective. This is required by trademark law, since you apparently can'tA trademark a noun. Thus the "correct" plural is VAX systems or VAX 0 processors. There is no such thing as a VAX! :-)  J 4.  Where do I get VI, Kermit, (X,Y,Z)Modem, UUCP, ANU news, GNU software, LZW/Compress/Decompress ?   9 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.  H 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?       K If the reason is "MTA congestion" just delete them.  If the reason is a bad K address, contact the postmaster at the destination site, suggesting that he E request that the addressee be removed from the Info-VAX mailing list.   F 7.  How can I submit a correction or addition to this monthly posting?  E Check out the signature for addresses.  Additions are always welcome, G corrections are prefered to be in VMS DIFF format if they are specific. I Unix DIFF format isn't as human-readable and almost never matches up with  the text I have stored here.  E ---------------------------------------------------------------------  ,RDT" Date: Tue, 2 Jan 90 22:53:30 +0100+ >From: "Erland Sommarskog" <sommar@enea.se> 9 Subject: Why doesn't my program work when RUN/DETATCH'ed?   B      A question that seem to be fairly common goes like this:  "WeB have program that runs as a detached process and tries to create aC subprocess with LIB$Spawn but always fail.  When we run the program % in the debugger everything works OK."   C      The answer to this one is when you run a program in a detached C process there is no command line interpreter (CLI) - e.g. DCL - and E since LIB$Spawn is a callback to the CLI it can't but fail.  The same K applies to other callback routines like LIB$Set_logical and LIB$Set_symbol.   8 The solution is simple.  Instead of starting the program# with RUN/DETACH Prog you should do:   5         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  F [What Erland said is] basically correct, but there is one tricky thingG that it's important to watch out for:  The names you use for /INPUT and E /OUTPUT and /ERROR on RUN/DET (you would normally define all three so C that you could see what happened) are passed to the created process D UNTRANSLATED.  The new process will use them to define its values of@ SYS$INPUT, SYS$OUTPUT, and SYS$ERROR.  At the point that the newD process does that, the names must be valid.  Hence, the only logical. names you can use are those known system-wide.  G 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   E ---------------------------------------------------------------------4 ,LIC Subject: Linking and VAX C1 >From: Larry Setlow <pjt@yin.cpac.washington.edu>n" Date: Fri, 8 Sep 89 10:35:48 -0700  9 A recent posting (maybe you saw it) reminds me of another-A frequently-asked question:  "How come we have to have the vaxcrtl9& explicitly added to the LINK command?"  A I'm not sure I know the whole answer, other than "the C library'slF names are too likely to conflict with user-named routines, so we can'tE do it automatically without pissing a lot of people off, and we don'tRF like C very much, anyway, so nyah." but I know it's been covered a few
 times before.e   Larry1  A [ Note from the editor:  Trevor Taylor <TAYLORT@decus.com.au> has G pointed out some other information which encouraged me to write this: ]-  C If you explicitly link with that library you'll get an old library. F It's better to link to the sharable library, then you'll aways get the newest library.   E This is not documented in the HELP file (try HELP CC LINK for the oldfG method), just the VAX C manual that I have.  The manual doesn't mentionn? the dangers of the first method but does mention that using thesE sharable library saves disk space and makes your program load faster.'L 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 mosteD up-to-date library.  The only way is to use an options file.  Create+ a file called VAXC.OPT containing the line:c   	SYS$LIBRARY:VAXCRTL/SHARE   Then link as follows:.   	$ LINK myprog,VAXC/OPTM  E ---------------------------------------------------------------------  ,TIML [ DEC wrote it, Billy Barron <billy@vaxb.acs.unt.edu> submitted it, I editedM it down (it included a complete history of time telling and calendars) -TAL ]n  E COMPONENT:  SYSTEM TIME                  OP/SYS:     VMS, Version 4.nK  # LAST TECHNICAL REVIEW:  06-APR-1988   2 SOURCE:   Customer Support Center/Colorado Springs  H QUESTION: Why is Wednesday, November 17, 1858 the base time for VAX/VMS?  J ANSWER:   November 17, 1858 is the base of the Modified Julian Day system.  K The Modified Julian Day was adopted by the Smithsonian Astrophysical Obser- , vatory (SAO) in 1957 for satellite tracking.  J Eighteen bits would allow the Modified Julian Day (the SAO day) to grow asH large as 262,143 ((2 ** 18) - 1).  From Nov.  17, 1858, this allowed forJ seven centuries.  Using only 17 bits, the date could possibly grow only asK large as 131,071, but this still covers 3 centuries, as well as leaving the-F possibility of representing negative time.  The year 1858 preceded theL oldest star catalog in use at SAO, which also avoided having to use negative3 time in any of the satellite tracking calculations.n  I This base time of Nov.  17, 1858 has since been used by TOPS-10, TOPS-20,oB and VAX/VMS.  Given this base date, the 100 nanosecond granularityL implemented within VAX/VMS, and the 63-bit absolute time representation (theD sign bit must be clear), VMS should have no trouble with time until:      I    31-JUL-31086 02:48:05.47i      gD At this time, all clocks and time-keeping operations within VMS will1 suddenly stop, as system time values go negative.-      -E Note that all time display and manipulation routines within VMS allow.J 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.t  E ---------------------------------------------------------------------i ,VAC Date: 26 Dec 89 09:49:00 EDT9 >From: "Larry Schuette" <schuette@acoustics.nrl.navy.mil>d Subject: VAX vacuumh  > 	The VAX vacuum has been available in the U.K. long before DECL ever thought of building a 32bit processor.  When DEC did a trademark searchM they only checked the U.S. (or at least not the U.K).  Much to their chagrin,aO DEC discovered (too late) that VAX was already a licensed trademark in the U.K. J A deal was struck, and because the products are not similar, life goes on.C 	However, DEC would be in trouble should the vacuum cleaner companyV- decide to make "computers that suck" as well.aC 	The best part of this story is that, every few years, a new eager .J Digital lawyer will "discover" that some British company has "stolen" the K VAX trademark.  Typically, in an effort to impress the boss, they will fireoM off letters threatening legal action unless some license (read money) is senteN DEC's way.  The lawyer is then shot down in flames when the same standard form letter is sent from the U.K.   Larryt  0 [ Thanks, Larry.  I also got a note from John C.= Klensin <KLENSIN@infoods.mit.edu> on Thu, 28 Dec 1989 asking:   G >     If there is really any interest in this, the term apparently alsosD >  means something (non-computer) in Sweden.  When I was last there,C >  I saw "VAX" plastered in large letters on the outside of several E >  buildings out in the sticks along highways.  I never got around toiE >  asking what they were associated with, but the buildings tended totA >  be surrounded by heavy machinery, of the road-grading variety.mD >    I can pursue this if you like, otherwise will leave well enough	 >  alone.t >     John Klensin >     Klensin@INFOODS.MIT.EDUc  3 [ Ok Info-VAXers, any answers?  Them to me.  -TAL ]T  E ---------------------------------------------------------------------  ,MAIK >From: "Kevin Cole at Gallaudet U. Washington DC" <CADS_COLE@GALLUA.BITNET>h Subject: Mail tips  L [Some of these symbols may conflict with those in the ,SIGS posting, but the  information is still good.  -TALN The following applies to VMS systems prior to VMS V5.0.  The MAIL$EDIT logical/ may not be supported in later versions of VMS.]   L To tell MAIL to use an editor, include the following line in your LOGIN.COM:      k:         $ MAIL  :== MAIL/EDIT=(SEND,REPLY=EXTRACT,FORWARD)       K (Remove the "=EXTRACT" from the above line if you do not want the text from J old messages to be included in replies and forwarded messages.)  MAIL willM default to CALLABLE_EDT as it's choice of editor.  If you would prefer to use 6 EVE/TPU, put the folllowing in your LOGIN.COM as well:       4         $ DEFINE/NOLOG MAIL$EDIT        CALLABLE_TPU       O Another option is to have MAIL spawn a seperate process for editing.  You mightrM wish to do this if you have a COM file which you want executed every time you M use MAIL.  For example, I have one which turns off broadcasts before starting-N the editor so that I do not get interrupted while sending mail.  In that case,H just define the logical MAIL$EDIT to point to your COM file instead of a callable editor.  Like so:      A>         $ DEFINE/NOLOG MAIL$EDIT        SYS$LOGIN:MAILEDIT.COM      rO Finally, if you wish to redefine the numeric keypad functions while within mailwH you can create a file (say, for example MAIL.INI) which contains the new definitions:      e>         DEFINE/KEY PF2                "SHOW KEY/ALL"/TERMINATEI         DEFINE/KEY PF2/IF_STATE=GOLD  "SHOW KEY/ALL/STATE=GOLD"/TERMINATEI9         DEFINE/KEY PF3                "EXTRACT"/TERMINATEmN         DEFINE/KEY PF4                "IN%"""INFO-VAX@KL.SRI.COM""""/TERMINATE8         DEFINE/KEY PERIOD             "DELETE"/TERMINATE2         DEFINE/KEY ENTER              ""/TERMINATE      AO And add a line in your LOGIN.COM which points the logical MAIL$INIT at the file.      o:         $ DEFINE/NOLOG MAIL$INIT        SYS$LOGIN:MAIL.INI  2 This supported mechanism in VMS V5.0 and later is:           $ MAIL i         MAIL> SET EDIT TPU         MAIL> EXIT  : and remove any definitions of MAIL$EDIT that you may have.P -------------------------------------------------------------------------------- ,MAI1h) >From: fairfield@slacvx.slac.stanford.edup  >Subject:Re: New Mail won't die! >lR >In article <bs6m_l_.mendi@netcom.com>, mendi@netcom.com (Greg Mendizabal) writes: >> ...L >> Now, everytime I logon I have 1638 new mail messages.  I cannot eradicateJ >> 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).  >> ...L >> So, where is this flag bit set and kept????  We have another account with* >> the same problem (only 2 msgs however). >> y  >> This is driving me nuts!  ;-)       1. Start up MAIL. K     2. If your MAIL.MAI file has been deleted, send yourself a mail message         (any mail message).2     3. Issue READ/NEW until you see the following:  )        %MAIL-W-NONEWMAIL, no new messagesk       4. Exit mail.   $ The new mail counter has been reset.E ---------------------------------------------------------------------o ,QU1# >From: Rollo.Ross@levels.sait.oz.auf Subject: Diskquotase Date: Sat, 2 Sep 89 22:52 +0930u  J          Users often complain that their disk usage as shown by SHOW QUOTAK doesn't match the total size of their files. Here are some reasons why thisf happens:  H 1) Every file consists of at least one 1-block header and some number ofG clusters, which are usually 3 blocks long. You may have only 1 block ofrK 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/GRANDK The "SIZE=ALL" shows both the space used and the number of blocks allocatednK to the file. It does not show the 1 block header for each file, but you can'K see how much this adds up to by looking at the count of files shown. So, if.N you add together the LARGER of the two sizes shown in the grand total given byK the command above, and the total number of files, you have a better idea ofO, the total number of blocks allocated to you.  H 2) You may have files owned by you but stored in other directories. YourK own top-level directory is an example - it is is a xxxxx.DIR file stored intK the directory "above" where you log in. You can check the size of that filei& using  the command DIR/SIZE=ALL/BY [-]  F 3) The quota file is sometimes inaccurate. For example, it may not getF updated if the system crashes just after you increase or decrease yourI usage. Bugs in VMS on a cluster also cause the quota file to drift out ofeM touch with reality.  Your system manager may need to do some disk maintenance5I (ANALYZE/DISK/REPAIR dev) to fix this problem.  Check with him/her to see  if this is the case.  H         So, your problem is probably partly misunderstanding of how yourJ disk  quota works (items 1 and 2 above), possibly confused by a bug in the system (item 3).   Rollo Ross, Network Manager N Comp Centre,  Sth Aust Institute of Technology, The Levels, SA 5095, AustraliaN Voice: +61 8 343 3158                 Old way:  Rollo.Ross@levels.sait.oz{.au}N Fax: 349 6939      DTE 505282622004       Standard way: Rollo.Ross@sait.edu.au  E ---------------------------------------------------------------------g ,QU2 Subject: Diskquota Discrepency, >From: Marc Shannon <R602MS5U@vb.cc.cmu.edu> Date: Sat,  2 Sep 89 16:35:58e      sH      The SHOW QUOTA returns the number of blocks you have allocated overH the entire disk.  Presuming that all of your files are in your directoryF tree, use the DIRECTORY/SIZE=ALLOC/GRAND [...] command (from your home5 directory) to see just how many blocks you are using.4  D      Note the "/SIZE=ALLOC" qualifier; this has DIRECTORY report theH number of blocks which each file is *allocated*, not just in actual use.D (Most systems have a "cluster-size" of 3 which means that every fileH must take up a multiple of 3 blocks, so even files with one line in them take up 3 blocks.)  D      Okay, now you're getting close, but VMS still charges you a bitG more.  For every file you own, you are also charged 1 block so that VMS:F can store information in the INDEXF.SYS file on your disk about how toH find your file.  So, take your total number of blocks and add the number6 of files and directories found in your directory tree.  D        Now you should be almost at the number reached by SHOW QUOTA.H Don't forget your main directory.  Use DIR/SIZE=ALLOC [-]username.DIR toF see how large your main directory file is and add that (plus 1 for its INDEXF entry) to your total.      l:        This final total should be what SHOW QUOTA returns.      l --Marc  E ---------------------------------------------------------------------  ,U*XARGS    From: tp@mccall.com (Terry Poot)& Subject:Re: Passing args to C programs  L In the C code, everything is the same. However, you have to define a foreignD 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:m  
 foo arg1 arg2s  M and the command line arguments will be passed through argc and argv as usual.g   A few notes:  K 1) Note the "$" at the beginning of the file spec, it's required. Also, the O filespec will default to looking in sys$system for the executable so be sure totN use a fully qualified file name (i.e. include the device and directory or some5 logical name that points to the device and directory.n  K 2) DCL normally forces all unquoted arguments to upper case. The C run-timeeG library counters this by forcing them all to lower case. If you want an  argumentA to be passed in upper or mixed case, you have to quote it, as in:   ! foo "-AaBb" arg1 Arg2 ARG3 "Arg4"h  N In the above, the options string and Arg4 will get through in mixed case, argsO 1-3 will all be lower case. And don't try the short cut of quoting all the args-J with one set of quotes, because that will make the whole quoted string one	 argument.   M 3) argv[0] is NOT the command typed to run the program, it is the whole fullylL 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"p #endif   to get around this..  < Obtw, yes this is the right group for this type of question.E ---------------------------------------------------------------------X ,VI,( From: ewilts@galaxy.gov.bc.ca (Ed Wilts) Subject:Re: VMS version of vit  M In article <1992Oct15.170036.569@cine88.cineca.it>, le9miiwa@cine88.cineca.ite writes:  > < > Does somewhere exist a VMS version of 'vi, the Unix editor1 > quite a lot of people here would *jump*  on it!y  O This should be in the FAQ...  It's bundled with Posix (and the Posix license isU6 *free* with VMS 5.5 - just load the media from the CD.   $ posix posix$bin:vi. login.com   E ---------------------------------------------------------------------  ,CPDIR( >From: bfoss@goofy.apple.com (Brad Foss)& Subject: Copy-Directory to Remote Host! Organization: Network Innovationsp	 Lines: 26e  K >    Does anyone know why DECNET doesn't support the copying of directoriesCG > with unknown sub-directory structure?  Right now, to copy a directoryEF > between 2 vaxes I must login to the destination host, create all theI > sub-directories required in the destiation directory and use individualrJ > copy commands to pull the files from each source host sub-directory into > the destination directory.  L I've had occasion to move directory structures, even whole disks to a remoteE node.  The only way I've succeeded at it is to use BACKUP to create a E saveset on the remote host, then log in to the remote host and backup"6 (restore) the saveset to the desired disk.  Like this;       (at local host)TB $ BACKUP/LOG DISK:[DIR...]*.*;* REMOTE::DISK:[DIR]SAVESET.BCK/SAVE   ( at remote host)i3 $ BACKUP/LOG DISK:[DIR]SAVESET.BCK/SAVE DISK:[*...]t  L You said any help would be appreciated, and this sure beats having to createK directories and use COPY.  BACKUP will create the directories as needed.  I I expect others will suggest that you create the saveset on the local host, I then DECnet it to the remote host.  It seems to run a little quicker that- way. --' Dick Munroe				Internet: munroe@dmc.comf= Doyle Munroe Consultants, Inc.		UUCP: ...uunet!thehulk!munroe % 267 Cox St.				Office: (508) 568-1618t& Hudson, Ma. USA				FAX: (508) 562-1133  J GET CONNECTED!!! Send mail to info@dmc.com to find out about DMConnection.  