Article 9 of vmsnet.decus.journal: Path: nntpd.lkg.dec.com!crl.dec.com!crl.dec.com!bloom-beacon.mit.edu!apollo.hp.com!lf.hp.com!news.dtc.hp.com!col.hp.com!simtel!news.sprintlink.net!news.clark.net!rahul.net!a2i!bug.rahul.net!a2i!news.erinet.com!uunet!in1.uu.net!noc.near.net!news3.near.net!eisner!mcmahon_b From: mcmahon_b@eisner.decus.org (Brian McMahon, Info-VAX Refugee) Newsgroups: comp.org.decus,vmsnet.decus.journal Subject: DECUServe Journal July 1995 Message-ID: <1995Jul27.084840.10695@eisner> Date: 27 Jul 95 08:48:39 -0400 Organization: DECUServe Approved: mcmahon_b@eisner.decus.org Lines: 3092 Xref: nntpd.lkg.dec.com comp.org.decus:7330 vmsnet.decus.journal:9 The DECUServe Journal --------------------- July, 1995 From the Editors' Keyboard . . . . . . . . . . . . . 2 What's Inside, Changed Format, WWW Stuff, et cetera WWW File Serving . . . . . . . . . . . . . . . . . . 3 When Anonymous FTP isn't an Option Identifying Web Clients . . . . . . . . . . . . . . 5 Which Client? Which Version? "Standard"? Mosaic Display Problems . . . . . . . . . . . . . . 8 WPS-PLUS, ALL-IN-1, and WWW PC Motherboard Replacement . . . . . . . . . . . . 13 Tips for Upgrading a PC Testing for Removable Disk . . . . . . . . . . . . 16 Using IO$PACKACK with Removable Media Force Logging of a Session . . . . . . . . . . . . 19 Keeping Logs of a Privileged Account SYSUAF in Mixed VMSclusters . . . . . . . . . . . 22 User Quotas on VAX vs. Alpha MOUNT and OpenVMS V6.1 . . . . . . . . . . . . . . 26 Changed Security Behavior Windows NT Crash Dumps . . . . . . . . . . . . . . 29 Tips and Tricks for NT Crash Dump Analysis SET SECURITY on Tape Units . . . . . . . . . . . . 32 Persistence of the SET SECURITY Command UNIX Filename Globbing . . . . . . . . . . . . . . 33 C-Kermit Strikes Again POP Server for Unix . . . . . . . . . . . . . . . 35 Where to Get a POP Server 4mm DAT Autoloader . . . . . . . . . . . . . . . . 37 SCSI Commands to Control TLZ06L Autoloader RRD50/KRQ50 Info . . . . . . . . . . . . . . . . . 43 Hardware Details for Old CD-ROM Wildcard Algorithm . . . . . . . . . . . . . . . . 44 Pattern-matching with code in C DTR column headers . . . . . . . . . . . . . . . . 47 Controlling the printing of column headers in Datatrieve Saving Window Positions . . . . . . . . . . . . . 50 Tips on DECwindows Settings The DECUServe Journal July, 1995 Page 2 From the Editors' Keyboard From the Editors' Keyboard ---- --- -------- -------- Once again we ask you to pardon the dust and construction debris. We're changing the format of the Journal somewhat, to make it more suitable for HTML and the Web. At the same time, we're trying to keep things simple at the production end of things, improve readability, and still keep a format that is suitable for plain-text transmission and even good old-fashioned hard copy printing. You've probably not seen the last of the format changes. Speaking of the Web, several articles in this issue are taken from the new WWW Notes conference on DECUServe. There, topics range from server security to client quirks to interesting URLs. Needless to say, it's a fairly lively place. But this issue doesn't focus exclusively on the Web, so if you're sick of hearing about it, don't despair. In fact, this issue of the Journal is rather more eclectic than most, even by our own standards. We've collected a broad sampling of DECUServe's treasures, mostly of recent shorter pieces this time, and some from seldom-visited conferences -- ALGORITHMS, for example. We hope you'll find the results useful and enjoyable. No matter whether you love it or hate it, we always welcome your feedback. Editorial contact information appears in every issue. Let us know what you think, about form as well as content. * * * * * The DECUServe Journal July, 1995 Page 3 WWW File Serving WWW File Serving --- ---- ------- Abstract: Consider this thorny problem: You want to do file service in HTTP, but for one reason or another, the usual anonymous FTP setup is not workable. Can you do it at all, and can you do it without blowing a great gaping hole in your site's security? The situation is a bit convoluted, to be sure. [Administrative Note: The WWW conference has adopted the convention of prefixing note titles with a code to identify the kind of topic for ease of browsing. Several codes have been defined, such as URL for interesting spots on the Web, HTTPD for server-related concerns, and UI for user-interface (Web browser) issues. We've decided, at least for now, to retain these prefixes in the Journal.] Participants: Dan Esbensen, J. M. Ivler, Terry Kennedy, Harrison Spain, Bret Wortman. Conference: WWW Note 39.0, 14-Jun-1995 Spain: HTTPD: Using HTTP to server files w/o Anon FTP ----------------------------------------------------- We are struggling to implement file serving (both send and receive if possible) using our HTTP server. Unfortunately, security restricts the use of Anonymous FTP! Each user of the system has a unique username and password. Is there a way to serve files using an HTTP server *without* Anonymous FTP? We found a way to specify the username and password but if you access a document this way the file is displayed to the screen (yikes) as binary (argh). What we need is the same mechanism as Anonymous FTP but *with* a username and password. NOTE: We are running the Ohio State University HTTP server on our AXP/VMS system. Any pointers will be *greatly* appreciated! :-) Note 39.1, 14-Jun-1995 Esbensen: ftp://username:password@xxx.yyy.zzz/ ?? -------------------------------------------------- Does: ftp://username:password@xxx.yyy.zzz/ The DECUServe Journal July, 1995 Page 4 WWW File Serving work for you? Note 39.2, 14-Jun-1995 Ivler: Look at mime.types or srm.comf (if you have them) -------------------------------------------------------- Putting that on a page (I assume you mean to hardcode a username:password combination) would be deadly in terms of security. I think Harrison wants to modify the mime.types file on his server to accept certain extensions as "binary" transfers. This would allow him to use the http://bbs.ug.eds.com/filename.special_ext format, yet have the browser accept is as a download binary without resorting to anon FTP. Note 39.3, 15-Jun-1995 Spain: Getting closer! ---------------------- > ftp://username:password@xxx.yyy.zzz/ This works, but it interprets the file format differently than Anon FTP. For example, if you try to download a notebook (with extension _.NOTE), Netscape will try to display the file :-). I think JM hit the two concerns. Concern #1: As long as the password does not display on the screen, I think we are OK. Concern #2: We do have to figure out how Anon FTP figures out the file type. One alternative is to rename all the file to a couple of std extensions (one for text and the other for binary) but this would be a tad messy :-). Note 39.4, 15-Jun-1995 Kennedy: Ummm... ---------------- > Concern #1: As long as the password does not display on the screen, I > think we are OK. What about "View source"? The DECUServe Journal July, 1995 Page 5 WWW File Serving Note 39.5, 16-Jun-1995 Wortman: One idea.... --------------------- How about defining a form, allowing each accessor to enter username/password combinations, and using these during in the ftp://... string? Haven't tried this myself, just brainstorming. Note 39.6, 19-Jun-1995 Spain: I suspect this can't be done using HTTP ---------------------------------------------- We do have a partial solution. Since we validate our users before they are allowed access to this area, we already have the username and password. As long as we name all the files with either .exe or some special extension the ftp://... format will work. We can't get the file directory to list anything outside of the user's SYS$LOGIN directory though :-}. Note 39.7, 21-Jun-1995 Ivler: Show and tell works better than tell - sometimes ------------------------------------------------------- Harrison, since I was over there anyway, I dropped in to see Barry and walked him through the process I described. The proposed solution is what I'm posting. A page will be created after the user enters their name/password combination. This will offer them the ability to go to a download area. If they select that, it will go to a seperate WWW server on the same machine (ex: http://www.ug.com:8080/). That macine will be running with "index" on. Passing the server name without the file will create an indexed list of files for all files in that default area (your download directory will be the WWW_ROOT:). The mimes.types will be set to alolow .txt, .html and readme.* to be the only files to be text/* mime typed. All others will be binary. This will allow the http: to download these files as binaries onto the users machine. It totally avoids the FTP issue. Identifying Web Clients ----------- --- ------- The DECUServe Journal July, 1995 Page 6 Identifying Web Clients Abstract: The wonderful thing about standards, they say, is that there are so many to choose from. Or, in an even worse case, so many distinct variations on the same supposed standard. This pretty well describes the current state of HTTP. So it's natural to want to identify, as well as possible, what kind of browser (with which capabilities) has connected to the server. It's also natural to wonder whether this isn't precisely the sort of mess that Internet standards are supposed to avoid. This question, shall we say, exceeds the scope of the Journal (and the DECUServe Canons of Conduct). Participants: Bob Hassinger, Benjamin Pena, Kevin Roels, Pat Scopelliti. Conference: WWW Note 36.0, 8-Jun-1995 Scopelliti: HTTPD: does server know client type? ------------------------------------------------ Is there any way for the HTTPD server (or a script) to determine the type of browser that the client is using? I like using
...(yuck). Oh, this would be used by a script so it could output the right HTML. I found one hack.. appending
..._unless_ you see a browser you know, in which case you would use
andtags ---------------------------------- It sounds like Mosaic is processing the 'bad' files as if they are HTML files and the good ones as if they are plain ASCII. HTML files require paragraph markers (
), for example. The external file attributes probably have little to nothing to do with the treatment. It MAY be that the file extension would have SOME effect but I am not sure. I suggest that you may wish to enclose the text in your files inside of
andtags to indicate to the browser that the file is pre-formatted. Place
as the first line of the file andas The DECUServe Journal July, 1995 Page 11 Mosaic Display Problems the last of one your 'bad' files to see if this changes the behavior. Adding these tags would be very easy, of course. Note 40.4, 20-Jun-1995 Scopelliti: Special characters? ------------------------------- One other thing to check: The characters "<", ">" and "&" have special meaning. Does the bad document contain some of these? If so, Mosaic may be fooled into processing some of the text as HTML markers leading to undesirable results. Note 40.5, 20-Jun-1995 Ivler: Another method --------------------- also you can force it to use certain types by the extension. look in your servers mime.types file and see what the extention default is for ascii text (it shoud be txt) and set the filename to that default extention. Your server should then server the document with the default mime type, and the browser should know how to parse the file. Note 40.6, 21-Jun-1995 Pye: Coming soon to a system near you ------------------------------------- I guess you'll be very pleased when our ALL-IN-1 WWW interface is available in V3.2... Note 40.7, 21-Jun-1995 Hassinger: OH! More info please. Maybe there is still hope... --------------------------------------------------------------- I hope you are serious. I am currently desperately looking for a way to justify continuing to pay the support costs for ALL-IN-1 on my system. It seems to have become largely irrelevant to the goals of our management. OTOH, WWW is a VERY hot topic... Could you give some sort of broad overview of what you are thinking of? Would ALL-IN-1, say running on a VMS system present its menus and applications via HTTP/HTML to standard web browsers? Would it need server software or do the job itself? Would this capability be included in the normal updates or would it be a new cost? What time frame (like "this calendar year" for example). That sort of thing... The DECUServe Journal July, 1995 Page 12 Mosaic Display Problems Note 40.8, 21-Jun-1995 Hassinger: Some thoughts and questions - HTML takes new ways of thinking... --------------------------------------------------------------------------- As to the original question - I am still trying to get a handle on the exact symptom to help narrow the problem down to the server side or the client/browser side. A lot of the problems I have seen derive from having a lot of different servers out there, each somewhat different and every copy configured differently, and lots of different clients, and even different versions of each of the clients out there. HTTP/HTML seems much more vulnerable than much of what we are accustomed to working with. With so many mix and match combinations and the shift of a lot of the control over presentation format from the host to the client, its a new world in many ways for old timers... Can you describe in more detail the change in fonts you are seeing? Is one of them the one your browser uses for
presentation - typically something like a mono-spaced typewriter font such as Courier? Or is it just a different size of the normal presentation fonts? Can you look in your browser setups and see if you can identify the particular fonts and sizes as being associated with particular configuration settings (e.g. for certain size headings, etc.). Many browsers let you configure these things so your copy and mine of the same browser might give different presentations because of the way we have them set up. In fact, did you mention what server and what client(s) you are seeing this with? And, have you compared the results using more than one client? For example, I try to test using the latest versions of both Netscape and Mosaic on the the Mac, as well as Mosaic 2.4 for VMS, and when it makes sense, Lynx on VMS too. Note 40.9, 21-Jun-1995 Peach: One answer -- and I will get the rest. --------------------------------------------- Lots of good questions and suggestions... will be looking into each and everyone and will get back to you. Re Ivler's suggestion about the file extension. We cannot change the file extension because we need *ALL* the characters available in both the filename and extension as a way of providing the title. Now, I have thought of another way to do it if that becomes absolutely necessary but since we have been able to prove that if the file is unreadable regardless of whether we copy it to something.TXT, I download it via my script to something.TXT -- it just doesn't matter what the extension is or isn't. The display is screwed up on some files. Now -- I'm going to extract this note and try to get as many answers The DECUServe Journal July, 1995 Page 13 Mosaic Display Problems online as quick as I can. P.S. to Graham -- Is the ALL-IN-1 and WWW *part* of 3.2? Or will it be offered like Personal Assistant? With an addiitional fee? If that is the thought, please convey to the powers that be that they need to rethink and quickly. It is getting hard and harder to justify the support. Providing this as part of 3.2 could very well be the handle that many of us desparately need Note 40.10, 27-Jun-1995 Pye: More on the ALL-IN-1 / WWW interface ----------------------------------------- Re .7 It's not a full interface to all of the functionality. It's a file cabinet browser. But it needs the 'information provider' on the ALL-IN-1 system to do nothing. The WWW interface code dynamicallys builds HTML from the file cabinet. In demos, we show VT, TeamLinks and WWW screens side by side, and as you create a document from VT or TL, the web browser can magically see it! Re .9 Here's the scoop. You'll need some code to run on your WWW box, which dynamically builds the HTML and talks to the File Cabinet Server. This will be free. We haven't completely decided which platforms this will be available on yet - Votes? Then you'll need the File Cab. Server DSO licence, either your existing one for FCS-FCS access or a cheaper variant for WWW access only. PC Motherboard Replacement -- ----------- ----------- Abstract: An "in-cab" upgrade is a familiar concept for many a grizzled old VAX manager; but how about for that long-in-the-tooth Intel PC over in the corner? Here are some things to keep in mind when considering a motherboard swap in a PC. Participants: Charlie Byrne, Pierre Hahn, Jamie Hanrahan, Terry Kennedy, Jeff Killeen. The DECUServe Journal July, 1995 Page 14 PC Motherboard Replacement Conference: PERSONAL_COMPUTING Note 691.0, 29-Mar-1995 Byrne: PC Motherboards ---------------------- Someone here has a 386 that instead of tossing they want to get a 486 motherboard for. (what an odd sentence that is). There are numerous vendors in the Computer Shopper. Any comments on this subject welcome such as good/bad vendors, gotchas, etc. Note 691.1, 29-Mar-1995 Kennedy: --------- What things do they want to save from their old system? The old system probably doesn't have an advanced bus, so you'd want a new video card and hard disk controller. The new motherboard may not use the same memory as the old system, etc. I'd carefully price the swap after including all the other parts that were needed and compare it against a new system (without keyboard and mon- itor if that's the way you want it) and see how close it comes. Note 691.2, 4-Apr-1995 Hanrahan: ---------- True, Terry, but then on the other hand, a lot of those low-priced complete systems have really poor motherboards, video cards, etc., in them. At least if you build a system up from bits, you know what you're getting. Note 691.3, 4-Apr-1995 Kennedy: --------- I was thinking of "name brand" systems, but you're right - even then you can get some real junk. > At least if you build a system up from bits, you know what you're getting. Well, you know what brands/models you're getting. Unless you've got exper- ience with those exact items, you may still be in for a big surprise. The DECUServe Journal July, 1995 Page 15 PC Motherboard Replacement Note 691.4, 6-Jun-1995 Killeen: --------- Assuming one gets a good upgrade motherboard are there any issues with mounting it i.e. are the mounting holes standard? Note 691.5, 6-Jun-1995 Hanrahan: ---------- Don't get me started... they are close to standard. However I have on several occasions encountered "standard" MBs that won't *quite* fit on top of the mounting holes in "standard" cases. Or else the MB fits but then you find that the hold-down screws for the cards in the slots need to be extended a bit. And so on... Note 691.6, 6-Jun-1995 Hahn: No structural porblem --------------------------- Of the 20 or so various board upgrade I have put together I have not had problems on remounting the new board. A couple of boards did not match one or two holes Note 691.7, 6-Jun-1995 Kennedy: --------- > Assuming one gets a good upgrade motherboard are there any issues with > mounting it i.e. are the mounting holes standard? "It depends". If you have a regular-footprint system it has chance of working. If you currently have a slimline system (like a Northgate) which has video, serial, parallel, etc. on the motherboard it's unlikely to fit. OTOH, a new case/power supply isn't that expensive (a top-of-the-line case, PS, and overtemperature sensor from PC Power & Cooling is about $350, and the typical "economy" case+PS is < $100). More important is picking a good motherboard. Many of them are marginal designs and will fail under non-DOS+Windows OS's like Unix, Netware servers, Windows NT, and Windows 95. What processor type/speed and bus are you looking at? The DECUServe Journal July, 1995 Page 16 PC Motherboard Replacement Note 691.8, 6-Jun-1995 Killeen: WNT and WIN95 system ----------------------------- > What processor type/speed and bus are you looking at? P90/100 and PCI. The current system is a 486 tower - the motherboard has an IBM name. Note 691.9, 6-Jun-1995 Kennedy: --------- In that case I would recommend the Intel Premier PCI II motherboard (also known as the "Plato" board. It's a P5-90 w/ 3 PCI slots and 5 ISA slots. I use these with the BusLogic 946C SCSI controller (the MB has 2 IDE controllers on board, along w/ serial (2), parallel, floppy). Be careful with memory on these - you need tin-lead 72-pin parts with parity (N x 36) that support fast page mode. You can get some real junk SIMMs if you aren't careful. I have a source for the boards and SIMMs if you're interested. Stay away from Pentium motherboards that have VLB slots, especially in com- bination with PCI. Also, beware of Intel's newer motherboards based on the Triton chipset - it doesn't support parity. Testing for Removable Disk ------- --- --------- ---- Abstract: When dealing with removable disks, it's sometimes useful to be able to determine from a program (i.e., not by walking up to the drive and peering inside) whether or not a volume is present. It also be nice at times to do this in less time than it takes MOUNT to fail when nothing's in the drive. An alternative is discussed below. Participants: John Briggs, Scott Harrod. Conference: VMS The DECUServe Journal July, 1995 Page 17 Testing for Removable Disk Note 2536.0, 8-Jun-1995 Harrod: Is it possible to determine if a removeable disk is present ------------------------------------------------------------------- Is there a way to check, either from DCL or within a program, for the presence of a removeable disk? We have a SCSI optical disk and would like to determine if a cartridge is in the drive. The present kludge is to try to mount the disk. If there is no disk, the mount will eventually fail; however, the timeout period has gone from about a minute under VAX VMS 5.5-2 to about 4 minutes under Alpha VMS 6.1. Is there a way to specify that timeout? Note 2536.1, 8-Jun-1995 Briggs: PACKACK to determine if media is there ---------------------------------------------- Try an IO$_PACKACK QIO. Completes instantly. Either with an error code or success indication. It's a physical I/O and therefore requires PHYS_IO privilege. Warning: DEC has an undocumented requirement that you do an IO$_AVAILABLE $QIO after a successful PACKACK if you want to put the volume back the way it was. The PACKACK sets the volume valid bit. The IO$_AVAILABLE clears it. Ordinarily, you can get away without doing the IO$_AVAILABLE. However, certain tape devices (TUDRIVER) in combination with certain software (TAPESYS and SLS) can exhibit problems associated with this issue. Yes, I know you're worried about disk. The same QIO works. Example: chan: .word 0 device: .ascid /device/ iosb: .blkq 1 buff: .blkb 200 .entry check_disk,^m<> $assign_s chan=chan,devnam=device blbc r0,100$ $qiow_s chan=chan,func=#io$_packack,iosb=iosb blbc r0,100$ movzwl iosb,r0 100$: $exit_s r0 .end check_disk Worth every penny you paid for it. The DECUServe Journal July, 1995 Page 18 Testing for Removable Disk Note 2536.2, 15-Jun-1995 Harrod: MSCP served vs. Locally attached ---------------------------------------- Thanks for the pointer to PACKACK. I tried it, but while the QIOW does returns faster then a mount command if there is no disk in the drive, it still takes some time. In fact in our testing we found that the times were different depending on whether the disk was locally attached or MSCP served from another node in the cluster. If the optical drive is attached to NODE2 and MSCP served to the cluster and does *not* contain a cartridge, the time for the IO$_PACKACK QIOW function call to complete and for the MOUNT command to timeout are as follows: NODE1 NODE2 PACKACK QIOW 2 min. 30 sec. MOUNT/NOASSIST/OVER=ID 4 min. 1 min. Why does it take four times as long on the remote node. (I see by the I/O manual that the MOUNT and INITIALIZE commands both do a IO$_PACKACK function call. It looks like MOUNT tries again if it fails the first time.) If there is a disk in the drive, the QIO and MOUNT command complete rightaway. Note 2536.3, 15-Jun-1995 Briggs: Try an async PACKACK ---------------------------- I've got no idea why it would take so long on the remote node. Those times seem outrageous to me. But the only place I've ever played with PACKACK is on tapes, locally and INFOserver attached. In that environment, the QIO completes very rapidly -- one second or less regardless of whether the reel of tape is present. Hmmm. It seems that you do have a rapid way of determining whether the disk is mounted. Use an asynchronous QIO. If it completes rapidly and with success, the media is there. If it fails to complete rapidly or completes with failure, the media is absent. All you have to do is set a timer and $CANCEL your PACKACK if the timer expires. You could also decide not to bother with the $CANCEL and let image rundown handle it for you. I haven't actually tried this. The DECUServe Journal July, 1995 Page 19 Testing for Removable Disk Note 2536.4, 16-Jun-1995 Harrod: Thanks for the suggestion --------------------------------- > Hmmm. It seems that you do have a rapid way of determining whether > the disk is mounted. Use an asynchronous QIO. If it completes rapidly > and with success, the media is there. If it fails to complete rapidly > or completes with failure, the media is absent. Yes, that sounds like it ought to work. I may give it a try. Thanks for the suggestion. Force Logging of a Session ----- ------- -- - ------- Abstract: The problem at hand is how to ensure that a certain account's activity is always logged. Of course, in the case of a highly-privileged account (as here), it would be difficult or impossible to overcome active malice, but there are other reasons why one might want to do such a thing, including the time-honored princliple of CYA. Participants: Dale Coy, Linwood Ferguson, Pierre Hahn, Mark Lasoff, Laurie Maytrott. Conference: VMS Note 2541.0, 20-Jun-1995 Maytrott: How can I force logging of an interactive login? ---------------------------------------------------------- I would like to create an account for which all activity is logged to a file. This is a priv'd operator account to do some of the higher level stuff that's not done on a regular basis. The "other account" aspect will be used to create a "higher awareness" that he's working in a more priv'd environment, and will add the logging to cover both of us (the more "assertive" users can't claim he did something he didn't, and it makes it easier to fix if a boo-boo does occur since we'll know what was done). I figured that SET HOST/LOG would pretty much do what I want. I know I've forgotten the /LOG a couple of times when I've meant to use it for a software install/upgrade, so I'd rather make it a more formal procedure than just having him do the SET HOST himself. I've thought about creating a symbol which would run a command file asking which node he wants, then SET HOST/LOG to the desired node. The DECUServe Journal July, 1995 Page 20 Force Logging of a Session My only hangup with this is that I can't think of a way to do a check to MAKE SURE that the priv'd account is running with /LOG. There isn't any way for me to check this in LOGIN.COM, is there? Or is there some other forced log I can set up in LOGIN.COM instead of the SET HOST/LOG method? (other than using a Peek & Spy type s/w package?) Note 2541.1, 20-Jun-1995 Hahn: See if the .log file was created -------------------------------------- Note 2541.2, 20-Jun-1995 Coy: It may be worth doing, but... ---------------------------------- Notes: 1. You can't guarantee that a privileged account didn't subvert your procedure (e.g., change the log file, do something outside the logging, etc.) 2. SET HOST/LOG may not be terribly useful for screen-oriented utilities. 3. When you "modernize" to use client/server stuff, the technique will be even less useful. Note 2541.3, 20-Jun-1995 Lasoff: Try PHOTO ----------------- Try the PHOTO utility on one of the VS CD's mounted here. You could use some code in the LOGIN.COM that looks like this; $ if f$mode() .eqs. "INTERACTIVE" $ then !Create a photo log session. $ logname = "sys$login:" + - (f$cvtime() - "-" - "-" - " " - ":" - ":" - ".") $ photo /log='logname $ mail /noself 'logname MAYTROTT /subj="PHOTO logfile." $ logoutt !Once use logs-out of photo, then logout this session. $ endif Note 2541.4, 20-Jun-1995 Maytrott: Thanks, all! ---------------------- I realize the limitations. I'll try to find that program on here later. The DECUServe Journal July, 1995 Page 21 Force Logging of a Session Note 2541.5, 20-Jun-1995 Ferguson: VERB -> CLD and make it required? ------------------------------------------- I agree with Dale's comments. As a general rule, a privileged account can do anything -- just so you know that ... If you want to keep them from _forgetting_ to use /LOG, you might try getting VERB and the SET CLD out, off and changing it to make /LOG required, produce a command table for that user only. Then a SET HOST without /LOG will complain. I've not tried it, but it seems possible. But again, ANYTHING you do on a privileged account other than making it completely captive and closely controlled will allow someone to defeat whatever auditing you put on it. Note 2541.6, 20-Jun-1995 Lasoff: Also try WATCH6 ----------------------- I forgot to mention the WATCH utility. Version 6 (WATCH6) has the ability to run in batch. This will allow you to log activity into the DCL logfile from a submit/keep/log command. You won't be able to watch any process that has the UCB bit set (RTA devices from SET HOST). This should be on one of the VS CD's here too. Also, you may want to execute nightly ACCOUNTING and ANALYZE/AUDIT reports to see if anybody is messing with the system. I would also do a directory/date=all of sys$manager:accountng.dat, and sys$manager:security_audit.audit$journal to see if new versions exist. Note 2541.7, 24-Jun-1995 Maytrott: Went with "simple" approach for now --------------------------------------------- Perhaps I implied a bit too much of a hint towards a security slant when I wrote the original message. I get the feeling some of you think that I think I can "secure" a fully priv'd user simply by "making" him log his session. ;-) No, I wasn't born yesterday.... I realize that a priv'd user is a priv'd user. I just know that I have forgotten to log sessions I've intended to log several times and wanted to make it harder for him to forget. The reasons for logging were twofold... one, to do a CYA for him. We have users who tend to be blamers. If anything they do doesn't work right, they want us to "prove" it's not something WE did before they try to figure out what THEY did wrong. I'm not saying that's what we always need to do, but that's what they'd like... sometimes, it is The DECUServe Journal July, 1995 Page 22 Force Logging of a Session easier for us to do a bit of that. Only the developers get away with that at all, and only because the development/data/test cluster has been and will be undergoing tremendous modifications (h/w, s/w, n/w). The operator would like to be able to clear himself if someone "accuses" him of messing up something in their account while he performed the [your favorite user support function here] on their account. Secondly, if something does accidently get messed up, I'd like to be able to review the steps that led to the mess-up, both to come up with a fix in a minimum amount of time, and to take some preventative measures for next time (which might include setting up a .COM file or a symbol to help perfom the function, or doing some additional training). The operator's in agreement with this. I can pretty much backtrack his workload to find out what stuff he was doing when something messed up if I had to anyhow, but would rather have the exact keystrokes when possible. I'm not trying to head off any malicious damage, because there's enough other ways he could do stuff if he wanted... jeeez, he's got physical access to the computers. Doesn't take much checking to find out how to get all the privs you want via physical access. ;-) I ended up creating a symbol which calls a command file. The command file asks which node he wants, then does a SET HOST/LOG to that node, inserting the priv'd account username, but not password. Not fancy, and admittedly, not "secure" in restricting only logged access. However, it sports a big reminder banner upon login in case he forgets to go in via the symbol (unlikely, since he won't be used to logging in directly and typing in that username... the symbol doesn't match the username). I think this will do the trick for most of what I'm trying to accomplish. Thanks for all the pointers, though. If I change my mind and want to go to something more "airtight," I'll know where to refer. SYSUAF in Mixed VMSclusters ------ -- ----- ----------- Abstract: Mixed-architecture VMSclusters with a common SYSUAF file can pose an interesting problem: certain user quotas may be precisely the right thing on a tuned-til-it-squeaks VAX, but make no sense whatsoever on a newly decked-out Alpha in the same cluster. This is the topic of the next series of notes. Participants: Bruce Bowler, Rob Brooks, Chuck Gaffron, Jamie Hanrahan, David Kindler, Lynda Peach, Benjamin Pena, Pat Scopelliti, Patrick Stair, Glenn Zorn. The DECUServe Journal July, 1995 Page 23 SYSUAF in Mixed VMSclusters Conference: VMS Note 2533.0, 25-May-1995 Kindler: Sysuaf in axp/vax cluster ---------------------------------- I have installed our Alpha 2100 running vms6.1 into our vms 5.5-2 cluster. Everything looks good but I would like to use our old sysuaf.dat and rightslist.dat instead of having to recreate all new accounts with new uaf parameters and identifiers. Does anyone have any experience with this? Note 2533.1, 25-May-1995 Zorn: Should be no problem... ----------------------------- You can do this no problem. I am currently running a mixed cluster and sharing all the database files. (Your only problem will be one of the net proxy files I believe) You might also have to change some quotas, increase for the AXP, software. Note 2533.2, 25-May-1995 Gaffron: not been a problem --------------------------- We have been running our 2100s (AXP Vms V6.1) in the cluster with all of our Vax Vms V5.5-2 system and they all share the same uaf, rightslist, cdd dictionary (all users have sub-dictionaries on their own dasd) and vmsmail_profile for the last 6 months. You should also share the same lmf$license database or you will run into "license units" problems like you would not imagine. (you should manage the license database from the Vms V6.1 nodes) Note 2533.3, 25-May-1995 Brooks: -------- Just for completeness, the proper way to share SYSUAF and RIGHTSLIST (or more accurately, the way to move SYSUAF and RIGHTSLIST from their default location of SYS$SPECIFIC:[SYSEXE]) is to define executive mode logicals that point to their new locations. The logicals are named (logically enough) SYSUAF and RIGHTSLIST. You probably knew this anyway, but just in case . . . The DECUServe Journal July, 1995 Page 24 SYSUAF in Mixed VMSclusters Note 2533.4, 25-May-1995 Kindler: More confusion - sysuaf for vax/axp -------------------------------------------- I guess I am a little confused. I was told by someone from DEC that I should have seperate sysuaf files because the uaf parameters need to be higher for the alpha. I am reading the guidelines for vmscluster configurations (vms 6.1) and it says (on page 8-11) that you SHOULD use the same sysuaf file but that you need to change some system parameters. It does not tell you what system parameters to change. Can anyone point me in the right direction?? Note 2533.5, 25-May-1995 Scopelliti: You say pages, I say pagelets ----------------------------------------- My guess is they meant the PQL parameters. Be aware of the distinction in the use of the term "page" between VAX and Alpha architectures. A VAX page is 512 bytes, while an Alpha page is (currently) 8192 bytes, or 16 "pagelets". UAF and PQL entries on both systems deal in pagelets. Now if the sysuaf.dat file had nodename-specific settings... Note 2533.6, 27-May-1995 Stair: Use PQL_M* and certain logicals -------------------------------------- We use a cluster-wide set of SYSUAF, net-stuff, and other files. My reading of the documentation indicates that using a single SYSUAF file has the potential for some non-optimized parameters, depending on your usages and your settings of the proper PQL sysgen parameters. The manual "A Comparison of System Management on OpoenVMS AXP and OpenVMS VAX" that came with AXP V1.5 (I haven't investigate the 6.1 edition if there is one), section 2.2.26 "How Process Quotas Are Determined in Dual-Architecture VMSclusters" describes how to use the PQL_M* on VAX and Alpha nodes in a mixed cluster to set minimum process quotas. We have used that to overcome differences between the two architectures using the same UAF FILE. What we do is define in SYLOGICALS.COM (on both the VAX and the Alpha bootups) various cluster-wide logicals. Of particular interest here, we've define CLUSTER$BOOT$SYSEXE to point to the _VAX_ (not the Alpha, because the VAX boots first at our site) SYS$COMMON:[SYSEXE] directory. Then, each SYSTARTUP_VMS.COM (both VAX and Alpha bootups) have the following (which, I suppose, could just as well be in SYLOGICALS.COM): $ DEFINE/SYSTEM/EXEC SYSUAF CLUSTER$BOOT$SYSEXE:SYSUAF $ DEFINE/SYSTEM/EXEC RIGHTSLIST CLUSTER$BOOT$SYSEXE:RIGHTSLIST $ DEFINE/SYSTEM/EXEC NETPROXY CLUSTER$BOOT$SYSEXE:NETPROXY $ DEFINE/SYSTEM/EXEC NET$PROXY CLUSTER$BOOT$SYSEXE:NET$PROXY $ DEFINE/SYSTEM/EXEC NETOBJECT CLUSTER$BOOT$SYSEXE:NETOBJECT $ DEFINE/SYSTEM/EXEC VMSMAIL_PROFILE CLUSTER$BOOT$SYSEXE:VMSMAIL_PROFILE The DECUServe Journal July, 1995 Page 25 SYSUAF in Mixed VMSclusters $ DEFINE/SYSTEM/EXEC SYS$SYLOGIN CLUSTER$BOOT$SYSMGR:SYLOGIN.COM Note 2533.7, 1-Jun-1995 Peach: UAF> HELP on WS params wrong for 6.1 ------------------------------------------- Also be aware that the HELP under UAF> (Authorize) has *incorrect* information about the AXP settings. This is VMS version 6.1. Note 2533.8, 6-Jun-1995 Pena: want a cheesy hack? ;-) ----------------------------- One way we did it was to leave all process quotas at the VAX settings, and in sylogin (or some such place, can't recall offhand at the moment), run a home-brewed kernel mode hack that raises the appropriate quotas as needed on the AXP. Ta-da! Problem solved. :) 'Course we also bumped up the PQL_M* parameters on the AXP. Note 2533.9, 8-Jun-1995 Hanrahan: ---------- > 'Course we also bumped up the PQL_M* parameters on the AXP. That was what I was about to suggest. Why did you need the program also? Note 2533.10, 8-Jun-1995 Pena: 'twas the user process quotas that needed bumping up ---------------------------------------------------------- Ah. PQL_M* bumped on the AXP wasn't a problem. However, in a mixed architecture cluster (1 AXP, 7 VAX, all running 6.1), we weren't sure how to differentiate user process quotas under VAX or AXP with a common UAF for all nodes in the cluster, so we went by the route of the hack to bump up user quotas upon login to the AXP. Note 2533.11, 8-Jun-1995 Bowler: but... -------------- But the processes will get bumped up to PQL_M* automatically (except under certain conditions, which only occur during startup). Unless the hack bumps different users differently, it's not needed. The DECUServe Journal July, 1995 Page 26 SYSUAF in Mixed VMSclusters Note 2533.12, 8-Jun-1995 Pena: memory's bad today. :) ---------------------------- You're right, sorry. The AXP joined the cluster about a year ago... owas being set up for about two months instead of the usual 1, because of the changes in paradigm we had to use, as far as AXP planning goes (hardware/software/migration). During this time, system support determined the way to go about this addition was: Bump up all user quotas in the clusterwide UAF to AXP levels, then in SYSGEN on the VAXes, bump necessary quotas down, as SYSGEN quotas having precedence over UAF quotas. Initially, we determined a kernel mode hack was necessary to handle certain quotas on the VAXes (can't recall what at the moment), although I don't know if we are still using the hack or not. I can check around to see if we came up with a cleaner solution than the hack. MOUNT and OpenVMS V6.1 ----- --- ------- ---- Abstract: "Hmm, I wonder what this cryptic bit in the release notes means?" "What do you mean, I can't mount my own disk?" If you find the above (hypothetical) monologue at all disturbing, you may want to read the next few notes. They discuss changes to MOUNT in OpenVMS V6.1, and the new SET SECURITY command. Participants: Larry Clegg, Larry Kilgallen, Charlie Wrenn. Conference: VMS Note 2544.0, 22-Jun-1995 Wrenn: MOUNT under OpenVMS/VAX 6.1 ---------------------------------- The OpenVMS 6.1 new features manual indicates that the MOUNT command has been changed, but neither that nor the release notes tell what it is that is now different (that I can find anyway). Does anyone know how MOUNT has been changed, particularly with respect to MOUNT/CLUSTER? The DECUServe Journal July, 1995 Page 27 MOUNT and OpenVMS V6.1 Note 2544.1, 22-Jun-1995 Wrenn: Can't mount my own disk ------------------------------ Following up my own question with more detail: When I first asked, it was mostly out of curiosity, but now I really do have a problem. This was working before the OpenVMS/VAX 6.1 upgrade (from 5.5-2). I have an account that occasionally needs to mount a removable, optical disk on the cluster. By giving this account SYSNAM priv, it had worked fine. Now when I try to mount the disk (whether cluster or not), I get: %MOUNT-F-NOPRIV, insufficient privilege or object protection violation Now that appears to be a prefectly lucid error message, but I'm just not understanding. The disk volume is owned by this account. What privilege does it need? So far my only work around has been to do the mount from the system account, which is not an acceptable solution. I'm confused. Note 2544.2, 22-Jun-1995 Clegg: USE SET SECURITY ----------------------- I encountered this same problem. It doesn't matter who owns the volume because the real problem is accessing the device itself. Digital has increased the security awarness in VMS V6.1. I had to go through all my tape devices which the "public" can mount/dismount and set the correct protection levels. For my environment I used: $ SET SECURITY/DEVICE/PROT=W:RWLP $1$MUB0: I then found out that this enables the device only temporarily. You'll lose this setting next time you reboot unless you do: $ SET SECURITY DEVICE/CLASS=SECURITY_CLASS - _$ /PROFILE=TEMPLATE=TAPE /PROT=(W...) Be warned: this will set it for ALL device class = tape units. This was ok in my shop but it might not be ok in your shop. The HELP SET SECURITY is not too clear about all this. A DSNlink Q & A got me going in the right direction. Note 2544.3, 22-Jun-1995 Clegg: SET SECURITY is new -------------------------- I forgot to note that SET SECURITY is new to 6.1 and supercedes SET PROT. Enjoy. The DECUServe Journal July, 1995 Page 28 MOUNT and OpenVMS V6.1 Note 2544.4, 22-Jun-1995 Clegg: More TMSCP MOUNT Problems -------------------------------- Well I can't seem to get all my thoughts into one place. I also have had LOTS of problems with MOUNTING a TMSCP-served tape drive under OpenVMS/VAX 6.1. If I attempt to MOUNT a tape drive which is TMSCP served to the cluster I will hang in the MOUNT command. The only way of freeing everything up is to reboot the whole cluster! That's right - the whole cluster. Just rebooting the node to which the tape drive, a TU81+ in this case, is physically attached does no good. Rebooting the node which attempted to mount the tape drive does no good either. The problem only clears up with a full cluster reboot. Digital thinks that I may have had a unique hardware/software problem. My TU81+ has been effectively gutted and replaced with new parts. Digital has also downloaded a brand new TMSCP process. They say I'm the only one with this version of TMSCP - what an honor. I haven't had a chance to reboot the whole cluster yet to implement this new TMSCP - that will happen this weekend. As long as I access the tape drive only from it's host node everything is a-ok. Digital tells me this problem has surfaced at only one other customer site but they can't reproduce as frequently as we can. Note 2544.5, 23-Jun-1995 Wrenn: SET SECURITY does it --------------------------- > $ SET SECURITY/DEVICE/PROT=W:RWLP $1$MUB0: Thanks, Larry, That did it. Actually it's /CLASS=DEVICE, but I figured that out. Note 2544.6, 23-Jun-1995 Kilgallen: SYS$EXAMPLES:RESET_DEVICE_PROTECTION.COM --------------------------------------------------- > I then found out that this enables the device only temporarily. You'll lose > this setting next time you reboot unless you do: > > $ SET SECURITY DEVICE/CLASS=SECURITY_CLASS - > _$ /PROFILE=TEMPLATE=TAPE /PROT=(W...) Note that DEC has provided a command procedure to do this: Directory SYS$COMMON:[SYSHLP.EXAMPLES] RESET_DEVICE_PROTECTION.COM;1 6 Total of 1 file, 6 blocks. The DECUServe Journal July, 1995 Page 29 Windows NT Crash Dumps Windows NT Crash Dumps ------- -- ----- ----- Abstract: By now, anyone who hasn't been hiding under a very large and sturdy rock has heard that OpenVMS and Windows NT have many commonalities of design, and indeed of designer. [Editorial Digression: If we hear the smug little ditty about VMS incremented giving WNT one more time, we just might do something drastic.] But crash dump analysis? Why not? It might not be quite at the level of the System Dump Analyzer yet, but it can be done. Participants: Jamie Hanrahan, Ken Johnson. Conference: WINDOWS_NT Note 95.0, 27-Apr-1995 Johnson: Analyzing Crash Dumps ------------------------------ Using WinDbg KD to examine crash dumps for the standard Intel build of Windows NT 3.5, using an Intel system running the same build. There may be shortcuts or simplifications that could be made to some of these steps. However, when I do it this way, it works for me. I tried lots of other ways that didn't work. 1) Copy the \support\debug\i386... subtree from the distribution CD to a convenient working directory and subtrees on a hard drive, say YOURDISK:\support\debug\i386. 2) Copy \mstools\bin\i386\*.dll from the WNT 3.5 SDK to YOURDISK:\support\debug\i386. 3) Copy \mstools\help\windbg.hlp from the WNT 3.5 SDK to YOURDISK:\support\debug\i386. 4) Open a command prompt window and set the default directory to YOURDISK:\support\debug\i386. 5) Type WINDBG at the command prompt. 6) Using the 'User Dlls' choice from the 'Options' menu of WinDbg, set the Symbol Search Path to YOURDISK:\support\debug\i386\symbols. 7) Using the 'Kernel Debugger' choice from the 'Options'menu of WinDbg, open the crash dump file. 8) Give the 'L' command in the command window of the debugger -- this The DECUServe Journal July, 1995 Page 30 Windows NT Crash Dumps gets things loaded. 9) Give the '!drivers' command in the command window of the debugger -- this prints the starting address of the loaded drivers. 10) Give the 'K' command in the command window of the debugger -- gives a very limited traceback of the stack. 11) Give the 'DD @ESP' command in the command window, followed by 'DD' commands as needed. This dumps the stack as longwords. Note 95.1, 29-Apr-1995 Hanrahan: Some comments... -------------------------- Pretty good job! Just a few pointers: > 1) Copy the \support\debug\i386... subtree from the distribution CD to > a convenient working directory and subtrees on a hard drive, say > YOURDISK:\support\debug\i386. You don't really need all those symbol files. I usually get by with just the drivers, ntoskrnl, and hal. > 2) Copy \mstools\bin\i386\*.dll from the WNT 3.5 SDK to > YOURDISK:\support\debug\i386. > > 3) Copy \mstools\help\windbg.hlp from the WNT 3.5 SDK to > YOURDISK:\support\debug\i386. If you've installed the SDK to YOURDISK:, you already have done effectively this -- just click on the WINDBG icon in the SDK Tools group. EXCEPT.... you have to be using the kdext*.dll that is built for the "build" you're debugging. If you installed NT from the SDk CD-ROM, fine. Otherwise you need to go to the CD-ROM from which you installed NT and get the kdext*.dll from there. If you are debugging multiple platforms, ie free and checked build, you have a problem -- they're named the same and there is no way in windbg to point it at a particular kdext dll. But, WINDBG looks in the directory in which its own .exe lives to find its dlls. So you can create a couple of different directories, say one for free build and one for checked, and put the appropriate windbg.exe and kdext*.dll's in each. > 4) Open a command prompt window and set the default directory to > YOURDISK:\support\debug\i386. > > 5) Type WINDBG at the command prompt. Or just go to file manager, open the directory, and click on windbg.exe. > 6) Using the 'User Dlls' choice from the 'Options' menu of WinDbg, set > the Symbol Search Path to YOURDISK:\support\debug\i386\symbols. The DECUServe Journal July, 1995 Page 31 Windows NT Crash Dumps similar comments for the kdext*.dll's apply to the symbol files also. ie you may want to have ...i386\free807\symbols and ...i386\chkd807\symbols . Note that the upper-level directory names for all of these things are not critical. Mine are in \kdbg\free807\i386\symbols... and \kdbg\free807\i306\bin . > 7) Using the 'Kernel Debugger' choice from the 'Options'menu of WinDbg, > open the crash dump file. > > 8) Give the 'L' command in the command window of the debugger -- this > gets things loaded. > > 9) Give the '!drivers' command in the command window of the debugger -- > this prints the starting address of the loaded drivers. > > 10) Give the 'K' command in the command window of the debugger -- gives > a very limited traceback of the stack. You can also open the "calls" and "locals" windows under the "windows" menu. !help at the prompt in the command window gets a list of the kernel debugger extension commands. Lotsa neat stuff in there... Just as in a VMS crash dump, the stuff at the very top of the stack will usually be in the routine that raised the bugcheck exception. You have to look down the stack a bit to find out who really caused the problem. Note 95.2, 4-May-1995 Johnson: Cross-platform dumps; page file; Stop screen ----------------------------------------------------- Note that in some cases, the crash dump is written to the page file at the time of the crash, and copied to the dumpfile when the system next boots. So if your checked build system crashes, and you chose the free build when you reboot, the dump file might or might not be there. You may need to reboot the build that crashed and let it come up completely so that the dump can get copied. It might be that this is only a problem if the dump file is not in the default location. On one system, I needed to enlarge the page file so it would come up without complaining about virtual memory shortages when coming up after a dump. I have tried to examine MIPS and Alpha crashdumps from an Intel system. I couldn't open the MIPS dumpfile at all -- reports "Crash Dump Specified is not really a crash dump". I could open the Alpha dumpfile, but some commands, like !drivers, wouldn't work. For now, I recommend using a system of the same architecture to examine the dumpfile. > Just as in a VMS crash dump, the stuff at the very top of the stack will > usually be in the routine that raised the bugcheck exception. You have > to look down the stack a bit to find out who really caused the problem. The DECUServe Journal July, 1995 Page 32 Windows NT Crash Dumps Jamie's point here is a good one. It moves the discussion from the mechanics of being able to look at a crash dump (the part that was hard for us to figure out, even with some calls to Microsoft support) to interpreting the crash dump. A similar caution applies to interpreting the Stop screen display (Blue Screen of Death). At least on the Intel platform, we sometimes see addresses displayed from the stack which are leftovers, and not in the current call chain. We usually see the actual address of the fault, but sometimes don't see the return address from the current routine -- which is a bother if the fault occurs in a special bug-trapping routine which is checking for a corrupted database or inconsistent state. (Which got us into looking at crash dumps in the first place.) Note 95.3, 4-May-1995 Hanrahan: ---------- > For now, I recommend > using a system of the same architecture to examine the dumpfile. That's odd. Cross-platform kernel debugging certainly works. You have to select the right processor architecture in one of the Options... dialogs. SET SECURITY on Tape Units --- -------- -- ---- ----- Abstract: The new SET SECURITY command, also discussed elsewhere in this issue, can change the default protection for specific tape (and other) units. The question in the following stream concerns whether or not those settings survive a reboot. Participants: Debbie Driesman, Alan Hunt, Larry Kilgallen, Laurie Maytrott, Harrison Spain. Conference: SECURITY Note 309.0, 5-Jun-1995 Maytrott: How permanent is SET SECURITY on tape units? ------------------------------------------------------ If I use SET SECURITY (VAX/VMS V6.1) to change the default protection for a tape unit, does the new protection go into a permanent database The DECUServe Journal July, 1995 Page 33 SET SECURITY on Tape Units and survive rebooting or does this have to be done at every boot-up? Note 309.1, 5-Jun-1995 Spain: I think this needs to be done in the SYSTARTUP_VMS.COM file ------------------------------------------------------------------ I don't think the protections are retained since these devices are created during reboot. I just finished setting an ACL on the NET0: device and it was no longer there after the reboot. Adding the command to your SYSTARTUP_VMS.COM should do the trick :-). Note 309.2, 5-Jun-1995 Kilgallen: ----------- For clusterwide devices, it is certainly supposed to be retained. I thought it was for tapes as well. Of course an individual driver can change the protection of its device after UCB creation, and perhaps that is what is happening for NET0:. Note 309.3, 6-Jun-1995 Driesman: Disk and tape security is permanent --------------------------------------------- Section 4.3 of the V6.0 OpenVMS VAX Guide to System Security describes when and where device security profiles are derived. For disks and tapes it states "Once the device is visible within a cluster, its profile, with any modifications, is retained across system restarts." However, template changes don't propagate down to devices, so the device security profile needs to be re-set if the profile changes. Note 309.4, 6-Jun-1995 Hunt: It can be permanent ------------------------- From experience they can be made permanent. Same for floppy drives. UNIX Filename Globbing ---- -------- -------- The DECUServe Journal July, 1995 Page 34 UNIX Filename Globbing Abstract: Although it beats the heck out of your faithful editors what is meant by "filename globbing", we trust this information will be of use to someone. (But then, our own operating system biases are well established.) The pointer to C-Kermit, incidentally, comes naturally to Terry Kennedy -- after all, he did the VMS implementation. Participants: Terry Kennedy, Howard Siegel, Ray Whitmer. Conference: UNIX_OS Note 276.0, 18-Jun-1995 Siegel: Filename globbing in a program -------------------------------------- How does one do file name globbing from within a program? Note 276.1, 22-Jun-1995 Whitmer: What I have seen was pretty messy on UNIX. --------------------------------------------------- I assume that for some reason the automatic globbing from the shell is inadequate. I am no UNIX expert, but the code I have seen written by others in UNIX is very messy, i.e. open the directory file, use standard header definitions to know how to read that file, and pass them through a wildcard-matching algorithm. Note 276.2, 23-Jun-1995 Siegel: Not quite ----------------- > I assume that for some reason the automatic globbing from the shell is > inadequate. Not inadequate, just not available. The program is not getting the globbed filenames from the command line because that is not where the file names are comming from, thus I must glob from within the program. If I could get the names from the command line then all my problems would be fixed. I tried constructing a new command line and then 'execl'ing it, but that doesn't go through the shell, so no filename globbing gets done. Oh well, looks like I'm gonna have to get dirty doing the parsing myself. The DECUServe Journal July, 1995 Page 35 UNIX Filename Globbing Note 276.3, 23-Jun-1995 Kennedy: C-Kermit ----------------- I'd suggest you take a look at C-Kermit's ckufio.c module. It can expand a wildcarded list to individual names itself or call the shell to do it. You may already have C-Kermit source, or you can get it from watsun.cc.col- umbia.edu in kermit/c/. Note 276.4, 24-Jun-1995 Siegel: found it ---------------- Thanks Terry. Note that the path was actually kermit/c-kermit/ckufio.c. POP Server for Unix --- ------ --- ---- Abstract: The following series of notes considers various ways and means of getting a POP (Post Office Protocol) server for remote mail clients to run under Unix. Also included at the end is a worthwhile lession in security issues related to running as root. Participants: Kevin Angley, Charlie Byrne, Joe Matuscak. Conference: UNIX_OS Note 275.0, 13-Jun-1995 Byrne: POP Server for DEC Unix ------------------------------ What is a good POP server to use on DEC OSF V3.0? How about the Popper from ftp.cc.berkeley.edu - that seems to be fairly popular (npi). Does one come with the distribution CD's (freeware or complementary products)? The DECUServe Journal July, 1995 Page 36 POP Server for Unix Note 275.1, 20-Jun-1995 Matuscak: ---------- I dont know about OSF, but Ive got an Ultrix system and I use the pop server from ftp.qualcomm.com, the home of Eudora (A quite nice pop client for Windows and Mac, BTW). My impression is that someone at Qualcomm has been maintaining it. Note 275.2, 21-Jun-1995 Byrne: mh includes pop ---------------------- Now I see that mh, the Rand Mail Hander, comes with the OSF/1 3.0 kit (as an optional subset). This supposedly includes POP server capabilities. So now the question becomes, Is there any reason for me to use a different POP server (e.g. from ftp.qualcomm.com) if I already get one with mh? Note 275.3, 21-Jun-1995 Matuscak: ---------- My impression is that mh isnt all that mainstream, but other than that, I dont have much idea. Is mh supported on OSF? (With Ultrix, its on the unsupported kit). BTW, if you want a pretty decent terminal oriented mail program, check out pine. Its actually pretty nice. Note 275.4, 23-Jun-1995 Byrne: PINE SOLution, get PINE TAR file (npi) --------------------------------------------- Well actually it turns out that the Pine package (FTP.CAC.WASHINGTON.EDU) is exactly where I ended up getting my POP server from. They also have IMAP server, the guy who wrote the original IMAP is working there. Installation was simple, I was able to copy the OSF/1 binary from another machine and then you just: 1) Stick the binary (ipop3d) somewhere (eg /usr/local/bin) 2) tell /etc/services that port 110 => pop3 3) tell /etc/inetd.conf pop3 => /usr/local/bin/ipop3d Dat all! Go back to your PC, fire up Eudora and you're all set. I am Unix newbie and got stuck because: 1) when I FTP'ed the binary it apparently didn't copy the "Executable" permissions, so I had to CHMOD them (once I figured this out) The DECUServe Journal July, 1995 Page 37 POP Server for Unix 2) If you are root and have the # prompt and you have program x in your current directory, and you type "x", it sez "Not found". This drove me nuts until I finally decided what the heck let me try this from a regular user account, and haha it worked. I guess it has something to do with root shell or something? That will teach me to stay in root longer than necessary, eh? Note 275.5, 23-Jun-1995 Angley: No . in root's path --------------------------- The difference probably was that the regular user account has "." (the current working directory) in the path, and the root account does not. Having . in the path can be dangerous in that an unscrupulous user could have a phony "ls" or some such in their directory and seek your help as root. Thus, the ls you thought was ls is really their version of ls (which, if they are clever, also looks like ls). The root account may not have "." because COPS and other security checkups will check and correct this in the root account. 4mm DAT Autoloader --- --- ---------- Abstract: A long-running stream on DEC 4mm DAT tape drives contains the following discussion of the SCSI arcana necessary to control the autoloader on a TLZ06L. Participants: David Campen, Jamie Hanrahan, Bob Hassinger, Terry Kennedy, Frank Nagy, Keith Parris. Conference: HARDWARE_HELP Note 1482.19, 31-May-1995 Hassinger: "SCSI Random Access Commands" (re: TLZ06L programming) ----------------------------------------------------------------- Well, I finally have one of these TLZ06L DAT drives with autoloader in hand (until it is swapped for the TLZ07L I ordered and which is on very long lead time at the moment). Seems pretty nice - at least compared to the TU81+... Anyway, I am now down to really needing information on controlling the autoloader. The only booklet that came with it says a grand total of The DECUServe Journal July, 1995 Page 38 4mm DAT Autoloader the following: "In Random Access Mode, the loader responds to all of the SCSI Random Access Commands". I have never done any SCSI programming and have no idea where to find what I need. I tried the CSC, but so far they have no idea either. A pointer to info on "the SCSI Random Access Commands", and some examples of using them, particularly from VMS would be very helpful. Also, at this point I am unclear about the LUN issue Terry mentioned back in .6. It would seem there must be a way to address at least twelve tapes since DEC sells software to use with this device and I am under the impression it can use the larger magazines (standard is 4 tapes, there was an 8 tape magazine, and the 12 tape magazine is now the standard large size). Can anyone educate me a little on this? Note 1482.20, 31-May-1995 Kennedy: --------- It's in the Archive (Connor) manual. If you call them they should be able to get you the info. If you get desperate, you can always order the SCSI spec from Global Engineering Documents. I have a copy of the manual for the Archive 4592NP (the older version) around somewhere and I could mail you a copy of the loader section if you want. > Also, at this point I am unclear about the LUN issue Terry mentioned > back in .6. It would seem there must be a way to address at least > twelve tapes since DEC sells software to use with this device and I am > under the impression it can use the larger magazines (standard is 4 > tapes, there was an 8 tape magazine, and the 12 tape magazine is now > the standard large size). Can anyone educate me a little on this? SCSI "things" are disks, tapes, CD-ROMs, media loaders, etc. In theory, a given device can't be more than one type. In order to support environments with a strict interpretation of the SCSI spec, these drives claim to be multiple devices - a tape drive, a media loader, and so forth. All of the commands work on all of the devices, though. Each "device" is a LUN. On a VAXstation with built-in SCSI, it'd show up as different devices (MKA400, MKA410, etc., I guess). I don't know if DEC's driver actually knows what to do with a media loader, though - it may not even configure it. Here's a simple backup script that runs a media loader using only normal VMS commands. It works because the loader automatically inserts the next tape (next slot) if you eject (dismount/unload) a mounted tape. $ !'f$verify(0) $ ! BACKUP.COM - Do the system backups $ ! T1.0-00 - 03-Jan-90 - tmk - VMS V5.2, funky parameters $ ! T1.1-02 - 10-Sep-90 - tmk - VMS V5.3-1, ask about each tape $ ! T1.2-03 - 07-Apr-91 - tmk - VMS V5.4-1, add new devices $ ! T1.2-04 - 21-Nov-91 - tmk - VMS V5.4-3, add new devices $ ! T1.2-05 - 22-May-92 - tmk - Start of the Great Disk Reorganization The DECUServe Journal July, 1995 Page 39 4mm DAT Autoloader $ ! T1.2-06 - 30-Nov-92 - tmk - 2 more RA90's, 2 HSC's $ ! T1.2-07 - 04-Aug-93 - tmk - 2 more RA90's (now a full 8-pack 8-) $ ! T1.2-08 - 14-Aug-94 - tmk - GDR II (DSSI's) $ set noon $ ! $ write sys$output "" $ write sys$output "Working on $1$DIA0: on 4mm tape drive..." $ show time $ set process/name="Backup $1$DIA0:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - $1$dia0: mub0:dia0.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! $ write sys$output "" $ write sys$output "Working on $1$DIA1: on 4mm tape drive..." $ wait 00:01 $ show time $ set process/name="Backup $1$DIA1:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - $1$dia1: mub0:dia1.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! $ write sys$output "" $ write sys$output "Working on $1$DIA2: on 4mm tape drive..." $ wait 00:01 $ show time $ set process/name="Backup $1$DIA2:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - $1$dia2: mub0:dia2.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! $ write sys$output "" $ write sys$output "Working on $1$DIA3: on 4mm tape drive..." $ wait 00:01 $ show time $ set process/name="Backup $1$DIA3:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - $1$dia3: mub0:dia3.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! $ write sys$output "" $ write sys$output "Working on $1$DIA4: on 4mm tape drive..." $ wait 00:01 $ show time $ set process/name="Backup $1$DIA4:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - $1$dia4: mub0:dia4.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! The DECUServe Journal July, 1995 Page 40 4mm DAT Autoloader $ write sys$output "" $ write sys$output "Working on $1$DUA1: on 4mm tape drive..." $ wait 00:01 $ show time $ set process/name="Backup $1$DUA1:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - $1$dua1: mub0:dua1.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! $ write sys$output "" $ write sys$output "Working on SPCVXZ$DUA0: on 4mm tape drive..." $ wait 00:01 $ show time $ set process/name="Backup SPCVXZ:" $ backup/image/fast/crc/norecord/block=32256/ignore=interlock - spcvxz$dua0: mub0:dua0.bck/init/density=6250/rewind/noassist $ show time $ dismount mub0: $ ! $ write sys$output "" $ exit Note 1482.21, 1-Jun-1995 Hassinger: Maybe I am the only one who wants to know...? -------------------------------------------------------- Thanks Terry. Yes, I think a procedure like that would work with the TLZ06L since it has a similar automatic step to the next tape feature. My main interest at this point is in the random access part because I want to see if I can set it up to do something like use tape 1 on Mondays, tape 2 on Tuesdays, etc. That is, as near to an unattended backup process as possible. I currently do something along these lines using a spare disk (I have described the particular scheme elsewhere on DECUServe in the past). As disk sizes keep going up and the amount of day to day volatility increases with large data sets from the labs I am looking for a new solution. I am still unclear where DEC intendeds for me to look to find out things like the LUN for the loader, as well as the commands. There seems to be a basic piece missing somewhere. Maybe I have missed a pointer to a manual? I can't even find someone to ask. It almost seems as if DEC is trying to keep it a secret to force people to use their proprietary backup software products. Note 1482.22, 2-Jun-1995 Parris: -------- > Anyway, I am now down to really needing information on controlling the > autoloader. The only booklet that came with it says a grand total of The DECUServe Journal July, 1995 Page 41 4mm DAT Autoloader > the following: "In Random Access Mode, the loader responds to all of > the SCSI Random Access Commands". This wording appears to simply be based on the SCSI-2 spec. SCSI devices come in various flavors, and different types can handle different sets of SCSI commands. A sample of the Peripheral Device Type table is: Code Description 00h Direct-access device (e.g., magnetic disk) 01h Sequential-access device (e.g., magnetic tape) 02h Printer device 03h Processor device 04h Write-once device (e.g., some optical disks) 05h CD-ROM device 06h Scanner device 07h Optical memory device (e.g., some optical disks) 08h Medium changer device (e.g., jukeboxes) 09h Communications device It appears your tape drive is a sequential device at heart, but also can handle some additional random-access commands for the loader. If one were starting from scratch, one would probably use GKDRIVER, the generic SCSI Class Driver (or modify SYS$EXAMPLES:SKDRIVER.MAR) and send down the appropriate SCSI commands to the tape drive to control the loader. This sort of SCSI work seems to be covered reasonably well in the VMS doc set. But I suspect this type of programming has already been done for that drive. I'll check with some folks in my old group who work with SLS and PAB and try to get an answer for you. Note 1482.23, 2-Jun-1995 Hassinger: ----------- I have been getting some clues from here and there. Right now it appears that you need to do this through the MK driver since it already has control of the tape drive (i.e. my drive is MKA500:). As far as I can tell now you talk to the driver with additional op codes and data structures to controll the autoloader. For example I was told yesterday that op code A5h is "Move Medium" which I think is supposed to move tape cartridges back and forth between the slots in the magazine and the drive by "address". So far my information is too sketchy to really understand or use it though. I was only able to get a little bit of the puzzle. SLS sounds like a likely place to ask. Everyone I ask keeps trying to sell me the software products that use these drives. They seem to be the only people who have a clue how it works. The DECUServe Journal July, 1995 Page 42 4mm DAT Autoloader Note 1482.24, 2-Jun-1995 Parris: -------- An answer from Rich Wrenn: Yes, we don't do a very good job of helping users program the loaders. The answer to his question is that you use IO$_DIAGNOSE QIOs through the GKDRIVER to LUN 1 of the device to pass standard SCSI Media Changer Interface commands to the loader. The standard SCSI commands are defined in the SCSI standard which can be obtained from the American National Standards Institute. I don't happen to have one on-line. Documentation on the GKDRIVER can be found in the VMS IO User's Guide. We're working on a utility to help make this easy. So, stay tuned. Rich Note 1482.25, 5-Jun-1995 Campen: This is why I haven't bought an autoloader. --------------------------------------------------- This is why I never bought an autoloader - I couldn't figure out where the autoloader commands came from. DEC might sell more autoloaders if they would tell people how to use them. Note 1482.26, 5-Jun-1995 Hassinger: ----------- Re .24 - thanks! Re .25 - amen!! Note 1482.27, 5-Jun-1995 Hassinger: MK and GK on the same unit??? ---------------------------------------- > The answer to his question is that you use IO$_DIAGNOSE QIOs through the > GKDRIVER to LUN 1 of the device ... Question then. As I mentioned, it would seem VMS normally sees the tape part as MKannn. I am not clear what, if anything, is involved in trying to use GKDRIVER to access the autoloader. Note 1482.28, 6-Jun-1995 Nagy: Canot have MK and GK on the same unit! -------------------------------------------- Both the MKDRIVER and DKDRIVER provide support for sending your own SCSI commands to the device. You need DIAGNOSE privilege and then can use the IO$_DIAGNOSE function code to send SCSI command packets The DECUServe Journal July, 1995 Page 43 4mm DAT Autoloader to the device. This appears to be the way the DLT stackers works since the stacker mechanism is not a separate SCSI id. This should also work when then stacker mechanism is a higher numbered LUN (see above) on the same SCSI id. > Question then. As I mentioned, it would seem VMS normally sees the > tape part as MKannn. I am not clear what, if anything, is involved in > trying to use GKDRIVER to access the autoloader. One has to manually load the GKDRIVER and configure it at startup. A particular SCSI id can only be serviced by a single driver so a device handled by the DKDRIVER or MKDRIVER cannot be accessed by the GKDRIVER (but, see above). We have several Exabyte 10i stackers and EXB120 8mm libraries. The robot controllers are separate SCSI ids and are accessed by the GKDRIVER. Note 1482.29, 6-Jun-1995 Parris: -------- I forget exactly how SCSI unit numbers with LUNs are formed, but for a tape drive MKA500, LUN 1 could be accessed through GKA501 or GKA510, I forget which. You'd create the GKA device with a CONNECT command under SYSGEN (or SYSMAN IO on Alpha). Note 1482.30, 8-Jun-1995 Hanrahan: ---------- xxx501. eg with the Pioneer CD-ROM changers you let it autoconfigure LUN 0 as, for instance, DKA400, and then SYSGEN CONNECT DKA401, 402, _..., 405. RRD50/KRQ50 Info ----------- ---- Abstract: Following is a brief discussion of an old RRD50 CD-ROM drive and corresponding KRQ50 Q-Bus controller, with a few details on cables and DIP switch settings, and an offer of a manual. (Now don't go bombarding poor Bruce with requests for it! That's what the SWAP_MEET conference is for.) The DECUServe Journal July, 1995 Page 44 RRD50/KRQ50 Info Participants: Barton Bruce, Jeffrey Campbell. Conference: HARDWARE_HELP Note 1882.0, 4-Jun-1995 Campbell: RRD50/KRQ50 info request ---------------------------------- I have added an RRD50 CDROM drive and KRQ50 controller to my hardware collection. Unfortunately, I have no manuals or inter-connecting cable. I have figured out the KRQ50's addressing jumpers and VMS finds it. But I don't have the cable between the controller and the drive. I can make a cable if I have the pinouts on the drive DB-15 and the KRQ 20 pin BERG. I also am curious what the DIP switches on the rear of the RRD50 control. Help! 8-) Note 1882.1, 9-Jun-1995 Bruce: ------- Groan. Some cables and 2 dead drives went to the dumpster within the last week. One BC18R-6 cable fell off in the parking lot and may have made it into a copper wire recycle pile - I'll watch for it. The ribbon cable to bulkhead kit is in my hand now. Barely readable is P/N 70-21013-01. The ribbon cable splits in half with each half going to a DB15 Female with the ribbon cable crimped into the first 10 sockets. Wires 1-10 probably go to 1,9,2,10,3,11,4,12,5,13 of connector A and 11-20 the same ones of connector B, but I am guessing. BC18R-6 cables go from the bulkhead to the drive. SW-1 bottom is address bit 2, the top is bit 11. Not so obvious is that bit 12 is J7 just above the switch. + = 0 +-+ + | = 1 + + > I also am curious what the DIP switches on the rear of the RRD50 control. 2 manuals were in the pile to be tossed TODAY. The DECUServe Journal July, 1995 Page 45 RRD50/KRQ50 Info The drive user's quide shows switch 4 (MSB) through 9 (LSB) counting unit numbers from 0 (all off) to 16 (just 4 on). What I have left, including the Q-Bus controller (if I can find it) are yours if you want them. Wildcard Algorithm -------- --------- Abstract: A question in the rarely-used (but apparently closely-watched) ALGORITHMS conference concerning wildcard pattern-matching in C gets a quick response. Participants: Bruce Bowler, John Briggs, Dale Coy, David Mischler. Conference: ALGORITHMS Note 40.0, 18-Apr-1995 Bowler: Wildcard matching. -------------------------- I'm looking for an algorithm or pointer to one for a fast, reliable "does this string match this string that contains wildcards". Wildcards can, as in VMS match 1 (%) or any number (*) of characters. ANSI C code would be most helpful :-) Note 40.1, 18-Apr-1995 Mischler: Would full regular expressions be OK? ----------------------------------------------- Have you considered looking at GNU grep? Note 40.2, 18-Apr-1995 Coy: Grep isn't an algorithm ---------------------------- There are lots of "tools" that will do matching. However, Bruce asked for an algorithm. Bruce, if TOOLS will do, let us know. The DECUServe Journal July, 1995 Page 46 Wildcard Algorithm Note 40.3, 19-Apr-1995 Bowler: -------- Nope. I need to implement some pattern matching code in a system I'm working on. It needs (or will eventually need) to run on several systems. Language of choice is C, only need %* matching, don't want the "complexity" of grep. Note 40.4, 19-Apr-1995 Briggs: C code for pattern match -------------------------------- It's not that hard to do. After fixing the typos, changing the main routine's "return" to SYS$EXIT and using argv[1]/argv[2] instead of argv[0]/argv[1] (C is not my language of choice), this code actually worked right the first time. At least on the test cases I threw at it. Your mileage may vary. main(int argc, char* argv[]) { int match ( char* pattern, char* string); sys$exit ( match(argv[1],argv[2]) ); } int match ( char * pattern, char * string ) { int pi; int si; pi = 0; si = 0; while ( pattern[pi] != 0 ) { if ( pattern[pi] == '%' ) { /* Match exactly one arbitrary character */ if ( string[si] == 0 ) return 0; pi++; si++; } else if ( pattern[pi] != '*' ) { /* Match one specific character */ if ( string[si] != pattern[pi] ) return 0; pi++; si++; } else { /* Match arbitrary number of arbitrary characters... */ /* All sub-patterns of "*" and "%" are equivalent to */ /* a simpler pattern of a single * and the right number of %'s */ /* That is, it matches an arbitrary sequence of _at least_ */ /* some number of characters. Skip that many characters. */ while ( pattern[pi] == '*' || pattern[pi] == '%' ) { if ( pattern[pi] == '%' ) { The DECUServe Journal July, 1995 Page 47 Wildcard Algorithm if ( string[si] == 0 ) return 0; si++; } pi++; } /* The next character in the pattern is either a text character */ /* or end-of-string */ if ( pattern[pi] == 0 ) return 1; /* Match remainder of string */ /* If it's text, test all possible matches recursively */ while ( string[si] != 0 ) { if ( string[si] == pattern[pi] ) { if ( match(&pattern[pi+1],&string[si+1]) ) return 1; } si++; } /* None of them matched */ return 0; } } /* End while */ /* If we get here, the pattern ran out without encountering a "*" wildcard */ /* If the string has also run out, it matches. If not, it doesn't match */ return ( string[si] == 0 ); } Note 40.5, 19-Apr-1995 Bowler: Thanks! --------------- DTR column headers --- ------ ------- Abstract: A discussion of how to control the printing of column headers in Datatrieve. The default handling can, under sufficiently complex conditions, fail to perform as desired. Options discussed include use of the Report Writer and explicitly constructing column heads. Participants: John Briggs, Bob Hassinger. Conference: 4GLS_AND_QUERY_TOOLS The DECUServe Journal July, 1995 Page 48 DTR column headers Note 203.0, 19-Apr-1995 Hassinger: Controlling when DTR prints column headers? ------------------------------------------------------ This is an old issue, but I am not sure if I have ever seen the answer. It is about how to control when Datatrieve prints column headers. Consider: FOR whatever BEGIN PRINT something("col"/"title"),something_else("col2"/"title") END DTR prints the column headers before the first line of output, and then is clever enough to not do it again for each succeeding line printed. That is fine. But now consider: WHILE something that selects new sets sets of data BEGIN PRINT NEW_PAGE FOR whatever BEGIN PRINT something("col"/"title"),something_else("col2"/"title") END END This still only prints the headings once, even though we select new data sets, and go to new pages to report on each set. I want to be able to convince DTR to print the column headings each time I loop through the WHILE and start a new page. So far I have been unable to find a way to do it. BTW - the real program is more complex of course - there is an ON outside the WHILE so it all goes to a file for printing, there is actually more than one FOR inside the WHILE with different print commands, and a form is used in each WHILE loop to get the key that is used in the FORs to select the data sets. As it turns out, DTR seems to be able to track that it has printed the column headers, even with multiple, different FOR/PRINTs in the loop. Not a bad trick... But a pain. Any insight into how this really works and/or how to control it and be able to force the column headers to print on each new iteration through the WHILE? The DECUServe Journal July, 1995 Page 49 DTR column headers Note 203.1, 20-Apr-1995 Column header on nested print. Solutions ----------------------------------------- Try using the report writer for the inner print: WHILE something that selects new sets sets of data BEGIN PRINT NEW-PAGE REPORT whatever AT TOP OF REPORT PRINT COLUMN-HEADER ! But not page-header PRINT something("col"/"title"),something_else("col2"/"title") END-REPORT END Of course, the report writer imposes its own restrictions about the kind of actions you can perform within its scope. Depending on your requirements, you may be able to end-run around some of those restrictions. Alternatively, you could construct your own column header. Perhaps something like: DECLARE COLUMN-HEAD COMPUTED BY "GROSS NET " | " PAY PAY" EDIT-STRING IS T(24). PRINT NEW-PAGE, COLUMN-HEAD(-) > As it turns out, DTR seems to be able to track that it has printed the > column headers, even with multiple, different FOR/PRINTs in the loop. > Not a bad trick... No big deal. Each PRINT statement keeps its own context. When the whole nested mess exits back to command level, the context is discarded (along with the statement itself). Note 203.2, 20-Apr-1995 Hassinger: ----------- Thanks for the suggestions. > Try using the report writer for the inner print: I think back in 88 when I wrote this and last looked at it I was unable to find a way to get the results I wanted with Report Writer. One problem may have been that there is more than one FOR inside the WHILE, each doing different things. The first one reports several columns from each record of a particular type, then the next reports a number of different columns from another kind of records. There is also some special case logic that can print other things under selected lines that have special situations and so on. > Alternatively, you could construct your own column header. Perhaps > something like: The DECUServe Journal July, 1995 Page 50 DTR column headers > > DECLARE COLUMN-HEAD COMPUTED BY "GROSS NET " | > " PAY PAY" > EDIT-STRING IS T(24). > PRINT NEW-PAGE, COLUMN-HEAD(-) I suspect that is more-or-less what I will have to do. I guess it means explicitly controlling column widths and placement so the header and the data lines line up. BTW - is there an advantage to doing it with the declaration like that rather than with simple PRINTs (these headings actually end up down in the page at the start of each of the different FOR loops, so they don't come at the same point as the PRINT NEW-PAGE). Note 203.3, 20-Apr-1995 Briggs: Sounds like you already know what you've got to do ---------------------------------------------------------- > I suspect that is more-or-less what I will have to do. I guess it > means explicitly controlling column widths and placement so the header > and the data lines line up. Yep. Or you could fit the header to whatever layout the PRINT statement generates by default. > BTW - is there an advantage to doing it with the declaration like that > rather than with simple PRINTs (these headings actually end up down in > the page at the start of each of the different FOR loops, so they don't > come at the same point as the PRINT NEW-PAGE). No advantage that I can think of. Unless you have one heading that fits more than one print statement. Saving Window Positions ------ ------ --------- Abstract: Understatement: Not everything about DECwindows is obvious to someone just starting out. People accustomed to certain other windowing user interfaces (which will remain nameless, but they're not from MIT) might expect, for example, that windows will remember their positions from one session to the next. Of course, things are rarely as simple as they seem. The DECUServe Journal July, 1995 Page 51 Saving Window Positions Participants: david Campen, Rick Carter, Larry Kilgallen, Brian Tillman, Don Vickers, Steve Wilkins. Conference: USER_INTERFACES-WINDOWS Note 217.0, 6-Jun-1995 Carter: Saving window positions? -------------------------------- OK, I'm a 24-hour-new-to-DECWindows person. I've set all my stuff to startup automatically -- clock over here in one corner, MAIL over there, all very lovely. Now I want to get out for the day and come back in tomorrow. Everything doesn't stay in its lovely place. Is there anyway to save the window positions of the programs you set to startup automatically? Note 217.1, 6-Jun-1995 Kilgallen: ----------- Typically this is done by the individual application ... or not. Note 217.2, 6-Jun-1995 Campen: -------- I just leave my session active. I use pause to keep other people out and turn off the monitor. Note 217.3, 6-Jun-1995 Vickers: All I know about resource files (and maybe more :') ------------------------------------------------------------ Staying in the DECwindows session works especially if you failed to learn how to share in kindergarten. (': My memory is hazier than normal on this as it has been several years since I hacked around in DECwindows. The various settings for DECwindows applications are in resources files named DECW$.DAT. These files are used if they exist in the SYS$LOGIN directory. If they are not there, the system searches through the DECW$SYSTEM_DEFAULTS logical name. Your first check should be to look for any DECW*.DAT; files in SYS$LOGIN as some applications copy the system default file there as I recall. If the resource files of your favorite DECwindows applications The DECUServe Journal July, 1995 Page 52 Saving Window Positions are not in SYS$LOGIN then get a directory of DECW$SYSTEM_DEFAULTS:DECW*.DAT and copy the usual suspects from there. In spite of the .DAT name, the resource files are just text files so you can edit them to your heart's content. The first resource in most of the files is the geometry resource: Mail.geometry: 555x610+174+20 ^ ^ ^ ^ Window X size ___+ | | | Window Y size -------+ | | Window X location -------+ | Window Y location ----------+ If the geometry resource isn't there then you can add it. You can experiment with the X and Y values or observe the location values as you drag the window around the screen. In most of the resource files, there are usually enough comments to give you ideas about what the other resources do. Playing with resource files can provide hours of entertainment and kill a lot of time. Note 217.4, 7-Jun-1995 Wilkins: A DECW setup that works for me --------------------------------------- I "stole" the following concept from here or some other system (the memory goes first). I have been using it successfully for years. The first file is a command procedure that is executed each time I fire up my workstation. Note that I am not interested in location for all my sessions. $ create/terminal - /detach - /resource_file=sys$login:decw_term2.dat - /window_attributes = - (X_POSITION=5,Y_POSITION=467,initial_state=icon) $ create/terminal - /detach - /resource_file=sys$login:decw_term1.dat - /window_attributes = - (initial_state=icon) $ create/terminal - /detach - /resource_file=sys$login:decw_term5.dat - /window_attributes = - (initial_state=icon) $ create/terminal - /detach - The DECUServe Journal July, 1995 Page 53 Saving Window Positions /resource_file=sys$login:decw_term3.dat - /window_attributes = - (X_POSITION=75,Y_POSITION=295,initial_state=icon) $ create/terminal - /detach - /resource_file=sys$login:decw_term6.dat - /window_attributes = - (initial_state=icon) $ create/terminal - /detach - /resource_file=sys$login:decw_term4.dat - /window_attributes = - (X_POSITION=5,Y_POSITION=381,initial_state=icon) ================================================================== An example of the decw_term*.dat file follows (nothing fancy - just naming the windows and Icons). ================================================================== DECW$TERMINAL.decWmValueMask: 1 DECW$TERMINAL.title: RITVAX DECW$TERMINAL.main.terminal.displayWidth: 907 DECW$TERMINAL.main.terminal.displayHeight: 488 DECW$TERMINAL.main.terminal.displayWidthInc: 11 DECW$TERMINAL.main.terminal.displayHeightInc: 20 DECW$TERMINAL.main.terminal.fontSetSelection: 0 DECW$TERMINAL.main.terminal.fontUsed: -Bitstream-Terminal-Medium-R-Normal--18-180-75-75-C-11-ISO8859-1 DECW$TERMINAL.main.terminal.bitPlanes: 4 DECW$TERMINAL.main.terminal.y: 20 DECW$TERMINAL.main.terminal.width: 907 DECW$TERMINAL.main.terminal.height: 488 DECW$TERMINAL.main.terminal.borderColor: #111100001111 DECW$TERMINAL.iconName: RITVAX DECW$TERMINAL.borderWidth: 1 ================================================================== Believe me you can have hours of "fun" locating windows on a screen. Hope this helps. Note 217.5, 15-Jun-1995 Tillman: Where to find Save --------------------------- After positioning your clock, put the pointer on its face, press and hold MB3, and you'll get a pop-up menu one of whose items is "Save Settings". Slide the pointer to it and let go. The next time, your clock will be in the same location. You can do this for Mail, too, but the "Save Options" menu item is in the "Options" menu of the main The DECUServe Journal July, 1995 Page 54 Saving Window Positions window. The same for DECterms, CMS, LSE, and some others. The Calculator has a "Save Geometry" item in the File menu. This is not an exhaustive list. About the DECUServe Journal --------------------------- Publication Information Topic threads in the DEC Notes conferences on DECUServe are selected for publication on the basis of strong technical content and/or interest to a wide audience. They are submitted to the editor from various sources, including DECUServe Moderators, Executive Committee members, and other volunteers. Suggestions for inclusion are enthusiastically solicited. Articles selected for publication are edited on an OpenVMS VAX system in TPU and then formatted with Digital Standard Runoff. What's a DECUServe, Anyway? DECUServe is an on-line conferencing system which is available 24 hours a day, seven days a week. System backups are done on Fridays from 7:00am to approximately 9:00am Eastern (Daylight/Standard) Time. Scheduled downtimes for equipment or software maintenance are announced in advance. The system can be reached worldwide, and membership is by individual subscription only (no group or company accounts). The current annual subscription fee is US$75.00. On-line subscription information is available in the U.S. by dialing 1-800-521-8950 and logging in with username INFORMATION. DECUServe and the INFORMATION account can also be reached on the Internet via telnet connection to decuserve.decus.org or e-mail to information@decuserve.decus.org. Contact Information ------------------- The editors of the DECUServe Journal are Brian and Sherrie McMahon. They can be reached by any of the following means: mcmahon_b@decuserve.decus.org mcmahon_s@decuserve.decus.org mcmahonb@decus.org griffith@decus.org mcmahon@ac.grin.edu The DECUServe Journal July, 1995 Page 55 Saving Window Positions griffith@ac.grin.edu +1 515 269 4901 (normal office hours, U.S. Central time) +1 515 269 4936 FAX