home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!utcsri!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!sobeco!szweep
- From: szweep@sobeco.com (Steve Zweep)
- Subject: Variable length records to tape
- Organization: Sobeco Ernst & Young
- Distribution: na
- Date: Mon, 4 Jan 93 22:48:31 GMT
- Message-ID: <1993Jan4.224831.5366@sobeco.com>
- Keywords: VMS VARIABLE LENGTH PHYSICAL RECORDS FOREIGN SYSTEM
- Lines: 27
-
- Can someone tell me how to write variable length physical blocks to tape
- with VMS, so that the tape can be read again on a foreign system?
-
- In better detail:
-
- If my file has record format "Variable length, maximum 2048 bytes", and I
- have a record that is 2100 bytes, then I need the first 2048 bytes written
- in one physical block and the next 52 bytes written in the next physical
- block, immediately followed by a physical end-of-block. No leading size-
- of-block info, no trailing filler to complete 2048 bytes; just my data and
- physical end-of-block markers. On disk, my file is stored just as I want
- it: logical blocks are headed by 2 bytes to indicate their size, but
- these 2 bytes are not included in that size -- just my data. I need VMS
- to write this file to tape using these 2 bytes to determine how long to
- make the physical block, with no extraneous overhead. The size of the
- physical block would tell the system reading the tape how long the logical
- block is. VMS will *read* a file this way, but when I use COPY to write
- one to tape and use "dd" to read it back on a UNIX system, each logical
- block is headed by it's size, and this header takes physical space in the
- block. The last block in a record is padded to fill 2048 bytes.
-
- Thanks,
-
- - Andy Marchewka
- --
- Andy Marchewka, A.Marchewka@sobeco.com
- multiLIS Group, Sobeco Ernst and Young
-