Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: leonard@craw.tgv.com (Aaron Leonard)
Subject: Re: VMS help needed
Date: 1996/01/20	[thread overview]
Message-ID: <4dref2$ahm@news.ccit.arizona.edu> (raw)
In-Reply-To: DLCy16.Dw3@freenet.carleton.ca


In article <DLCy16.Dw3@freenet.carleton.ca>, af877@FreeNet.Carleton.CA (Harry Dodsworth) writes:
|
|
|   I'm new to VMS and have what seems to be a simple problem that
|I can't solve.
|
|  I have variable length records, 461 bytes long that I want to
|print. The PRINT command prints 132 characters and the rest is
|lost.
|  When I display them on the screen with a TYPE command, they
|wrap fine. I used TYPE and saved them to a file but the system
|was smart enough to know they were 461 byte records so no print!
|
|  So how do you print all of records longer than 132 characters?

Sounds like you just need to write a little program to wrap your
records.  You could do this in DCL or TPU or C or whatever you
have & are handy with.  (See DCL below for an example.)

|One of them displays with part of the record offset by five bytes;
|I think it might have a TAB or similar control character in a
|character field; how do I display a record in hexadecimal so I can
|see what is really there?

$ DUMP/RECORD 
should do the trick.  See HELP DUMP for the various options.

Regards,

Aaron

Aaron Leonard           MultiNet-VMS@Support.TGV.COM [ work ]        
                        Leonard@Leonard.Tucson.AZ.US [ home ]

---

$! wrap.com
$!   wrap file at some right margin
$!    usage: @wrap reclength infile outfile
$! Note: not sure of the actual maximum record length this can handle
$!
$ reclength = f$integer(p1)
$ if reclength .le. 0 .or. reclength .gt. 1023
$ then
$   inquire/nopunct reclength "reclength [1 - 1023]: "
$ endif
$ infile = p2
$ if infile .eqs. "" then $ inquire infile
$ outfile = p3
$ if outfile .eqs. "" then $ inquire outfile
$ open /read/error=errexit inf 'infile'
$ open /write/error=errexit outf 'outfile'
$readloop:
$ read /error=errexit /end=readall inf inrec
$ inreclen = f$length(inrec)
$ pos = 0
$writeloop:
$ write outf f$extr(pos, reclength, inrec)
$ if pos+reclength .ge. inreclen then $ goto readloop
$ pos = pos + reclength
$ goto writeloop
$readall:
$ close outf
$ close inf
$ exit 1
$errexit:
$ sts = $status
$ close/nolog outf
$ close/nolog inf
$ write sys$error "file error"
$ exit sts



      parent reply	other threads:[~1996-01-20  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-01-18  5:00 VMS help needed Harry Dodsworth
1996-01-18  5:00 ` Brian Tillman
1996-01-18  5:00 ` oberman
1996-01-18  5:00 ` Excellence is an attitude
1996-01-20  5:00 ` Aaron Leonard [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox