granroth%iowasp.span@SDS.SDSC.EDU (Larry Granroth 319/335-1960) (04/08/88)
I'm sure many CD commands have been written for VMS, but since seeley@dalcsug.UUCP posted a recent query about setting the DCL prompt to show the current directory, I thought I'd volunteer my own CD command procedure which also sets the prompt. It's not exactly what he asked for, but hey, it's free. GRANROTH%IOWASP.SPAN@STAR.STANFORD.EDU $ !---------------------------------------------------------------------- $ ! $ ! CD_VMS utility written by L. Granroth 02-03-87 $ ! to translate an MS-DOS CD command to a VMS SET DEFAULT. $ ! Define the following foreign command in your LOGIN.COM: $ ! $ CD :== @DISK$DAG:[GRANROTH]CD_VMS $ ! (substitute your own device and directory name above) $ ! $ !---------------------------------------------------------------------- $ if (p1 .eqs. "" ) then goto setprompt $ branch = "*" $ path = f$trnlnm (p1) $ if (path .nes. "") then goto verify $ path = p1 $ if (p1 .eqs. "..") then path = "[-]" $ if (p1 .eqs. "\" ) then path = f$trnlnm ("sys$login") $ length = f$length (path) $ if (f$locate ("[", path) .nes. length) then goto verify $ if (f$locate ("<", path) .nes. length) then goto verify $ if (f$extract (0, 2, path) .eqs. "..") then - path = "-" + f$extract (2, length-2, path) $ length = f$length (path) $ device = "" $ if (f$locate (":", path) .eqs. length) then goto xlate $ index = f$locate ("\", path) $ device = f$extract (0, index, path) $ length = length-index $ path = f$extract (index, length, path) $ xlate: $ n = 0 $ if (path .eqs. "") then goto gotvms $ vms_path = "[." $ if (f$extract (0, 1, path) .nes. "\") then goto subst $ vms_path = "[" $ length = length-1 $ path = f$extract (1, length, path) $ subst: $ part = f$element (n, "\", path) $ if (part .eqs. "\") then goto gotvms $ if (n .eq. 0) then vms_path = vms_path+part $ if (n .ne. 0) then vms_path = vms_path+"."+part $ branch = part $ n = n+1 $ goto subst $ gotvms: $ if (n .eq. 0) then path = device $ if (n .ne. 0) then path = device+vms_path+"]" $ verify: $ if (p1 .eqs. "..") then goto setdef $ index = f$locate ("]", path) $ if (index .eq. f$length (path)) then goto setdef $ dirfile = f$extract (0, index, path) + ".-]''branch'.dir" $ if (f$search (dirfile) .eqs. "") then goto badpath $ setdef: $ set def 'path' $ setprompt: $ path = f$directory () $ prompt = f$extract (1, f$length (path)-2, path) + ">" $ set prompt = "''prompt'" $ exit $ badpath: $ write sys$error "Bad path: ''p1'" $ exit
CS117151@YUSOL.BITNET ("Lifes one big continuous picture...") (05/01/88)
Greetings. Has anyone seen, heard, or possess the program described below? If you have please drop me a line. Thanx, N. Sodha CS117151@YUSOL.BITNET W A N T E D ! Zoo is an alternative archiving program to arc. Zoo and arc files are not compatible. The following is a list of advantages of zoo over arc: a) it runs portably in most systems, Xenix, MPort, Ultrix, SunOS3, unix-pc, SysV, SysIII, V7, MS-DOS, and VMS. b) Compression is good. I ran some tests with PKARC, ZOO, and DWC, concluded that there was not more than 5% between them, and that the file content determined which way the 5% went. c) speed is *very* good. I tested against PKARC and DWC and concluded that they are (again) within 5%. On UNIX it takes about 40% more CPU than piping cpio into compress (non-portable for sure), and about 16-20% of the time taken by ARC. [ I know that others have reported other figures, these are mine. ] d) ZOO handles pathnames. You can save an entire directory tree and restore it. Pathnames may optionally stripped either on storage or on extract. e) ZOO handles UNIX filenames, and does something reasonable when moved into DOS. f) ZOO preserves date and time modified. g) ZOO will accept a files list from stdin. h) ZOO will give me a short form columnar files listing that doesn't scroll off my screen. i) ZOO will delete files after I archive them, but not as they are are added. This means the originals are untouched until the archive file is closed. j) ZOO will optionally add only newer versions of files in the archive. I can update using *.* and avoid typing the names of all files to be updated. k) ZOO will optionally add only files which are not in the archive. This protects against overwriting existing files. l) ZOO saves older versions of files and deleted files until you choose to pack the archive. These older versions can be recovered. m) ZOO has both expert and novice modes. The novice mode is very like arc in structure, and reduces learning time for current arc users. n) ZOO allows me to put multiline comments on each file. This is often enough to eliminate the need for a readme file, and is useful when a program creates many data file with similar names. [ zoo also has comments on the archive as a whole, and that comment may be displayed without see ing the file comments. ] o) ZOO has been "rock solid reliable" for me. I like using software that doesn't give me learning opportunities. p) ZOO has VMS-like versions, so I can keep a number of versions of the programs in a single archive.