Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!caip!nike!ucbcad!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU.UUCP Newsgroups: mod.computers.vax Subject: Re: dump listings Message-ID: <860713060733.03h@CitHex.Caltech.Edu> Date: Sun, 13-Jul-86 09:08:08 EDT Article-I.D.: CitHex.860713060733.03h Posted: Sun Jul 13 09:08:08 1986 Date-Received: Sun, 13-Jul-86 20:26:35 EDT References: <[MX.LCS.MIT.EDU].932387.860710.KFL> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 46 Approved: info-vax@sri-kl.arpa > From: CCFD8%UK.AC.SUSSEX.VAX2@ac.uk > > how DO you get 80 col. Dump listings in a file? > Brian William You can do so using mailboxes. If you don't have the PRMMBX priv, creating a mailbox that stays around long enough to be useful with DCL commands can be a little tricky, but the following works well for me: ------------------------------------------------------------------------------ /* crembx.c -- Create a temporary mailbox then wait 10 seconds * First argument, if any, is mailbox size */ #include main(nargs, args) int nargs; char **args; { long chan; long len = 80; $DESCRIPTOR(devname, "MAILBOX"); if (--nargs > 0) len = atol(*++args); SYS$CREMBX(0, &chan, len, 0, 0, 0, &devname); sleep(10); } ------------------------------------------------------------------------------ $! crembx.com -- make a 'permanent' temporary mailbox $ crembx:==$$users:[carl]crembx $ spawn/nowait crembx 80 $ wait 0:0:5.0 $ open/read/write/share=write pipe mailbox: ------------------------------------------------------------------------------ The .COM file spawns a subprocess running CREMBX.EXE, created by compiling and linking the C program. This program creates a temporary mailbox with the logical name MAILBOX in the process logical name table, then sleeps for 10 seconds. The parent process, after spawning, sleeps for 5 seconds, then opens a channel to the mailbox. When the subprocess wakes up and dies, it deassigns its channel to the mailbox, but since we've got another open, the temporary mailbox doesn't go away. Now you can get dump to do 80-column output to a file with the commands: $ SPAWN/NOWAIT/OUTPUT=PIPE: DUMP filename $ COPY PIPE: filename.dmp My use of the logical name PIPE is due to the fact that I originally wrote the program for creating 'permanent' temporary mailboxes so that I could have a reasonable approximation of UNIX pipes under VMS without the CSHELL; the DUMP application was completely fortuitous.