🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.tpu
Article #56

NOTES$COMMAND.TPU ???

#56
From: J.Lance Wilkinson, 814-865-1818
Date: Mon, 28 Sep 1992 13:21
66 lines
3441 bytes
I'm extending a NOTES$COMMAND.TPU file secured from the supplier of the BBOARD
software, St.Peter's College.  I've taken the command sequence used there to
print a range of NOTES from within VAX Notes to a locally-connected printer,
and am trying to build a version of the command which extracts to a file for
downloading to a PC or MAC.  Everything works fine:

! Extract a (range of) notes to file

procedure local_extract
  local print_range;
  local extract_file;
on_error
endon_error;
if notes$x_notefile_ctx = "" then
  message ("You are not currently in a conference");
  return;
endif;
print_range := read_line("Enter range of notes to extract: ");
if length(print_range) = 0
  then
    if last_key = ctrl_z_key
      then
        return
      else
        print_range := "."
    endif
endif;
extract_file := read_line("Enter filename for extraction: ");
if length(extract_file) = 0
  then
    if last_key = ctrl_z_key
      then
        return
      else
        extract_file := "sys$login:notes_extract.tmp"
    endif
endif;
message ("Extracting to file " + extract_file + "...");
update(ALL);
notes$do_command("extract " + extract_file + " " + print_range);
endprocedure
define_key('local_extract', key_name('x', shift_key), "Extract to file",
  notes$kt_user_keys);

But now I'd like to extend it to determine if the filename specified already
exists.  If so, I want to give the option of
        (1) appending to the file,
        (2) creating a new generation of the file, or
        (3) backing up and choosing a different filename

Is there a builtin eve or tpu function that I can use to check to see if the
filename named in the "extract_file" variable already exists?  If not, being a
total novice at this kind of thing, does anybody have any suggested code
fragments?  I'm not looking to become a TPU/EVE programmer...my boss would not
approve of the time required ;-)

+-"Never Underestimate the bandwidth of a station wagon full of mag tapes"--+
| J.Lance Wilkinson ("Lance")            BitNet:    JLW@PSULIAS.BITNET      |
| Systems Design Specialist - Lead       InterNet:  JLW@PSULIAS.PSU.EDU     |
| Library Computing Services             AT&T:      (814) 865-1818          |
| E8 Pattee Library                      "I'd rather be dancing..."         |
| Penn State University         A host is a host from coast to coast,       |
| University Park, PA 16802     And no one will talk to a host that's close |
| <POSTMAST@PSULIAS.BITNET>     Unless the host that isn't close            |
| <POSTMAST@PSUCES.BITNET>      Is busy, hung or dead.                      |
+------"He's dead, Jim. I'll get his tricorder. You take his wallet."-------+
Technical Details
Message-ID: <01GPB7U1AKG4ANBGO3@psulias.bitnet>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!moe.ksu.ksu.edu!mccall!info-tpu-newsgate!list

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!moe.ksu.ksu.edu!mccall!info-tpu-newsgate!list
From: jlw%psulias.bitnet@shsu.edu (J.Lance Wilkinson, 814-865-1818)
Newsgroups: vmsnet.tpu
Subject: NOTES$COMMAND.TPU ???
Message-ID: <01GPB7U1AKG4ANBGO3@psulias.bitnet>
Date: 28 Sep 92 13:21:00 GMT
Reply-To: "J.Lance Wilkinson, 814-865-1818" <JLW%PSULIAS.BITNET@SHSU.edu>
Organization: The Internet
Lines: 66
Return-Path: <TPU-Mgr@SHSU.edu>
Errors-To: TPU-Mgr@SHSU.edu
X-Listname: Text Processing Utility (TPU) Language Discussion List
X-Organization: Penn State University / University Libraries
X-Envelope-To: INFO-TPU@SHSU.BITNET
X-Vms-To: in%"INFO-TPU@SHSU"
X-Vms-Cc: JLW