Copyright 1990-2016 by Kevin G. Barkes All rights reserved. This article may be duplicated or redistributed provided no alterations of any kind are made to this file. This edition of DCL Dialogue is sponsored by Networking Dynamics, developers and marketers of productivity software for OpenVMS systems. Contact our website www.networkingdynamics.com to download free demos of our software and see how you will save time, money and raise productivity! Be sure to mention DCL Dialogue! DCL DIALOGUE Originally published September, 1990 By Kevin G. Barkes DCL Noir The envelope was from a big Massachusetts outfit. They wanted their money. Now. Things had been tough the last few months, now that John Q. Public had finally gotten the hang of VMS 5.0. And when the Dicks and Janes in the computer rooms of the Big Town are happy, they don't call Studs Kernel. I tossed the envelope onto a stack of unpaid bills and patted Betsy, my VAXstation 3100, on her SCSI connector. "Sorry, babe," I said. "Looks like me and you are gonna be stuck at 5.3-1 for awhile." A shadow fell on Betsy's screen. I spun to greet the intruder, a steely-blue MMJ connector in my right hand. It was a blonde, a blonde to make a bishop kick a hole in a stained-glass window. I stole that line from Raymond Chandler. Call it justifiable appropriation. The skirt was built like the VMS doc set, and her face was just as inscrutable. "You Studs Kernel?" she asked, the heat in her voice causing the smoke detectors on the Sensaphone to quiver. "Who wants to know?" I replied, pocketing the MMJ and collapsing in my chair. "Never mind," she said. "A friend sent me. Said you might be able to help. I've got problems." "Don't we all," I growled, pushing aside the pile of unpaid bills to get a better look at the mysterious beauty. "Whaddya need?" "There's a new mob moving in at my place. Slobs. Don't log out, hog the cpu, run images they shouldn't be messin' with. I gotta stop it somehow." I leaned back in my chair and looked at her through half-closed lids. "Why come to me?" I asked. "There are a lot more - shall we say - reputable outfits who can sell you neat little packages that can do your dirty work." She sighed and shook her head, her tawny mane stirring the dust motes that drove Field Service crazy. Me, I liked them. I even started giving them names. Ya gotta do something while DECwindows boots. "The Big Guy's clamped down," the blonde complained. Says he already spends enough samolians on VMS. Said to do it myself." I gave her a wry smile. "You seem like a smart enough cookie to do it yourself with DCL. Maybe a few intensive personal lessons..." "Can it," she snapped. "This is 1990, you sexist pig. Besides, I make it a point not to associate with persons who wear raincoats while sitting at terminals. "My time is valuable. Give me the code." I sighed. Things haven't been the same since Remington Steele. "I have a nice little procedure that runs in batch or as a detached process..." I offered. "No good. Too impersonal. It has to be interactive. I want to enjoy blowing away those scummy processes." I rummaged through my desk and found the TK50. I tossed it to her. She snatched it out of the air and held it at arm's length, a look of utter distate on her face. "Just wipe the soy sauce off before you mount it," I said. "This will do the job?" she asked. "Foolproof," I replied. (See Program 1). "What do I owe you?" she inquired as she headed for the door. "How about lunch sometime?" I said, trying to maintain my composure. "Sure," she replied. "Just send me e-mail. You know how to send e-mail, don't you? First you locate a node on the usenet and configure your server process..." Sigh. Good thing Lauren Bacall didn't have to deal with Phase V DECnet. ---------- Kevin G. Barkes is an independent consultant. He publishes the KGB Report newsletter, operates the www.kgbreport.com website, lurks on comp.os.vms, and can be reached at kgbarkes@gmail.com. ------------------------------------------------------------- PROGRAM 1 $ SAVE_VERIFY = 'F$VERIFY(0)' $! THUD.COM - An entertaining interactive process killer $ SAVE_MESSAGE = F$ENVIRONMENT("MESSAGE") $ SET MESSAGE/NOFACILITY/NOIDENT/NOSEVERITY/NOTEXT $ WSO := WRITE SYS$OUTPUT $ SET NOON $ ON CONTROL THEN GOTO EXIT $ IF F$PRIVILEGE("SETPRV") .OR. F$PRIVILEGE("WORLD,ALTPRI,CMKRNL") - THEN GOTO BEGIN $ WSO "%THUD-F-NOJUICE Insufficient privileges to run this." $ GOTO SIMPLE_EXIT $ BEGIN: OLDPRIV = F$SETPRV("ALTPRI,WORLD,CMKRNL") $ IF P1 .NES. "" THEN GOTO SCAN_USERS $ WSO "%THUD-F-NOPIGEONS You gotta give me someone to hit..." $ WSO " Enter a user name" $ GET_P1: INQUIRE/NOPUNC P1 "TARGET: " $ IF P1 .NES. "" THEN GOTO SCAN_USERS $ WSO "%THUD-F-YOBUTTHED I said, enter a user name!" $ GOTO GET_P1 $! The following works with V5 SHOW USER command $ SCAN_USERS: SHOW USER 'P1' /INTER/FULL/OUT=THUDLIST.TMP $ IF $SEVERITY .EQ. 1 THEN GOTO READLIST $ WSO "%THUD-F-NOSUCKERS Sorry, no ''P1' here." $ GOTO EXIT $ READLIST: SHOW USER /FULL/INTER 'P1' $ OPEN/ERROR=EXIT/READ PIGEONS THUDLIST.TMP $ READ PIGEONS RECORD $ READ PIGEONS RECORD $ READ PIGEONS RECORD $ READ PIGEONS RECORD $ READ PIGEONS RECORD $ READLOOP: READ/END=READEND/ERROR=EXIT PIGEONS RECORD $ PID = F$EXTRACT(26,8,RECORD) $ WSO "Prospective Pigeon:" $ WSO "-------------------" $ WSO "Username: "+F$GETJPI(PID,"USERNAME") $ PNAME = F$GETJPI(PID,"PRCNAM") $ WSO "Process name: ''PNAME'" $ WSO "On terminal: "+F$GETJPI(PID,"TERMINAL") $ WSO "Login time: "+F$GETJPI(PID,"LOGINTIM") $ WSO "CPU time used: ",F$GETJPI(PID,"CPUTIM") $ PROGRAM = F$GETJPI(PID,"IMAGNAME") $ IF PROGRAM .EQS. "" THEN PROGRAM = "DCL" $ WSO "Running Program: "+PROGRAM $ WSO "Process State: "+F$GETJPI(PID,"STATE") $ WSO "" $ WSO "Wanna put this turkey under surveillance (SHOW PROC/CONT)?" $ INQUIRE/NOPUNC ANS "?? " $ IF .NOT. ANS THEN GOTO MAKEHIT $ WSO "%THUD-I-LISSENUP Press """E""" or CTRL-Z when you get bored" $ ON CONTROL THEN GOTO MAKEHIT $ SHO PROCESS/CONT/ID='PID' $ MAKEHIT: ON CONTROL THEN GOTO EXIT $ INQUIRE/NOPUNC ANS "You wanna make the hit? " $ IF ANS THEN GOTO KILLER $ WUSSY: WSO "%THUD-I-WUSSY Sigh. Looking for another target..." $ GOTO READLOOP $ KILLER: WSO "%THUD-I-READY Process to kill: ''PNAME'" $ INQUIRE/NOPUNC ANS "%THUD-I-AIM Are you sure? " $ IF .NOT. ANS THEN GOTO WUSSY $ WSO "%THUD-I-FIRE Doing hit on ''PNAME'" $ STOP/ID='PID' $ WSO "%THUD-I-PAYOFF ''PNAME' now sleeps with the fishes." $ GOTO READLOOP $ READEND: WSO "%THUD-I-ALLGONE You've seen it all." $ EXIT: WSO "%THUD-I-BYEBYE THUD exiting (stage right)." $ CLOSE PIGEONS $ DELETE/NOCONFIRM/NOLOG THUDLIST.TMP;* $ EXIT_PRIV = F$SETPRV(OLDPRIV) $ SIMPLE_EXIT: SET MESSAGE 'SAVE_MESSAGE' $ EXIT_VERIFY = F$VERIFY(SAVE_VERIFY) $ EXIT