LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Eric Thomas <[log in to unmask]>
Tue, 24 Jul 90 00:46:29 O
text/plain (80 lines)
In order  to save myself (and  a number of filelist  maintainers) time, I
have written a DCL program to  assist VMS people in storing usable binary
VMS files on  LISTSERV without the intervention of a  "friendly" IBM user
to  receive/edit/update the  file. The  program probably  uses the  worst
possible methods  to do  that, but  it gets the  work done,  and anything
beyond that is left as an exercise to the reader; I am actually sure that
within a couple hours, someone will come up with an improved version that
will have  a much more  VMSier "feel", will  run faster and  will produce
less junk terminal output.  I just wanted to prove that  it could be done
entirely  from VMS,  without access  to  the description  of the  VMSDUMP
format.
 
  Eric
 
(Note: you might have a couple line breaks to remove before it runs ok)
$!
$! This DCL script, written by someone whose knowledge of DCL and VMS is
$! slightly inferior to the average Unixer's knowledge of the syntax of
$! the WTO macro, will send a PUT command to the LISTSERV of your choice
$! using VMSDUMP format. Let's say you have a binary file called TEST.EXE
$! and you want to store it on LISTSERV@FOO in such a way that other VMSers
$! can not only retrieve it but also successfully run it. All you have to do
$! is type '@PUTVMS TEST EXE FOO' (note that it's TEST<blank>EXE not TEST.EXE!).
$! You will then be prompted for your password, unless you have already
$! DEFINEd it as 'LISTSERV_Password' (note that the password will be displayed
$! as you type it because the author couldn't find the value of f$equiv("","VM",
$! "DVHUTL/RDI"), and you won't be warned because the author doesn't know how
$! to code a do..end in DCL and is confident that knowledgeable users will be
$! able to fix these little problems in a hundredth of the time it would take
$! him to do so).
$!
$! Anyway, once you have supplied your password, a file will be built
$! containing a 'PUT TEST EXE RECFM=F LRECL=80 PW=password' command in EBCDIC
$! in the first record and the result of the VMSDUMP-encoding of TEST.EXE in
$! the following records; the thing is then shipped to LISTSERV (in binary
$! format), which will see an intelligible PUT command followed by binary
$! junk, which it will happily store 'as is' without trying to understand
$! what you are trying to do. If that file is retrieved with a '$ SEND
$! LISTSERV@FOO GET TEST EXE F=PUNCH', it will appear in your RECEIVE list
$! as a VMSDUMP file which JNET will be glad to convert to a clean, usable
$! VMS file (which would not be the case if you had stored it using
$! SEND/FILE/NETDATA, with or without /BINARY, as this does not preserve
$! the file structure, at least not for .EXE files).
$!
$! If you are not happy with this program, you are happy to improve it and
$! send the modified version (in /NETDATA/TRANSLATE format) to [log in to unmask]
$! Your comments are welcome as long as you send in a better version of the
$! program; if all you want to do is complain without proposing any
$! constructive change, you are strongly advised to direct the complaint in
$! question to your local government representative, requesting that the
$! inalienable right of programming in DCL be included in the next edition
$! of the Constitution.
$!
$ if p1 .eqs. "" then $ inquire p1 "Enter the filename (CR to cancel)"
$ if p1 .eqs. "" then $ exit
$ if p2 .eqs. "" then $ inquire p2 "Enter the filetype (CR to cancel)"
$ if p2 .eqs. "" then $ exit
$!
$ myuserid = f$getjpi("","username")
$ mynodeid = f$logical("JAN_Local_Node")
$ mypasswd = f$logical("LISTSERV_Password")
$ if mypasswd .eqs. "" then $ inquire mypasswd "Enter the password to be used"
$!
$ open/write prolog prolog.tmp
$ write prolog "PUT ",p1," ",p2," RECFM=F LRECL=80 PW=",mypasswd
$ close prolog
$ send/file/punch prolog.tmp 'mynodeid' 'myuserid'
$ del prolog.tmp;
$ receive/binary prolog.tmp
$!
$ send/file/vmsdump/name=vmsdata.tmp 'p1'.'p2' 'mynodeid' 'myuserid'
$ receive/binary/nospecial vmsdata.tmp vmsdata.tmp
$ convert vmsdata.tmp prolog.tmp/append
$ delete vmsdata.tmp;
$!
$ if p3 .eqs. "" then $ inquire p3 "Enter the nodeid of the destination
LISTSERV"
$ send/file/binary prolog.tmp 'p3' listserv
$ delete prolog.tmp;

ATOM RSS1 RSS2