Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!apple!fox!portal!cup.portal.com!thad From: thad@cup.portal.com (Thad P Floryan) Newsgroups: comp.sys.amiga Subject: Re: Commodore and UNIX in AmigaWorld 68030 Message-ID: <25059@cup.portal.com> Date: 15 Dec 89 11:12:09 GMT References: <2318@jolnet.ORPK.IL.US> <38689@lanl.gov> <38703@lanl.gov> <203@amix.commodore.com> <205@amix.commodore.com> Organization: The Portal System (TM) Lines: 186 With all the banter about VMS vs. UNIX, thought I'd share a few gotchas. All examples following are from a real VMS system (one that I am required to use due to economic necessities :-) One thing I need to do a LOT is verify a file hasn't been inadvertently changed. On UNIX, I use the ``sum'' program; VMS has its ``checksum'' counterpart. Just try and find the VMS docs about checksum. Once you discover that VMS does have ``checksum'', try to guess where it puts its answer (no fair peeking ahead! :-) For all its otherwise babbling verbosity, VMS' checksum is strangely silent. Watch: $ cd srcx: $ pwd SE:[ACCENT.THAD.SOURCE] $ checksum codgen.obj $ show sym/local _Symbol: * CHECKSUM$CHECKSUM = "3058728097" $ Neat, huh? Really obvious. Sheesh. Not even an "/OUTPUT=filename" option available here. So much for consistency. I also need to often compare files to see if they're different. ALL I want to know is if they're different or not. If it CAN compare files, VMS's incessant babbling quickly becomes annoying. Because VMS' routines CANNOT handle all of its rotten RMS file types, I had to write my own ``dircmp'' program because VMS' braindamaged ``diff'' doesn't handle all binary files too well: $ diff srcx:accent.auc a$s:accent.auc %DIFF-F-READERR, error reading SYS$USER1:[ACCENT.THAD.SOURCE]ACCENT.AUC;1 -RMS-W-RTB, 4056 byte record too large for user's buffer $ v srcx:accent.auc,a$s:accent,a.auc Directory SYS$USER1:[ACCENT.THAD.SOURCE] ACCENT.AUC;1 8 9-DEC-1989 03:50 [THAD] (RWED,RWED,RWED,) Total of 1 file, 8 blocks. Directory SYS$USER1:[ACCENT.SOURCE] ACCENT.AUC;1 8 20-NOV-1989 10:07 [RAFFA] (RWED,RWED,RWED,) Total of 1 file, 8 blocks. Grand total of 2 directories, 2 files, 16 blocks. Yeah. :-( Not a very big file; the ``8'' means eight 512-byte blocks is the file's size.. One thing one learns very quickly on VMS is that a file is NOT a file is NOT a file. Its RMS file system is a rat's nest beyond belief. And heaven help those who want to name a file "tt", "nl", etc. Guess what: VMS does NOT insist one consistently suffix a device name with a ":" it and goes on to make assumptions. Remember what Benny Hill says about "ASSUME" ? :-) And the file system maintain 4 dates× for files, only two of which are really useful and an important one is not even present: $ dir/full accent.auc Directory SYS$USER1:[ACCENT.THAD.SOURCE] ACCENT.AUC;1 File ID: (213,134,0) Size: 8/10 Owner: [THAD] Created: 1-DEC-1989 16:08 Revised: 9-DEC-1989 03:50 (2) Expires: Backup: 11-DEC-1989 17:18 File organization: Sequential File attributes: Allocation: 10, Extend: 0, Global buffer count: 0 No version limit Record format: Stream_LF Record attributes: Carriage return carriage control Journaling enabled: None File protection: System:RWED, Owner:RWED, Group:RWED, World: Access Cntrl List: None Total of 1 file, 8/10 blocks. "Expires"???? Where's the date&time the file was last ACCESSED? (So that one can check if a file has been used in awhile, or if someone was sneaking a peek at it (like at MAIL files, etc.))? That "Stream_LF" file format is the closest I can make VMS treat a file as simply a consecutive collection of bytes; this is NOT that easy to do! Note also that even with my best efforts, I'm unable to get the size of the file in BYTES! In recent issues of DEC PROFESSIONAL, Dr. Bourne (he of the Bourne shell fame) has authored a series of articles introducing ULTRIX (DEC's UNIX) to VMS users. Sheesh, some of HIS comments about REAL UNIX (not DEC's bogosity) make me want to puke. Perhaps this is why I see comments in GNU software about: VMS = Vomit Making System with which I heartily agree. I've used the VMS OS (among others) for a l-o-n-g time now, and have used all versions from the very first up to today's version 5.2, and it's my PERSONAL opinion that VMS is, to be kind, NOT a software development environment. And I consider myself VERY proficient with that OS working in assembler and C to do things like remote file access across DECnet at the lowest layer, designing and implementing the parsers, code generators and runtime support libraries for major commercial products, implementing screen and job multi-tasking utils just so I can do more than one thing at a time on the beast, etc etc etc. Over the decades I've used over 50 operating systems and user command environments (and designed and implemented a few), and the ones I consider to be "good" are VERY few; VMS with its DCL is not one of them. A modern UNIX with ksh and the other utils is very close to the top of my list as an ideal system for system and software development. The BEAUTY of UNIX is the extensibility of its command environment, and the fact you can make it look like ANYTHING you want it to look like (similar to how one can implement the vi or edt editors IN EMACS (but not vice versa :-) ) On my UNIX boxes, I have a number of "shells." One is "sh", another is "ksh". There's also ``dsh'' for those who know MS-DOS commands and don't want to learn the UNIX programs' syntax. There's the GNU ``bash'' (Bourne Again SHell) and the ``UA'' (which is VERY reminiscient of the Amiga's WorkBench with even a ``[?]'' gadget in the windows upon which one can click with the mouse to get help; the UA is like FACE under SVR3.2 and SVR4). If one doesn't like the abbreviated UNIX program ("command") names, one can write shell-scripts as substitutes and/or use command aliases. Tidbits for such purposes are widely available; one I use a lot is the ``rename'' script from UNIX WORLD which invokes a lot of the do-one-thing-as-best-as-possible "cryptic" UNIX programs to give infinitely more flexibilty with wildcards for both the source AND the destination names (ref. January 1988 UNIX WORLD, Wizard's GrabBag column). In closing, I'll share with you a part of my LOGIN.COM (akin to UNIX' .profile) which make VMS a bit more palatable at the command-line interface (for me): $ type login.part $ BEL[0,32] == 07 $ ESC[0,32] == 27 $ $ WRITE SYS$OUTPUT "Auto-inquiring your terminal type." $ SET TERM /INQUIRE $ $ TT_TYPE = F$GETDVI("TT:","DEVTYPE") $ $ IF (TT_TYPE .EQ. 96) THEN GOTO SET_VT100 $ IF (TT_TYPE .EQ. 98) THEN GOTO SET_VT102 $ IF (TT_TYPE .EQ. 110) THEN GOTO SET_F240 $ WRITE SYS$OUTPUT "Your terminal is unknown to me." $ SET TERM/UNKNOWN $ GOTO SETUP_CONT $ SET_VT100: $ HOME_CLEAR == F$EXTRACT(0,1,ESC)+"[H"+F$EXTRACT(0,1,ESC)+"[J" $ GOTO SETUP_CONT $ SET_VT102: $ HOME_CLEAR == F$EXTRACT(0,1,ESC)+"[H"+F$EXTRACT(0,1,ESC)+"[J" $ GOTO SETUP_CONT_ADV $ SET_F240: $ SET TERM/VT100 $ RESET_VT100 == F$EXTRACT(0,1,ESC)+"[?2l"+F$EXTRACT(0,1,ESC)+"<" $ WRITE SYS$OUTPUT RESET_VT100 $ HOME_CLEAR == F$EXTRACT(0,1,ESC)+"[H"+F$EXTRACT(0,1,ESC)+"[J" $ GOTO SETUP_CONT $ SETUP_CONT_ADV: $ SET TERM/CRFILL=0/FORM/LFFILL=0/LOWERCASE/TAB/TTSYNC/NOWRAP/INSERT $ SET TERM/ADVANCED/ANSI_CRT/DEC_CRT=1/EDIT_MODE/NOEIGHT $ SET TER/PAGE=24/WIDTH=80 $ SETUP_CONT: $ $ BL*ANK :== WRITE SYS$OUTPUT HOME_CLEAR $ CD == "SET DEFAULT" $ CP == "COPY" $ DA*TE == "SHOW DAYTIME" $ EXP*UNGE == "PURGE" $ I*NFO == "SHOW" $ PO*P == "LOGOUT" $ PS == "SHOW PROCESS" $ PUSH == "SPAWN" $ PWD == "SHOW DEFAULT" $ RM == "DELETE" $ SY*STAT == "SHOW SYSTEM" $ V*DIRECTORY == "DIREC/PROT/SIZE/TRAI/DATE=MODI/OWNE/WIDT=(FILE=15,OWNER=9)" $ WHO == "SHOW USERS" $ $ SET PROTECTION=(SYSTEM=RE,GROUP=RWED,OWNER=RWED,WORLD)/DEFAULT $ SET CONTROL=(T,Y) Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]