diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/dataio/reblock/reblock.hlp | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/dataio/reblock/reblock.hlp')
-rw-r--r-- | pkg/dataio/reblock/reblock.hlp | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/pkg/dataio/reblock/reblock.hlp b/pkg/dataio/reblock/reblock.hlp new file mode 100644 index 00000000..465314be --- /dev/null +++ b/pkg/dataio/reblock/reblock.hlp @@ -0,0 +1,154 @@ +.help reblock Mar84 dataio +.ih +NAME +reblock -- copy a file on tape or disk with optional reblocking +.ih +USAGE +reblock (infiles, outfiles, file_list) +.ih +PARAMETERS +.ls infiles +File or device name e.g. "mta1600[2]" or "mta800" or "file1". +.le +.ls outfiles +If multiple file to disk is requested, the ouput file names will be generated +by concatenating the tape file number onto the output file name. +.le +.ls file_list +List of tape file numbers or ranges delimited by whitespace or commas, +e.g. "1-3, 5_8". +File_list is requested only if the magtape input device is specified. +Files will be read in ascending order regardless of the ordering of the list. +Reading will terminate silently if EOT is reached, thus a list such as +"1-999" may be used to read all files on the tape. +.le +.ls newtape +If the output device is magtape, newtape specifies whether the tape is +blank or contains data. +Newtape is requested only if no tape file number is specified, e.g. "mta1600". +.le +.ls outblock = INDEF +Size of the output block bytes. +In the default case and for disk output, the output block size is set to the +file i/o disk default buffer size. +.le +.ls inrecord = INDEF, outrecord = INDEF +The sizes of the input and output logical records in bytes. +The default input and output record sizes are set equal to +the input and output block sizes respectively. If inrecord > outrecord, +records are trimmed; if inrecord < outrecord, records are padded; if +inrecord = outrecord, records are simply counted. If only one of inrecord or +outrecord is set, the undefined parameter defaults to the value of the +other. +.le +.ls nskip = 0 +The number of input blocks (tape input) or records (disk input, size inrecord) +to be skipped. +.le +.ls ncopy = INDEF +The number of input blocks (tape input) or records +(disk input, size inrecord) to be copied. Ncopy defaults to a very large number. +.le +.ls byteswap = no +Swap every other byte. +.le +.ls wordswap = no +Swap every other word. +.le +.ls pad_block = no +If pad_block is set, reblock pads trailing blocks until they are outblock +bytes long, otherwise trailing blocks may be short. +.le +.ls padchar = 0 +Single character used to pad blocks or records. +Padchar is only requested if pad_record or pad_block +is set. If padchar equals one of the digits 0 through nine, records and +blocks are padded with the face value of the character, otherwise the +ASCII value is used. +.le +.ls verbose = yes +Print messages about files, blocks copied etc. +.le +.ih +DESCRIPTION + +REBLOCK is a procedure to copy disk or tape resident files to +disk or tape. Multiple tape files or a single disk input file may be specified. +If multiple files are output to disk the output file names will be +generated by concatenating the tape file number onto the output file name. +The user may request magnetic tape output to begin at a specific file on +tape, e.g. mta1600[5] in which case file five will be overwritten if it +exists, or at BOT or EOT. If no file number is specified REBLOCK asks +whether the tape is new or old and begin writing at BOT or EOT as +appropriate. + +Before beginning the copy, the user may request reblock to skip +n (default 0) blocks (tape input) or logical records (disk input). +The user can also specify that +only n (default all) blocks (tape input) or records (disk input) +are to be copied. Before the copy the data may be optionally word-swapped +(default no) and/or byte-swapped (default no). If verbose is specified +(default yes) reblock prints the input and output file names, +the number of blocks read and written and the number of records read and +written. + +Reblock +uses the default buffer sizes supplied by mtio and file i/o to determine the +maximum number of bytes which can be read in a single read call. For tapes +this corresponds to the maximum number of bytes per block permitted by the +device. Mtio will not read more than one block per read call. Therefore the +actual number of bytes read will be less than or equal to the mtio buffer size. +For disk files the default buffer size set by IRAF is a multiple of the +disk block size. If the disk file is smaller than one block +or the last block is partially full, the number of bytes read +will be less than the default buffer size. All magtape and disk reads are +done with the file i/o read procedure and a call to fstati determines the number +of bytes actually read. + +If all the defaults are set, a binary copy is performed. +In tape to tape copies the block and record sizes are preserved, +but the density may +be changed by specifying the appropriate output file name e.g. mta800 or +mta1600. +Reblocking occurs in tape to disk transfers, if records, are trimmed, +padded or counted, or if blocks are padded. +If a disk to tape transfer is requested +the output block size will be the default file i/o buffer size. +The last block in a file may be short. If uniform sized blocks are +desired, pad_block must be set, in which case trailing partially filled +blocks will be padded with padchar. + +Logical records are distinguished from blocks (physical records). +The input and output record sizes default to +the size of the input and output blocks respectively. +Logical records may be shorter or longer than the block sizes. +.ih +EXAMPLES + +Copy a magnetic tape preserving the record sizes but changing +the density from 800 bpi to 1600 bpi. + +.nf + da> reblock mtb800, "mta1600[1]", "1-999" +.fi + +Reblock a magnetic tape changing the block size from 4000 bytes to 8000 +bytes and padding the last block. + +.nf + da> reblock mtb1600, "mta1600[1]", "1-999", outb=8000, padb+ +.fi + +Trim the records of a disk file. + +.nf + da> reblock input, output, inrec=80, outrec=72 +.fi + +Pad the records of a disk file with blanks. + +.nf + da> reblock input, output, inrec=81, outrec=82, padchar=" " +.fi + +.endhelp |