From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,e6262f02d713541c X-Google-Attributes: gid1164f8,public From: leonard@craw.tgv.com (Aaron Leonard) Subject: Re: VMS help needed Date: 1996/01/20 Message-ID: <4dref2$ahm@news.ccit.arizona.edu>#1/1 X-Deja-AN: 136052872 distribution: world sender: leonard@Not-Craw--Craw.TGV.COM (Aaron Leonard) references: organization: TGV, Inc., or just me at home reply-to: Leonard@Craw.TGV.COM newsgroups: comp.sys.dec In article , 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