TAPEjobs - LIST, COPY,& WRITE 9 track tapes - CONTENTS

note
  • these jobs can save you thousands of dollars vs purchasing
    a software package to process 9 track tapes on UNIX.
A1. 9 track standard labelled tape format
A2.  tape transfer restrictions (17 char filenames, special characters)
A3.  tape drive types & buffer size options
B1. t9list1 - investigate any kind of tape, labelled or unlabelled
- option to translate EBCDIC to ASCII
- displays block#, block size,& 1st 60 bytes of each data block
- always tries to read 32768 knowing that unbuffered reads
  will stop at the interblock gap
B2. t9list2 - investigate EBCDIC standard labelled 9 track tapes
  expects: VOL1,HDR1,HDR2,TM,..data..,TM,EOF1,EOF2,TM,--etc--
- displays the labels & optionally the 1st 64 of each data block
B3. t9list3 - list STANDARD LABELLED 9 track mag tape
- creates a report file for listing on laser or line printer
- lists records in 100 byte segments if rcsz > 100
- options to print 1st so many blocks or records
B4. t9list4 - list UNLABELLED 9 track mag tape
- creates a report file for listing on laser or line printer
- options to specify block size & record size if known
C1. t9copy1 - copy 1st file from std lbl tape (allows multi-volumes)
- includes the same options as for t9copy2 (see below)
Note - t9copy2 recommended for all std lbl copies (single/multi file)
C2. t9copy1u- copy unlabelled 9 track tape file(s) to disc
- options to translate EBCDIC to ASCII
- displays 1st 64 bytes of 1st block & prompts for out filename
C3. t9copy2 - copy all files from a multi-file std lbl tape to a directory
- options to display labels & 1st 64 bytes of data blocks
- options to translate EBCDIC to ASCII or not, or conditional
  translate to ASCII if no packed or binary data is found.
- default option is no translate (which would require following
  separate translate jobs depending on record layouts)
        NOTE - This is the best job to read std lbl'd tapes even if only 1
               file because it writes files to output directory using the
               HDR1 filename on the tape (you dont have to know whats there)
 C3a. t9copy2m - Alternate version of t9copy2 (March 1998)
             - For problem with some tape drives or operating systems
               that report a full block for the last block in the file
               (which is usually part full especially for mainframe data
                transfer using blocksizes near 32,000)

Goto:   Begin this document End this document UVSI Home-Page

TAPEjobs - LIST, COPY,& WRITE 9 track tapes - CONTENTS continued

C4. t9copy3 - interactive copy files from EBCDIC standard labelled tape
- displays each HDR1 label & prompts for copy/bypass y/n ?
Note - t9copy2 recommended for all std lbl tape retrieval
- copy into a tmp directory & then extract desired files
D1. t9write1 - write 1 file to std lbl 9 track tape (allows multi-volumes)
  to send files to outside agencies requiring std lbls
- options for rcsz/blksz, translate to EBCDIC/UPPER case
Aug00 - enhanced to display existing labels, before overwrite
- test tape status & prompt tp put online (bombs if not online)
- At end each volume, prompts to mount next volume
- display record & block counts for each volume & in total
D2. t9write2 - write multi-part files to std lbl tapes (allow multi-volumes)
- multi-part files are same data, spread over multi-files
  maybe because too big for 1 file
- Before running the job, you must pre-edit a file with the
  filenames of the multi-parts (max 100 filenames).
- maybe relative or full path or any combination
Aug00 - same enhancements as t9write1 above
D3. t9write3 - write multiple files to standard labelled 9 track tape
- guided by a control file that contains the filenames
  of the files to be written & the desired record size,
  block size,& options to translate to UPPER &/or EBCDIC
D4. t9write1u- write 1 file to unlabelled 9 track tape
- options for rcsz/blksz, translate to EBCDIC/UPPER case

The 9 track read/write jobs discussed so far are General-Purpose jobs, which can process any 9 track tape, but which require keyins for the filename, blocksize, translate options, etc.

The EBCDIC/ASCII translate option usually defaults to OFF, since the tape might have packed or binary fields requiring selective translate of just the character portions of each record.

For packed/binary fields, you would then need an additional customized job to perform these selective translates, either before the general purpose t9write job or after the t9copy job.

If you have this need on a recurring basis, you might want to combine the customized translates with the 9 track read/write job, to automate the process & eliminate the keyins required for the general purpose jobs.

E1. t9writeA - customized demo version of t9write1
- to write the uvadm/dat1/custmas file to 9 track tape
- 256 byte records, packed fields in columns 121-240
- will write standard labelled tape with blocksize 8192
  translating each record to EBCDIC (except for packed fields).
E2. t9copyA - customized demo version of t9copy1
- to read the standard labelled tape written by t9writeA
- translating each record to ASCII (except for packed fields).

Goto:   Begin this document End this document UVSI Home-Page

TAPEjobs - LIST, COPY,& WRITE 9 track tapes - CONTENTS continued

more customized tape I/O & translate jobs

F1. Translating to ASCII, reformatting records, loading indexed files, etc
G1. Correcting signs in zoned numeric fields translated from EBCDIC
H1. IBMtape1 - job to convert EBCDIC standard labelled tapes to ASCII
  to replace mainframe DATA utilities or front-end cobol
  programs that formerly read the tape directly.
  This job is still required on UNIX for EBCDIC tapes from
  outside sources, such as IBM mainframes.
I1. IBMvarfix1 - job required when for tapes with variable length records.
  follows the IBMtape1 job to strip out the variable length
  prefixes converting the file to fixed length records.
  option to translate to ASCII, but this cannot be done yet
  if any packed fields are present.
J1. IBMtranfix1 - this is an example of a follow on custom job
  to translate a particular record layout to ASCII.
K1. listings of the uvcopy jobs documented in this section
  (t9list1, t9copy2, t9write1, t9writeA, t9copyA)
- Not all jobs are listed, but all jobs are in the uvadm/pf directory

Tape Drives

If you need a 9 track or 3480 cartridge tape drive for your unix/linux system, I recommend Remax Electronics 612-890-9080 (ask for Meg O'Donnel).

Goto:   Begin this document End this document UVSI Home-Page

A1. standard labelled multi-file tape volume formats

The following illustrates the format of a standard labelled multi-file tape volume (used to transfer data files from mainframes to UNIX). This file (tf3/t9test1) was used to test the 't9copy2' job before I had a 9 track tape drive available. The tf3/t9test1 file is ASCII & is translated to EBCDIC by the 't9make3' job whose output is named 'tf3/t9test3' which is then input to the 't9copy2' job. 't9copy2' has an option to translate data to ASCII if no packed fields are detected. Files with packed fields are left in EBCDIC & must later be translated depending on the record layout. See later examples of using uvcp or uvcopy to translate only the non-packed record portions.

 VOL1 t9test1 - file to simulate 9 track tape (see tf3/t9test3 in EBCDIC)     ...
 HDR1t9testfile1         - file#1 filename in bytes 4-20                      ...
 HDR2F0008000020          - blocksize=80, recordsize=20 (blocked 4)           ...
 TM                                                                           ...
 dataf01b01r01       dataf01b01r02       dataf01b01r03       dataf01b01r04    ...
 dataf01b02r01       dataf01b02r02       dataf01b02r03       dataf01b02r04    ...
 TM                                                                           ...
 EOF1                                                                         ...
 EOF2                                                                         ...
 TM                                                                           ...
 HDR1t9testfile2         - file#2                                            ...
 HDR2F0008000040          - blocksize=80, recordsize=40 (blocked 2)           ...
 TM                                                                           ...
 dataf02b01r01                           dataf02b01r02                        ...
 dataf02b02r01                           dataf02b02r02                        ...
 dataf02b03r01                           dataf02b03r02                        ...
 dataf02b04r01                           dataf02b04r02                        ...
 TM                                                                           ...
 EOF1                                                                         ...
 EOF2                                                                         ...
 TM                                                                           ...
 HDR1t9testfile3         - file#3                                            ...
 HDR2F0008000080          - blocksize=80, recordsize=80 (unblocked)           ...
 TM                                                                           ...
 dataf03b01r01                                                                ...
 dataf03b02r01                                                                ...
 dataf03b03r01                                                                ...
 dataf03b04r01                                                                ...
 dataf03b05r01                                                                ...
 dataf03b06r01                                                                ...
 TM                                                                           ...
 EOF1                                                                         ...
 EOF2                                                                         ...
 TM                                                                           ...
 TM                                                                           ...
note
  • the 'TM' records represent tapemarks to test these jobs without
    having a 9 track tape drive available.
  • specify the input file as tf3/t9test3 (vs a 9 track tape device)
    & also specify the 't1' test option.

Goto:   Begin this document End this document UVSI Home-Page

A2. standard label tape restrictions: 17 char filenames, special chars

The 't9copy2' job used to restore data files into UNIX directories will truncate filenames to 17 characters, because standard labelled tapes only allow 17 character filenames.

The TIP/ix 'fcsload' utility can be used for longer filenames, but fcsload requires exact copybooks and you must create a 'grammar' file to specify the filenames in the exact sequence of your multifile tape.

If you do not have a lot of long filenames that would create duplicates when truncated, it may be easier to use t9copy2, which does not require copybooks or grammar files.

You will then require manual changes to correct any duplicate filenames caused by truncation. Note that t9copy2 will stop with an 'overwrite ?' query if it finds a duplicate filename.

You should make note of these and subsequently use t9copy1 or t9copy3 to re-select any overwritten duplicates from the tape into an alternate directory, from which they can be renamed into the desired data directory.

changing truncated filenames to desired alternatives

If you wish to change a lot of filenames, for any reason - duplicate or aesthetic, you can change them automatically by making up 2 column tables of old & new filenames.

See section JCLfix.doc for jobs 'frename' & 'rep2d' examples. Rep2d will change all filename references in your converted scripts, and frename will convert the physical filenames in your directories. Frename could be done manually using 'mv' commands, but frename will use the same table of old & new filenames already prepared for rep2d.

special characters in mainframe filenames

t9copy1,t9copy2,& t9copy3 have options to convert special characters in the filenames to underscores. '*' '$' '/' & '.' may be converted.

Goto:   Begin this document End this document UVSI Home-Page

A3. tape drive types & option 'b' for 9 track list & copy jobs

There are 2 types of drives, (described here as the 2145-02 & 2145-03) which are the UNISYS types, but other manufacturers behave like one or the other of these two. These jobs have been tested OK on various UNIX boxes with various tape drives.

   2145-02 - always stops reading at the inter-block gap regardless of
             the size specified on the read command.
   2145-03 - buffered reading does not stop at inter-block gap when the
             read size is greater than block size
           - will combine blocks to make up the read size
   JUNE 94 - option 'u' implemented for unbuffered reading
           - specified on the file typ (typ=RSFu)
           - uses UNIX open/read/close vs fopen/fread/fclose
           - unbuffered reads on 9 track tapes will stop at the gap
             regardless of the block size on the read request
           - solves the problem of being unable to read 9 track tapes
             unless they are standard lablled or you know the block size
  HP 7980S - The Hewlett Packard 7980S is the tape drive that I recommend
           - You can get a used HP7980S for $2100 ($18,000 new) from:
             REMAX Electronics, 1340 East 115th St, Burnsville MN 55337
             612-890-9080 Meg O'Donnell
        option 'b' to specify block size on the 9 track tape jobs
        ---------------------------------------------------------

For standard labelled tape jobs, the labels (VOL1,HDR1,HDR2,EOF1,EOF2) are known to be 80 bytes & these jobs will read them as 80 bytes

option b0
  • *default* will use the block size from the HDR2 label
    to read the data blocks
  • will work for std lbld tapes on either type of tape drive
    for fixed blocks (& probably for variable too)
option b32768
  • is the maximum block size for 9 track tape
  • could be used for all tape reads as long as the job
    specifies opton 'u' for unbuffered reading
    (as do the jobs above)

Goto:   Begin this document End this document UVSI Home-Page

B1. t9list1 - investigate any 9 track tape labelled or unlabelled


 uvcopy t9list1,fili1=?/dev/rmt/nrtape2
 ======================================
 uop=a1b32768p10   - option defaults
     a1            - translate EBCDIC to ASCII (a0 inhibits)
       b32768      - block size to read (will display 1st 60 bytes)
       b400        - specify actual bksz if known ?
       b2000       - specify whatever value you wish to display sample
             p10   - pause after every 10 blocks, continue on enter
 User OPtion (uop) defaults  = q1a1b32768p10
  null to accept or re-specify (1 or more) --> b400 <-- enter BLOCKSIZE

 #0001 (00240) 1st60=VOL1123456                              UV SOFTWARE INC.
 EOF fili1 1 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK - enter to continue              -->       <-- null to continue

 #0003 (00400) 1st60=0001 TF/TEST100 ONE                     0002 TF/TEST100 TW
 #0004 (00400) 1st60=0011 TF/TEST100 ELEVEN                  0012 TF/TEST100 TW
 #0005 (00400) 1st60=0021 TF/TEST100 TWENTY ONE              0022 TF/TEST100 TW
 #0006 (00400) 1st60=0031 TF/TEST100 THIRTY ONE              0032 TF/TEST100 TH
 #0007 (00400) 1st60=0041 TF/TEST100 FORTY ONE               0042 TF/TEST100 FO
 #0008 (00400) 1st60=0051 TF/TEST100 FIFTY ONE               0052 TF/TEST100 FI
 #0009 (00400) 1st60=0061 TF/TEST100 SIXTY ONE               0062 TF/TEST100 SI
 #0010 (00400) 1st60=0071 TF/TEST100 SEVENTY ONE             0072 TF/TEST100 SE
 #0011 (00400) 1st60=0081 TF/TEST100 EIGHTY ONE              0082 TF/TEST100 EI
 #0012 (00400) 1st60=0091 TF/TEST100 NINETY ONE              0092 TF/TEST100 NI
 EOF fili1 10 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK - enter to continue              -->       <-- null to continue
 #0014 (00160) 1st60=EOF1TAPEHDR1LABEL    12345600010001000101 98100 9810000000
 EOF fili1 1 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK - enter to continue              -->       <-- null to continue
 EOF fili1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK, 2nd successive - enter q=quit, null=continue
                                           --> q     <-- q to quit
Note
  • The block-size was known to be 400 & was entered at the prompt
  • t9list displays 1st 60 bytes at the block-size interval, which
    actually does not have to match the physical block-size.
  • You can use the block-size as an interval sample size, but it
    should be a multiple of record-size or you might display 60 bytes
    from the middle of a record.

Goto:   Begin this document End this document UVSI Home-Page

B2. t9list2 job display multifile labels (optionally 1st 64 of data)

't9list2' will read thru a standard labelled multi-file tape & display all labels (VOL1,HDR1,HDR2,EOF1,EOF2) & optionally the 1st 64 bytes of each data block. The job also counts blocks & calculates total file size & displays errmsg if the count not equal to block count in EOF1 label.


 uvcopy t9list2,fili1=/dev/rmt/nrtape2
 =====================================
  uop=b0d2s08   - option defaults
      b0        - (default) will use data block size from HDR2 label
      b32768    - max 32768 (see discussion in TAPEjobs.doc
        d0      - do not display lbls (VOL,HDR,EOF), just EOF counts
        d1      - display labels (VOL,HDR,EOF) & EOF counts
        d2      - (default) display lbls, 1st 64 of blocks,& EOF counts
          s08   - (default) stop after every 8 data block displays
 User OPtion (uop) defaults  = q1b0d2s08
  null to accept or re-specify (1 or more) -->    <-- accept defaults
 VOL1UVSOFT                              UV SOFTWARE INC.
 HDR1TEST100          UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0080000040
 EOF fili1 3 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 #00001 1st64=0001 TF/TEST100 ONE                    .0002 TF/TEST100 TWO
 #00002 1st64=0021 TF/TEST100 TWENTY ONE             .0022 TF/TEST100 TWENTY T
 #00003 1st64=0041 TF/TEST100 FORTY ONE              .0042 TF/TEST100 FORTY TW
 #00004 1st64=0061 TF/TEST100 SIXTY ONE              .0062 TF/TEST100 SIXTY TW
 #00005 1st64=0081 TF/TEST100 EIGHTY ONE             .0082 TF/TEST100 EIGHTY T
 EOF fili1 5 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
      00800 BKSZ *       5 BLKS =      4,000 BYTES
 EOF1TEST100          UVSOFT00010001000101 98099 980990000005UNIXSCO
 EOF2F0080000040
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 HDR1CUSTMAS1         UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0256000256
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 #00001 1st64=130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
 #00002 1st64=157352  D WHYTE, W.                1150 LODGE ROAD          NORT
 #00003 1st64=237286    WEBER, TOM               BOX 5503                 FORT
 #00004 1st64=403887    MILNER, LARRY            BOX 28 RAU ROAD R.R.8    QUES
 EOF fili1 4 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
      02560 BKSZ *       4 BLKS =     10,240 BYTES
    - 02048 last blk not full   =      8,192 NET TOTAL
 EOF1CUSTMAS1         UVSOFT00010001000101 98099 980990000004UNIXSCO
 EOF2F0256000256
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2

END of TAPE, 0002 files

Goto:   Begin this document End this document UVSI Home-Page

B3. t9list3 - list STANDARD LABELLED 9 track mag tape

This job reads STANDARD LABELLED 9 track mag tape & creates a report intended for printing on laser or line printers. Records greater than 100 bytes are listed in 100 byte segements. Options are provided to list a specified number of blocks or records.

An easy to use script 'sf/t9listC' is provided to call uvcopy job 'pf/t9list3'. For example here are the commands to list 1st 3 blocks using the uvcopy job directly or using the script.

Note
  • to use the script, you would 1st modify the uvcopy job input file
    depending on your UNIX operating system (UnixWare default).
  • the script prints the file created by t9list3 using 'uvlp12L' to
    laser print Landscape at 12 cpi to allow 120 bytes wide. You could
    modify as desired for line printers or different destinations.

using t9list3 uvcopy job (vs t9listC script)


 1. uvcopy t9list3,fili1=/dev/rmt/ntape2,filo1=tmp/t9list3.rpt,uop=n20x3
    ====================================================================

 2. uvlp12L tmp/t9list3.rpt     <-- print report created by t9list3
    ======================

sample report tmp/t9list3.rpt

                              1         2         3         4         5         6         7         8         9        10
                     1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                     ====================================================================================================
 B#0001 02560 00256  130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANAIMO          BC V9S1H1    604-754-55
                     FFFFFF4444CECDCDCCD4DDEDDE4DEC44444FFFF4CDECD4DDCC4444444444DCDCCDD4444444444CC4EFEFCF4444FFF6FFF6FF
                     130140000055597955504636920334B000018150266550961400000000005151946000000000023059218100006040754055
                     1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
              00100  31                  ..4V|............W0....`........)X}...3.... \.................4V}.............
                     FF44444444444444444401FE6000000000000EF00237000000005ED008F10334E00000000000000001FED003800000000044
                     310000000000000000000245A0000C0000C0260D0DC9C0000C00D700263C077000000C0000C0000C0245000D6C0000C00200
                   101...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
              00200  ........  ......... .... ....<......... C
                     0000000044000000011400284000140000000084C444444444444444
                     0000C002000000C0063000D600012C0000C001603000000000000000
                   201...5...10...15...20...25...30...35...40...45...50...55.
Note
  • the sample above illustrates option 'w2' which creates a record scale
    below every record segment. Please see all options on next page.

Goto:   Begin this document End this document UVSI Home-Page

B4. t9list3 - list STANDARD LABELLED 9 track mag tape

using t9listC script


 1. t9listC n10         <-- script t9listC easier to use than t9list3
    ===========             (calls both t9list3 & uvlp12L)
Note
  • t9list3/t9listC displays the default options & allows you to
    modify as desired. The example below overrides default 'n20'
    with 'n10' to list 1st 10 records vs 1st 20 default.
 t9list3 - list data records from 9 track mag tapes
 uop=b0f0h1n20r0s3u0v0w2x0y2n10 - option defaults
     b0                    - use data block size from HDR2 label
     b32768                - override HDR2 blksize (for unlabelled tapes)
       f0                  - print entire block (default)
       f###                - print first so many bytes of each block
         h1                - hex, print 3 lines for each 100 byte segment
         h0                - character line only (vs chars, zones,& digits)
           n20             - or stop print after 20 records max
              r0           - use recsize from HDR2 (recommended)
              r100         - override HDR2 rcsz (use if rcsz=20 for 5 up)
              r99999       - inhibit records, print blocks 100 chars/line
              s3           - space after each record/segment & after block
                             (s1=record/segment, s2=block, s3=both)
                u0         - disable formfeed insert
                u1         - formfeed before every record (except 1st)
                u2         - formfeed every 2 records, etc
                  v0       - print scale only once at begining
                  v1       - print scale before every record
                  v2       - print scale every 2 records, etc
                    w0     - inhibit scale below record segments
                    w1     - scale below 1st record segment (100 bytes)
                    w2     - scale below all record segments
                      x0   - dont show block&record dsplcmnts
                      x1   - show dsplcmnt in block for records 2+
                      x2   - show dsplcmnt in record for segments 2+
                        y0 - cnvrt unprintable chars <32 & >128 to "."s
                        y1 - cnvrt packed fields to "."s
                        y2 - cnvrt pkd flds & lower case EBCDIC to "."s
 User OPtion (uop) defaults  = q1b0f0h1n20r0s3u0v0w2x0y2n10
  null to accept or re-specify (1 or more) -->
 t9list3:010620:084055: EOF fili1 3 rds, 0 wrts, 0 size; /dev/rmt/ntape2
 stop count reached, 20 records printed=q1b0f0h1n20r0s3u0v0w2x0y2x3 2001/06/
 t9list3:010620:084055: EOF filo1 0 rds, 313 wrts, 26109 size; tmp/t9listC.rpt
 t9list3:010620:084055: EOF fili1 2 rds, 0 wrts, 0 size; /dev/rmt/ntape2
 request id is lp00-259 (standard input)
 uvlp12L printing tmp/t9listC.rpt on -dlp00, lines=313

Please see sample report (including VOL1,HDR1,HDR2,etc) on next page --->

Goto:   Begin this document End this document UVSI Home-Page

B5. t9list3 - list STANDARD LABELLED 9 track mag tape


 1. t9listC n10         <-- script t9listC easier to use than t9list3
    ===========
                     ** sample report tmp/t9list3.rpt **
 B#/r#  Bytes Byte# /dev/rmt/ntape2 uop=q1b0f0h1n20r0s3u0v0w2x0y2x3 2001/06/20_08:32:43 file#01
 VOL1CUSTMS                               BERKS EIT
 HDR1CUSTMAS1=TEST-TAPVOL10000010001000101 00357 003570000000UNIXSCO
 HDR2F0256000256                       B
 - - - TAPE MARK - - -
                              1         2         3         4         5         6         7         8         9        10
                     1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                     ====================================================================================================
 B#0001 02560 00256  130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANAIMO          BC V9S1H1    604-754-55
                     FFFFFF4444CECDCDCCD4DDEDDE4DEC44444FFFF4CDECD4DDCC4444444444DCDCCDD4444444444CC4EFEFCF4444FFF6FFF6FF
                     130140000055597955504636920334B000018150266550961400000000005151946000000000023059218100006040754055
                     1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
              00100  31                  ..4V|............W0....`........)X}...3.... \.................4V}.............
                     FF44444444444444444401FE6000000000000EF00237000000005ED008F10334E00000000000000001FED003800000000044
                     310000000000000000000245A0000C0000C0260D0DC9C0000C00D700263C077000000C0000C0000C0245000D6C0000C00200
                   101...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
              00200  ........  ......... .... ....<......... C
                     0000000044000000011400284000140000000084C444444444444444
                     0000C002000000C0063000D600012C0000C001603000000000000000
                   201...5...10...15...20...25...30...35...40...45...50...55.
 r#0002 00256 00256  132588    GEECOE GENERATOR SERVICESUNIT 170 - 2851 SIMPSON  RICHMOND         BC V6X2R2    604-278-44
                     FFFFFF4444CCCCDC4CCDCDCEDD4ECDECCCEEDCE4FFF464FFFF4ECDDEDD44DCCCDDDC444444444CC4EFEFDF4444FFF6FFF6FF
                     1325880000755365075559136902595935245930170000285102947265009938465400000000023056729200006040278044
                     1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
              00100  88                  ........8\........U\........................ ...#....%<........6.........G......
                     FF44444444444444444400380001FE00000002EE0000000000002890000000094000710036400000002F000000003C100000
                     880000000000000000000078C008800000C00D400000C0000C00D830000C00370001BC007CC0000C00D6C0000C0027C0000C
                   101...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
              00200  ...........................B.<..........A   871006
                     000000000000000000000000000C240000000000C444FFFFFF444444
                     0000C0000C0000C0000C0000C0026C0000C0000C1000871006000000
                   201...5...10...15...20...25...30...35...40...45...50...55.
Note
  • The lines above will probably be truncated, since this documentation
    is usually printed at 10 cpi.
  • The report is intended to be printed Landscape at 12 cpi, which allows
    about 120 characters (20 for block#/record#/etc & 100 for data).

Please compare this sample report from a 'standard labelled report' to the 'unlabelled report' shown on the next page --->

t9list3 determines the correct block/record sizes & can format the report appropriately, whereas t9list4 cannot know the block/record sizes, unless you specify as options.

Goto:   Begin this document End this document UVSI Home-Page

B6. t9list4 - list UNLABELLED 9 track mag tape

uvcopy job 'pf/t9list4' will list UNLABELLED 9 track mag tape & script 'sf/t9listD' is provided to make the uvcopy job easier to use.

using t9list4 uvcopy job (vs t9listD script)


 1. uvcopy t9list4,fili1=/dev/rmt/ntape2,filo1=tmp/t9list4.rpt,uop=n10
    ==================================================================

 2. uvlp12L tmp/t9list4.rpt     <-- print report created by t9list3
    ======================

using t9listD script


 1. t9listD n10y1       <-- script t9listD easier to use than t9list4
    =============           (calls both t9list4 & uvlp12L)

sample report tmp/t9listD.rpt

 B#/r#  Bytes Byte# /dev/rmt/ntape2 uop=q1b2000f0h1n20r100s3u0v0w2x0y2y1 2001/06/20_09:26:25 file#01
                              1         2         3         4         5         6         7         8         9        10
                     1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                     ====================================================================================================
 B#0001 02000 00100  0001 tf/test100 one                     0002 tf/test100 two                     0003 tf/test100 thre
                     FFFF4A86A8AAFFF4998444444444444444444444FFFF4A86A8AAFFF4AA9444444444444444444444FFFF4A86A8AAFFF4A898
                     0001036135231000655000000000000000000000000203613523100036600000000000000000000000030361352310003895
                     1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....
 r#0002       00100  e                   0004 tf/test100 four                    0005 tf/test100 five
                     84444444444444444444FFFF4A86A8AAFFF489A944444444444444444444FFFF4A86A8AAFFF488A844444444444444444444
                     5000000000000000000000040361352310006649000000000000000000000005036135231000695500000000000000000000
                     1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80...85...90...95.....

t9list4 can not determine the correct block & record size from unlabelled tapes. The block/record size default to 2000/100 & the defaults are reflected in the above sample report.

By examining the above report, you can see that the record size is 40 bytes & the block size just happens to match the default block size of 200 bytes. So now we can rerun the job, specifying the correct block & record size.

See rerun OP. Instrns. & report on the next page --->

Note that option 'y1' is specified to allow lower case EBCDIC. (see more explanation at bottom of next page)

Goto:   Begin this document End this document UVSI Home-Page

B7. t9list4 - list UNLABELLED 9 track mag tape

The previous page listed an unlabelled tape without specifying correct rcsz. Here is a rerun with the CORRECT bksz & rcsz specified via option b & r. First the hard way in 2 steps (uvcopy t9list4 & uvlp12), then the easy way using the script 't9listD' which calls the uvcopy t9list4 & uvlp12.

  1. uvcopy t9list4,fili1=/dev/rmt/ntape2,filo1=tmp/t9list4.rpt,uop=b2000r40n10y1

  2. uvlp12L tmp/t9list4.rpt


 1a. t9listD b2000r40n10y1  <-- alternative script t9listD combines above 2 steps
     =====================

sample report with correct bksz/rcsz

 B#/r#  Bytes Byte# /dev/rmt/ntape2 uop=q1b2000f0h1n20r100s3u0v0w2x0y2r40y1 2001/06/20_09:30:08 file#
                              1         2         3         4         5         6         7         8         9        10
                     1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
                     ====================================================================================================
 B#0001 02000 00040  0001 tf/test100 one
                     FFFF4A86A8AAFFF4998444444444444444444444
                     0001036135231000655000000000000000000000
                     1...5...10...15...20...25...30...35...40
 r#0002       00040  0002 tf/test100 two
                     FFFF4A86A8AAFFF4AA9444444444444444444444
                     0002036135231000366000000000000000000000
                     1...5...10...15...20...25...30...35...40
 r#0003       00040  0003 tf/test100 three
                     FFFF4A86A8AAFFF4A89884444444444444444444
                     0003036135231000389550000000000000000000
                     1...5...10...15...20...25...30...35...40

Note option 'y1' is specified above to allow 'lower case EBCDIC'. If this were not specified the 1st record would print as follows:

 B#0001 02000 00040  0001 ../....100 ...
                     FFFF4A86A8AAFFF4998444444444444444444444
                     0001036135231000655000000000000000000000
                     1...5...10...15...20...25...30...35...40

Most EBCDIC tapes do not have lower case so the default option y2 translates lower case to '.'s in order to print any packed fields as '.'s on the character line (for packed field bytes that just happen to coincide with lower case).

Goto:   Begin this document End this document UVSI Home-Page

C1. t9copy1 - select any 1 file from a std lbl multi-file tape

This job will copy 1 file from a standard labelled tape (allows multi-volumes).

See t9copy2 for multi-file std lbl tape. t9copy2 may be better even if only 1 file (unless you have multi-volume files), because it names the output files from the HDR1 tape labels.


 uvcopy t9copy1,fili1=/dev/rmt/nrtape2,filo1=tmp/tapedata
 ========================================================
 uop=q1a0b0c7d1    - option defaults
       a0          - (default) translate off (packed flds/zoned signs)
       a1          - force translate (no packed fields or zoned signs)
         b0        - (default) use data block size from HDR2 label
      b8192        - would use 8192 always (see discussion above)
           c7      - (dflt) convert * $ / to _ underscore
           c15     - would also convert . to _ underscore
              d1   - (default) display labels (VOL,HDR,EOF) & EOF counts
              d2     display lbls, 1st 64 of each data blk,& EOF counts
              d0     do not display lbls (VOL,HDR,EOF), just EOF counts
 User OPtion (uop) defaults  = q1a0b0c7d1
  null to accept or re-specify (1 or more) --> a1b400d2 <-- OPTIONS DESIRED
 VOL1123456                              UV SOFTWARE INC.
 HDR1TAPEHDR1LABEL    12345600010001000101 98100 981000000000UNIXSCO
 HDR2F0040000040
 EOF fili1 3 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 HDR1 filename = tapehdr1label -OK for output, or enter newname ?
                                                       -->    <-- accept dflt
 #00001 1st64=0001 TF/TEST100 ONE                    .0002 TF/TEST100 TWO
 #00002 1st64=0011 TF/TEST100 ELEVEN                 .0012 TF/TEST100 TWELVE
 #00003 1st64=0021 TF/TEST100 TWENTY ONE             .0022 TF/TEST100 TWENTY T
 #00004 1st64=0031 TF/TEST100 THIRTY ONE             .0032 TF/TEST100 THIRTY T
 #00005 1st64=0041 TF/TEST100 FORTY ONE              .0042 TF/TEST100 FORTY TW
 #00006 1st64=0051 TF/TEST100 FIFTY ONE              .0052 TF/TEST100 FIFTY TW
 #00007 1st64=0061 TF/TEST100 SIXTY ONE              .0062 TF/TEST100 SIXTY TW
 #00008 1st64=0071 TF/TEST100 SEVENTY ONE            .0072 TF/TEST100 SEVENTY
 #00009 1st64=0081 TF/TEST100 EIGHTY ONE             .0082 TF/TEST100 EIGHTY T
 #00010 1st64=0091 TF/TEST100 NINETY ONE             .0092 TF/TEST100 NINETY T
 EOF fili1 10 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF1TAPEHDR1LABEL    12345600010001000101 98100 981000000010UNIXSCO
 file# 001 tapehdr1label345600010001000101 98100 981000000010UNIX
 EOF fili1 1 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF filo1 0 rds, 10 wrts, 0 hits, 4000 size, fname=tapedata
NOTE
  • it is probably better to use t9copy2 (in case of multi-file tape)
    to copy all files into a tmp directory.
THEN
  • you can list the directory & retrieve the file(s) desired.

Goto:   Begin this document End this document UVSI Home-Page

C2. t9copy1u - copy file(s) from an unlabelled 9 track tape

't9copy1u' copies 1 or more file(s) from an unlabelled 9 track tape. It stops at each tape-mark with option to continue, in case of multi-file unlabelled files stacked on 1 tape.

The 1st output filename will default to 't9copy1u.001', unless overridden on the command line. Subsequent files increment the suffix 002, 003, etc, but the operator is prompted to change the filename id desired.

operating instructions


 1. cd directory              - change to output directory
    ============                (will write files to current directory)

 2. uvcopy t9copy1u,fili1=/dev/rmt/nrtape2,filo1=t9copy1u.001
    =========================================================
 uop=q1a0b32768d0t0 - option defaults
       a0           - (default) translate off (packed flds/zoned signs)
       a1           - force translate (no packed fields or zoned signs)
         b32768     - default blocksize to read (should not matter)
         b2000      - specify if known & d2 to display 1st 64 each block
               d0   - (default) display 1st 64 bytes of 1st block only
               d2     display 1st 64 bytes of all data blocks
 User OPtion (uop) defaults  = q1a0b32768d0
  null to accept or re-specify (1 or more) --> a1b800d2 <-- enter options

 #00001 1st64=0001 TF/TEST100 ONE                     0002 TF/TEST100 TWO
 #00002 1st64=0021 TF/TEST100 TWENTY ONE              0022 TF/TEST100 TWENTY T
 #00003 1st64=0041 TF/TEST100 FORTY ONE               0042 TF/TEST100 FORTY TW
 #00004 1st64=0061 TF/TEST100 SIXTY ONE               0062 TF/TEST100 SIXTY TW
 #00005 1st64=0081 TF/TEST100 EIGHTY ONE              0082 TF/TEST100 EIGHTY T
 EOF fili1 5 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 file#001 00005 blks testout
 EOF filo1 0 rds, 5 wrts, 0 hits, 4000 size, fname=testout
 file# 002 testout.002 null=accept, or enter newname ?
                                                    --->     <-- null (end)
 EOF fili1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 file#002 00000 blks testout.002
 END of TAPE, 002 files processed
 EOF fili1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF filo1 0 rds, 0 wrts, 0 hits, 0 size, fname=testout.002

Goto:   Begin this document End this document UVSI Home-Page

C3. t9copy2 - copy all files from a Std LBLd tape into a directory

operating instructions


 uvcopy t9copy2,fili1=/dev/rmt/nrtape2,fild2=tmp
 ===============================================
 uop=q1a0b0c7d1  - option defaults
       a0        - (default) translate off (packed flds/zoned signs)
       a1        - force translate (no packed fields or zoned signs)
         b0      - (default) use data block size from HDR2 label
      b8192      - would use 8192 always (see discussion above)
           c7    - (dflt) convert * $ / to _ underscore
           c15   - would also convert . to _ underscore
              d1 - (default) display labels (VOL,HDR,EOF) & EOF counts
              d2   display lbls, 1st 64 of each data blk,& EOF counts
              d0   do not display lbls (VOL,HDR,EOF), just EOF counts
 User OPtion (uop) defaults  = q1a0b0c7d1
  null to accept or re-specify (1 or more) -->     <-- null accept dflts
 VOL1UVSOFT                              UV SOFTWARE INC.
 HDR1TEST100          UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0080000040
 EOF fili1 3 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF fili1 5 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF filo2 0 rds, 5 wrts, 0 hits, 4000 size, fname=tmp/test100
 EOF1TEST100          UVSOFT00010001000101 98099 980990000005UNIXSCO
 file# 001 test100           00005 blks
 EOF2F0080000040
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 HDR1CUSTMAS1         UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0256000256
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF fili1 4 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF filo2 0 rds, 4 wrts, 0 hits, 8192 size, fname=tmp/custmas1
 EOF1CUSTMAS1         UVSOFT00010001000101 98099 980990000004UNIXSCO
 file# 002 custmas1          00004 blks
 EOF1 blocks 000009 not= counted 000004 - continue?
 EOF2F0256000256
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 HDR1SALES2           UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0064000064
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF filo2 0 rds, 2 wrts, 0 hits, 1280 size, fname=tmp/sales2
 EOF1SALES2           UVSOFT00010001000101 98099 980990000002UNIXSCO
 file# 003 sales2            00002 blks
 EOF1 blocks 000011 not= counted 000002 - continue?
 EOF2F0064000064
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2

END of TAPE, 0003 files copied EOF fili1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF fild2 0 rds, 0 wrts, 0 hits, 80 size, fname=tmp

Goto:   Begin this document End this document UVSI Home-Page

C3a. t9copy2 - copy all files from standard labelled tape - continued

NOTE - t9copy2 the best

t9copy2m - Alternate version of t9copy2

Goto:   Begin this document End this document UVSI Home-Page

C4. t9copy3 - interactive file selection from multi-file std lbl tape

This job will display each HDR1 label & prompt for copy/bypass y/n ? Convenient when you want to selct 1 or more files from a multi-file tape & do not know which HDR1 labels you want until you see them.


 uvcopy t9copy3,fili1=tf/t9test3,fild2=tmp
 =========================================
 uop=q1a0b0c15d1   - option defaults
       a0          - (default) translate off (packed flds/zoned signs)
       a1          - force translate (no packed fields or zoned signs)
         b0        - (default) use data block size from HDR2 label
      b8192        - would use 8192 always (see discussion above)
           c15     - (dflt) convert * $ / . to _ underscore
                     *1 + $2 + /4 + .8 = c15
              d1   - (default) display labels (VOL,HDR,EOF) & EOF counts
              d2     display lbls, 1st 64 of each data blk,& EOF counts
 User OPtion (uop) defaults  = q1a0b0c15d1
  null to accept or re-specify (1 or more) -->    <-- null accept dflts
 VOL1UVSOFT                              UV SOFTWARE INC.
 HDR1TEST100          UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0080000040
 EOF fili1 3 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 enter b=bypass, c=cpy HDR1 name, or newname to copy/rename
                                                         ---> b  <-- b=bypass
 EOF fili1 5 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF1TEST100          UVSOFT00010001000101 98099 980990000005UNIXSCO
 EOF2F0080000040
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 HDR1CUSTMAS1         UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0256000256
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 enter b=bypass, c=cpy HDR1 name, or newname to copy/rename
                                                         ---> c  <-- c=COPY
 EOF fili1 4 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF filo2 0 rds, 4 wrts, 0 hits, 8192 size, fname=tmp/custmas1
 file# 001 custmas1          00004 blks, 00000 transltd
 EOF1CUSTMAS1         UVSOFT00010001000101 98099 980990000004UNIXSCO
 EOF2F0256000256
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 HDR1SALES2           UVSOFT00010001000101 98099 980990000000UNIXSCO
 HDR2F0064000064
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 enter b=bypass, c=cpy HDR1 name, or newname to copy/rename
                                                         ---> b  <-- b=bypass
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF1SALES2           UVSOFT00010001000101 98099 980990000002UNIXSCO
 EOF2F0064000064
 EOF fili1 2 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 END of TAPE, 0001 files copied
 EOF fili1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 EOF fild2 0 rds, 0 wrts, 0 hits, 48 size, fname=tmp

Goto:   Begin this document End this document UVSI Home-Page

D1. t9write1 - write 1 file to std lbl tape (allow multi-volumes)

t9write1
  • write any 1 file to standard labelled tape (allows multi-volumes)
  • IBM standard labeled multi-volume tapes, example for 2 tapes:
  1. VOL1,HDR1,HDR2,..data..,EOV1,EOV2
  2. VOL1,HDR1,HDR2,..data..,EOF1,EOF2

    Operating Instructions - format & example


 uvcopy t9write1,fili1=infile,filo1=outtape,uop=a#b#c#m#,arg1=vol,arg2=lbl
 =========================================================================

 uvcopy t9write1,fili1=input,filo1=/dev/rmt/ntape2,uop=a101n30000c100m200
 ========================================================================
 Output tape device name depends on UNIX machine, some examples are:
 - unixware=ntape2, SCO-OSR5=nrStp2, DG=1un, SUN=?
 Options a#b#c#m# are: a=rcszin,b=bkszout,c=rcszout,m=maxtape(megabytes)
 - a101n30000c100m200 rcszin=101,bkszout=30000,rcszout=100,maxtape=200 mb
 Separate options for rcsz in & out allows different rcsz on tape
 - a101 & c100 is dropping last byte of input record (probably a linefeed)
 - option 'b' must be a multiple of option 'c'

Tape VOL# & HDR-lbl may be specified via arg1 & arg2, or will be solicited

New Features August 00

  1. Display existing labels & prompt y/n to overwrite ? - see VOL1/HDR1/HDR2 displayed in sample run on next page ---> - may change tape & reply 'n' to redisplay

  2. Test tape status & prompt to put online - see 'status ready begining-of-tape' shown on next page ---> - attempting to write when offline causes job failure (which could be a big problem if your on the 10th of 10 tapes).

  3. at end each volume - Prompt to mount next tape & reply 'y'

  4. Display record counts & block counts at end of each tape - for current tape & accumulated totals for all tapes

See complete example with all console displays on the next page ---> Also see CHANGES required depending on UNIX OS 2 pages ahead --->

Note
  • you can use 't9copy2' to read these files back to disc, but you
    will get 'duplicate filename msg' on volumes 2,3,etc.
  • use the 'c' change name option to rename files for vol2,3,etc

Goto:   Begin this document End this document UVSI Home-Page

D1a. t9write1 - write 1 file to standard labelled tape (allow multi-volumes)

Op. Instrns. sample command & console displays


 uvcopy t9write1,fili1=input,filo1=/dev/rmt/ntape2,uop=a101n30000c100m200
 ========================================================================
 uop=q1a080b32000c080m200   - option defaults (for test/demo file)
       a080                 - record size - for input file
           b32000           - block size  - for output tape
                 c080       - record size - for output tape
                     m200   - max megabytes per volume
 User OPtion (uop) defaults  = q1a080b32000c080m200a200b30000c200m10
 null to accept or re-specify (1 or more) -->    <-- null (options on cmd)

status : ready beginning-of-tape

 VOL1ABCD01                               Gannett Of
 HDR1TAPELABEL-MAX17  VOL10000010001000101 00217 002170000000UNIXSCO
 HDR2F3000000200                       B
 Overwrite tape (labels shown above) OK ? (must reply "y") --> y <--
 t9write4:000804:085616: EOF filo1 0 rds, 3 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085637: EOF filo1 0 rds, 333 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085638: EOF filo1 0 rds, 2 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085639: EOF filo1 0 rds, 0 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085639: EOF filo1 0 rds, 0 wrts, 0 size; /dev/nrStp2
 this tape: blocks=333, records=49950, end tape# 1
 all tapes: blocks=333, records=49950, inrcs=200, outrcs=200, bks=30000
 mount next volume, PUT ONLINE, & enter "y" to continue --> y <--

status : ready beginning-of-tape

 VOL1ABCD02                               Gannett Of
 HDR1TAPELABEL-MAX17  VOL10000020001000101 00217 002170000000UNIXSCO
 HDR2F3000000200                       B
 Overwrite tape (labels shown above) OK ? (must reply "y") --> y <--
 t9write4:000804:085808: EOF filo1 0 rds, 3 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085819: EOF filo1 0 rds, 145 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085820: EOF filo1 0 rds, 2 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085822: EOF filo1 0 rds, 0 wrts, 0 size; /dev/nrStp2
 t9write4:000804:085822: EOF filo1 0 rds, 0 wrts, 0 size; /dev/nrStp2
 this tape: blocks=145, records=71693, end tape# 2
 all tapes: blocks=478, records=71693, inrcs=200, outrcs=200, bks=30000
 t9write4:000804:085837: EOF fili1 71693 rds, 0 wrts, 14338600 size; tmp1/slm

Goto:   Begin this document End this document UVSI Home-Page

D1b. t9write1 - write 1 file to standard labelled tape (allow multi-volumes)

Changes Required for vrious UNIX OS's

  1. Modify device names depending on your UNIX OS & SCSI ID# - you must specify the NOREWIND device - you can specify on the command line, but more convenient if you modify the file declaration within the job & remove the '?' for prompts. - here are some examples (do some research if your OS not listed)

      filo1=/dev/nrStp2           <-- SCO OSR5
      filo1=/dev/rmt/ntape3       <-- SCO UnixWare
      filo1=/dev/rmt/1un          <-- Data General
  1. Modify the rewind/UNLOAD instructions depending on your OS - these instructions occur in the 'clst' subroutine. - here are some examples (do some research if your OS not listed) - since I have SCO OSR5, it is active & the others are #commented out - you can uncomment yours & #comment the others (or delete them) # sysv1 'tape unload $filo1' SCO OSR5 - rewind & unload tape # sysv1 'mt -f $filo1 unload' Data General - rewind & unload tape # sysv1 'tapecntl -u $filo1' UnixWare - rewind & unload tape

  2. Modify the REWIND to load point instructions depending on your OS - these instructions occur in the 'opnt' subroutine - use you editor to search for /filo1 to make sure you find them all # sysv1 'tape rewind $filo1' SCO OSR5 - rewind to load point # sysv1 'mt -f $filo1 rewind' Data General - rewind to load point # sysv1 'tapecntl -w $filo1' UnixWare - rewind to load point

  3. Modify the status test command depending on your UNIX OS - tape status OK must return 0, which is tested by following 'skp=' - tape status BAD must return non-zero, which falls thru skp= to msg # sysv1 'tapecntl -s $filo1' <-- Unixware (check option ?) # sysv1 'mt -f $filo1 status' <-- Data general (check option) # sysv1 'tape status $filo1' <-- SCO OSR5 (OK at UV Software) skp= opnt4 msgwy 'tape status failed, put online & enter to retry'

NOTE
  • UV Software uses SCO OSR5
  • You must change the devices & rewind/unload instructions to
    whatever is correct for your UNIX OS

Goto:   Begin this document End this document UVSI Home-Page

D2. t9write2 - write multi-part file (allow multi-volumes)

t9write2
  • write multi-part file to std lbl tape, allow multi-volume output
  • requires pre-editing a control file with filenames of multi-parts

 1. vi /tmp/fnames       <-- pre-edit control file with names of multi-parts
    ==============

 2. uvcopy t9write2,fili1=fnames,filo1=outtape,uop=a#b#c#m#,arg1=vol,arg2=lbl
    =========================================================================

operating Instructions Example

  1. vi /tmp/fnames <-- pre-edit control file /home/uvadm/dat1/custmas1 - insert filenames in /tmp/fnames /home/uvadm/dat1/custmas2 /home/uvadm/dat1/custmas3 :wq - write & quit editor


 2. uvcopy t9write2,fili1=fnames,filo1=/dev/rmt/ntape2,uop=a101n30000c100m200
    =========================================================================

This job (t9write2) is similar to t9write1 (both allow multi-volume output) but this job provides for a multi-part input file, usually required because total file exceeds 2 gig & it has to be split in parts < 2 gig.

Note that these multi-part files must have the same record size. These are the same type of data - just spread over multiple files.

The example shows 3 files (custmas1, custmas2, custmas3), but you can have up to 100 filenames in your control file.

The filenames may be absolute full path names as in this example, or they could be relative to your current directory (if no leading '/'). They could be in many different directories if you wish.

All files are verified (by opening & closing) before the tape write begins. This avoids problems part way thru multifile input & multivolume output jobs.

Dont confuse this job (t9write2), which writes multi-part same data files, with 't9write3' which writes multiple different type files stacked on 1 tape.

Goto:   Begin this document End this document UVSI Home-Page

problem - failure to write 2nd tape mark

Some UNIX systems refuse to write 2 tape marks in succession. If you have this problem, you can use the UNIX tape utility to write the 2nd tape mark (before you rewind the tape). The command will vary depending onthe UNIX system. On SCO UNIX, the command is as follows:


 tape wfm /dev/nrStp2           - write tape mark
 ====================

Goto:   Begin this document End this document UVSI Home-Page

D2a. t9write1 - write 1 file to std lbl tape - continued

verifying t9write1 tapes

The previous pages illustrated writing std lbl tapes & this page will illustrate reading it back to prove the contents are valid. We can use the 't9list1' job documented previously in the section.


 uvcopy t9list1,fili1=/dev/rmt/nrtape2
 =====================================
 t9list1 - investigate 9 track tapes, labelled or unlbld, EBCDIC or ASCII
 uop=a1b32768p10   - option defaults
     a1            - translate EBCDIC to ASCII (a0 inhibits)
       b32768      - block size to read (will display 1st 60 bytes)
       b800        - specify actual bksz if known ?
       b2000       - specify whatever value you wish to display sample
             p10   - pause after every 10 blocks, continue on enter
 User OPtion (uop) defaults  = q1a1b32768p10
  null to accept or re-specify (1 or more) --> b400 <-- enter BLOCKSIZE
 #0001 (00240) 1st60=VOL1123456                              UV SOFTWARE INC.
 EOF fili1 1 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK - enter to continue              -->       <-- null to continue
 #0003 (00400) 1st60=0001 TF/TEST100 ONE                     0002 TF/TEST100 TW
 #0004 (00400) 1st60=0011 TF/TEST100 ELEVEN                  0012 TF/TEST100 TW
 #0005 (00400) 1st60=0021 TF/TEST100 TWENTY ONE              0022 TF/TEST100 TW
 #0006 (00400) 1st60=0031 TF/TEST100 THIRTY ONE              0032 TF/TEST100 TH
 #0007 (00400) 1st60=0041 TF/TEST100 FORTY ONE               0042 TF/TEST100 FO
 #0008 (00400) 1st60=0051 TF/TEST100 FIFTY ONE               0052 TF/TEST100 FI
 #0009 (00400) 1st60=0061 TF/TEST100 SIXTY ONE               0062 TF/TEST100 SI
 #0010 (00400) 1st60=0071 TF/TEST100 SEVENTY ONE             0072 TF/TEST100 SE
 #0011 (00400) 1st60=0081 TF/TEST100 EIGHTY ONE              0082 TF/TEST100 EI
 #0012 (00400) 1st60=0091 TF/TEST100 NINETY ONE              0092 TF/TEST100 NI
 EOF fili1 10 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK - enter to continue              -->       <-- null to continue
 #0014 (00160) 1st60=EOF1TAPEHDR1LABEL    12345600010001000101 98100 9810000000
 EOF fili1 1 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK - enter to continue              -->       <-- null to continue
 EOF fili1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2
 TAPEMARK, 2nd successive - enter q=quit, null=continue
                                           --> q     <-- q to quit

even BETTER

It would be better to use the 't9copy1' or 't9copy2' jobs (shown earlier) to copy the contents into a tmp directory. You could then compare file sizes, examine contents with uvhd,& run the 'cmp' UNIX file compare on the tmp file vs the original.

Goto:   Begin this document End this document UVSI Home-Page

D3. t9write3 - write multiple files to std lbl 9 track tape

This job is guided by a control file that contains the filenames of the files to be written & the desired record size, block size,& options to translate to UPPER &/or EBCDIC.

sample control file supplied to test/demo tf/t9write3

 # ctl/t9write3.ctl - control file for 't9write3', uvcopy job to write
 #                    multiple files to standard labelled 9 track tape
 # - this file indicates the filename,rcsz,bksz,translate options,&
 #   the file sequence of each file to be written to tape.
 # - this is a sample control file for t9write3, you can test as follows:
 #
 #   uvcpopy t9write3,fili1=ctl/t9write3.ctl,filo1=/dev/rmt/nrtape2
 #   =======================****************=======================
 #
 #hdr=test100          ,uop=r00040b00800c00040u2e2,fil=dat1/test100
 #hdr=custmas1         ,uop=r00256b02560c00256u0e0,fil=dat1/custmas0
 #hdr=sales2           ,uop=r00064b00630c00063u0e4,fil=dat1/sales2
 #                                              e4 - signals last file
 #                                              e6 - last file with e2
 # ------------------- control file record layout ------------------------
 # 01-01 - '#' identifies a comment record to be bypassed
 # 01-04 - 'hdr=' identifies a valid control record
 # 05-21 - filename to be written in the HDR1 tape label
 # 22-26 - ',uop='
 # 27-32 - 'r' + record size on disc
 # 33-38 - 'b' + block size  on tape
 # 39-44 - 'c' + record size  on tape
 # 45-46 - 'u2' to translate data to UPPER case ('u0' to inhibit)
 # 47-48 - 'e2' to translate data to EBCDIC ('e0' to inhibit)
 #         'e4' 4 bit signals last file
 #         'e6' last file when e2 also required (e6=e4+e2)
 # 49-53 - ',fil='
 # 54-100- input filename (may be full path or relative)
 #
 #note - use 'u0e0' options to inhibit translates for any file containing
 #       packed or binary fields. If you are preparing tapes to send to an
 #       IBM mainframe, you must preprocess these files to selectively
 #       translate to EBCDIC, for example dat1/custmas1 has packed fields
 #       in 121-240 & you could pre-process as follows:
 #
 #       uvcp "fili1=dat1/custmas1,typ=RSF,rcs=256\
 #            ,filo1=tmp/custmas0,tre=0(120),tre=240(16)"
 #
 #     - you would then specify the translated file (tmp/custmas0)
 #       on the control record above which becomes as follows:
 #
 #hdr=custmas1         ,uop=r00256b02560c00256u0e0,fil=tmp/custmas0
 #

Please see Operating Instrns & test/demo on the next page --->

Goto:   Begin this document End this document UVSI Home-Page

D3a. t9write3 - write multiple files to standard labelled 9 track tape

test/demo operating instructions

  1. Prepare the control file, defining filenames, rcsz, bksz, etc of the files to be written to std lbl multi-file tape.

 <----- see the demo control file listed on the previous page.

 2. uvcopy t9write3,fili1=tf/t9write3.ctl,filo1=/dev/rmt/nrtape2
    ============================================================
enter VOL1 VSN
  • 6 characters exactly
    ----> UVSOFT <--- enter VSN

EOF filo1 0 rds, 3 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF fili2 100 rds, 0 wrts, 0 hits, 4000 size, fname=tf/test100 EOF filo1 0 rds, 5 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 2 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 2 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF fili2 32 rds, 0 wrts, 0 hits, 8192 size, fname=dat1/custmas1 EOF filo1 0 rds, 4 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 2 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 2 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF fili2 20 rds, 0 wrts, 0 hits, 1280 size, fname=dat1/sales2 EOF filo1 0 rds, 2 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 2 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF fili1 39 rds, 0 wrts, 0 hits, 1902 size, fname=tf/t9write3.ctl EOF filo1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2

Note
  • to verify tape contents, you might try the following:

 1.  uvcopy t9list1,fili1=/dev/nrtape2
     =================================
              - read the tape & display all labels + 1st 60 bytes each block
              - see sample output with t9list1 doc earlier in this section

2a. mkdir tmp (or rm tmp/*)


 2b. uvcopy t9copy2,fili1=/dev/nrtape2,fild2=tmp
     ===========================================
              - OR copy the multi-file tape contents back to a tmp dir
 2c. ls -l tmp            - check output files
 2d. vi tmp/*             - check text files with editor

2d. uvhd tmp/custmas1 - check bianry output files with uvhd

Goto:   Begin this document End this document UVSI Home-Page

D4. t9write1u - write any 1 file to unlabelled 9 track tape

This job will write any 1 file to unlabelled 9 track tape, probably for sending data files to outside agencies with IBM mainframes.

Options for
  • record-size & block-size
  • translation to UPPER case
  • translation of ASCII to EBCDIC

If packed/binary fields present, you should do selective translates of non packed fields in a separate previous job & then use options here to translate only labels, not data.

operating instructions assumptions


 uvcopy t9write1u,fili1=tf/test100,filo1=/dev/rmt/nrtape2,uop=r40b400u2e2
 ========================================================================
 uop=q1a040b0400c040e2u2 - option defaults (for test/demo file)
       a999              - input recsize (exact if RSF, bigger if LST)
           b9999         - output blksize (may write short block at EOF)
                c999     - output recsize (must be submultiple of bksz)
                    e2   - translate data blocks to EBCDIC
                    e0   - do not translate data to EBCDIC
                      u2 - translate data blocks to UPPER
                      u0 - do not translate to UPPER case (unusual)
 User OPtion (uop) defaults  = q1a40b400c40e2u2
  null OK or re-specify (1 or more) --> a40b400c40 <-- enter rcsz/bksz/rcsz
 RSF = typ default fili1 - null accept or enter new typ ?
                                    -->            <-- null accept default

EOF fili1 100 rds, 0 wrts, 0 hits, 4000 size, fname=tf/test100 EOF filo1 0 rds, 10 wrts, 0 hits, 0 size, fname=/dev/nrStp2 EOF filo1 0 rds, 0 wrts, 0 hits, 0 size, fname=/dev/nrStp2

Goto:   Begin this document End this document UVSI Home-Page

E1. TAPEjobs.doc - read/write 9 track tapes - Customized versions

customized versions

The 9 track read/write jobs discussed so far are General-Purpose jobs, which can process any 9 track tape, but which require keyins for the filename, blocksize, translate options, etc.

The EBCDIC/ASCII translate option usually defaults to OFF, since the tape might have packed or binary fields requiring selective translate of just the character portions of each record.

For packed/binary fields, you would then need an additional customized job to perform these selective translates, either before the general purpose t9write job or after the t9copy job.

If you have this need on a recurring basis, you might want to combine the customized translates with the 9 track read/write job, to automate the process & eliminate the keyins required for the general purpose jobs.

Even if you do not have any packed fields, you may still want to customize the jobs to eliminate the keyins & embed the jobs within longer scripts.

Two examples will be given, using the uvadm/dat1/custmas1 demo file which has 256 byte records with packed fields in columns 121-240. See complete record layout in uvtrain.doc of volume 1.

E1. t9writeA - customized demo version of t9write1
- to write the uvadm/dat1/custmas file to 9 track tape
- 256 byte records, packed fields in columns 121-240
- will write standard labelled tape with blocksize 8192
  translating each record to EBCDIC (except for packed fields).
E1. t9copyA - customized demo version of t9copy1
- to read the standard labelled tape written by t9writeA
  & copy into the 'tmp' directory.
- translating each record to ASCII (except for packed fields).
Note
  • Please see listings of these jobs at the back of this section.

Goto:   Begin this document End this document UVSI Home-Page

F1. translating to ASCII, loading INDEXED files, reformatting

I suggest you load the mainframe data tapes into separate directories. which might be named from the tape VSN's or original mainframe disc VSN's. For example if you had 3 tapes PROD01, PROD02,& PROD03 you might setup directories as follows:

                      u2
                      |
                    PROD
                      |
     ------------------------- - - - - - -
     |          |           |           |
  PROD01      PROD02      PROD03       etc
 | | | | |   | | | | |   | | | | |   | | | |

Rather than load the mainframe data tapes directly into PROD01, PROD02,& PROD03; it would be better to load the tapes into temporary directories paralleling the intended final destinations. I suggest the following:

                    PROD
                      |
     ----------------------- - - - - - - - -----------------------
     |         |        |         |          |         |         |
  temp01    temp02   temp03       pf       PROD01    PROD02    PROD03
 | | | |   | | | |   | | | |   ||||||||   | | | |   | | | |   | | | |

This allows you to perform any required translations while copying the data files from the temporary directories to the final directories.

For files with no packed data, t9copy2 would have translated to ASCII, and if you determine there are no zoned signs to be corrected, then you can simply copy such files from temp?? to PROD?? (using UNIX 'cp').

The next few pages will present examples of using 'uvcp' & 'uvcopy' to translate files with packed data or zoned signs. You can use 'uvcp' for simple record layouts & specify all instructions on 1 command line. Uvcopy requires a separate parameter file (pf) to hold the instructions & the name of the prmfile is the only required item on the command line.

Because you may be repeating the data file transfers (when you go live after the testing period), it is better to use uvcopy & setup the parameter file for each data file requiring field level translates.

Goto:   Begin this document End this document UVSI Home-Page

F2. translating to ASCII, loading INDEXED files, reformatting

Some examples are given below, but also see the complete documentation for the 'uvcp' utility .

For the examples on the following pages, a test data file (tf3/glmasE) is supplied, & you can run them to get familiar with the 'uvcp' utility.

The test data file was created by the 'gentest1' job (see GENjobs.doc) & then translated to EBCDIC (opposite of EX#1 on the next page). The gentest1 job may also be of interest to you if you want to generate test files with packed data fields.

The layout of the tf3/glmasE file is as follows:

     001-008 - gl#
     009-009 - account type code (A,L,R,S,C,E,P)
     010-010 - delete code
     011-040 - description (assets,liabilities,etc)
     041-100 - this year - 12 x 5 byte packed fields
     101-160 - last year - 12 x 5 byte packed fields
     161-220 - budgets   - 12 x 5 byte packed fields
     221-255 - unused
     256-256 - linefeed for unix tools (packed fields may distort displays)

You can use the 'uvhd' hexdump utility to examine the input testfile & your output files from the various examples shown on the next page.


 uvhd tf3/glmasE       - display the input testfile in vertical hex
 ===============
                  1         2         3         4         5         6
         1234567890123456789012345678901234567890123456789012345678901234
       0 .........@.......@......@@@@@@@@@@@@@@@@........ ....0....@....P
         FFFFFFFFC4CEDDCDE4CEECEE4444444444444444001100012000130001400015
         10000100103499553012253200000000000000000000C0000C0000C0000C0000
      64 ....`....p........................ ....0....@....P....`....p....
         0001600017000180001900010000110001200013000140001500016000170001
         C0000C0000C0000C0000C0010C0010C0010C0010C0010C0010C0010C0010C001
     128 .................... ....0....@....P....`....p..................
         8000190001000011000120001300014000150001600017000180001900010000
         0C0010C0020C0020C0020C0020C0020C0020C0020C0020C0020C0020C0030C00
     192 ...... ....0....@....P....`.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.
         1100012000130001400015000160444444444444444444444444444444444440
         30C0030C0030C0030C0030C0030C00000000000000000000000000000000000A

If you have an mainframe background, you can read the above EBCDIC codes.

Of course when you run uvhd on the output files created by the test runs on the next page, you will be able to read the ASCII code easily.

Goto:   Begin this document End this document UVSI Home-Page

F3. translate to ASCII, load INDEXED files, REFORMAT - using 'uvcp'


 mkdir tmp              - make a directory to receive the output files
 =========

The output filename will be shown as gl1,gl2,gl3,etc in the examples.

When 2 lines are required, we will use the backslash\return convention, but you would key as all 1 long command.

The output type below will be shown as 'RST' or 'IST' (vs SFF) to put a linefeed in the last byte which is unused in our test file. This allows you to examine the output file with the editor, but you can not use this option if your data files do not have the last byte unused.

EX#1
  • copy the glmasE file translating display fields in 1-40 & 221-256,
    but not the packed data fields in 41-220
        uvcp "fili1=tf3/glmasE,rcs=256,typ=RSF,filo1=tmp/gl1,rcs=256,\
              typ=RST,tra=0(40)0,tra=220(35)220"
        ============================================================
                             - execute uvcp with required parameters
        vi   tmp/gl1         - examine results with the editor
        uvhd tmp/gl1         - examine results with the hexdump utility
EX#2
  • same as EX#1, but load an indexed file, with key1 1-8, & key2 11-40
       uvcp "fili1=tf3/glmasE,rcs=256,typ=RSF,filo1=tmp/gl2,rcs=256,\
             typ=IST,isk1=0(8),isk2=10(30),tra=0(40)0,tra=220(35)220"
        ============================================================
                             - execute uvcp with required parameters
        vi   tmp/gl2.DAT     - examine results with the editor (wont work)
        uvhd tmp/gl2.DAT     - examine results with the hexdump utility
EX#3
  • same as EX#2, but unpack the 36x5 byte packed fields to 36x10 byte
    display type fields in 41-400,& leave 401-512 blank
       uvcp "fili1=tf3/glmasE,rcs=256,typ=RSF,filo1=tmp/gl3,rcs=512,\
             typ=IST,isk1=0(8),isk2=10(30),tra=0(40)0,mvnx36=40(10z)40(5p)"
        ============================================================
                             - execute uvcp with required parameters
        uvhd tmp/gl3.DAT     - examine DATA  with the hexdump utility
        uvhd tmp/gl3.KEY     - examine INDEX with the hexdump utility

Goto:   Begin this document End this document UVSI Home-Page

F4. translating & reformatting records - using 'uvcopy' (vs uvcp)

The uvcopy utility is more appropriate for more complex conversions.

Uvcp has the advantage for simple jobs, because all instructions can be specified on the command line & no paramter file is required.

Uvcopy has the advantage for more complex jobs, because you can edit the instructions into a parameter file, which is easy to correct, if you do not get it right the 1st time.

EX#4
  • same as EX#3, but in uvcopy vs uvcp.
  1. edit the uvcopy instructions into a parameter file (pf/glmasx is supplied for your interest & test runs)

    # glmasx - convert the 'tf3/glmasE' test file (see TAPEjobs.doc)
    #        - translate EBCDIC to ASCII & unpack the 36 packed fields
    #          & load an indexed file (see record layout in TAPEjobs.doc)
    #
    fili1=tf3/glmasE,rcs=a256,typ=RSF
    filo1=tmp/gl3x,rcs=b512,typ=IST,isk1=0(8),isk2=10(30)
    @run
           opn    all
    loop   get    fili1,a0(256)
           skp>   eof
           mvc    b0(40),a0            move display data to output record
           tra    b0(40)               translate to ASCII
           mvnx36 b40(10z),a40(5p)     convert packed fields to display data
    #      ---    ----,----            could add more instructions here
           put    filo1,b0(512)        write record to output file
           skp    loop
    #
    eof    cls    all
           eoj

confirm results


 2.  uvcopy pf/glmasx             - execute the job
     ================
 3a. uvhd tmp/gl3x.DAT            - examine the output DATA partition
 3b. uvhd tmp/gl3x.KEY            - examine the output INDEXED partition
 4a. uvcp fili1=tmp/gl3x,rcs=512,typ=IST,filo1=tmp/gl3y,typ=RST
                                  - convert Indexed file to a text file
 4b.  vi tmp/gl3y                 - examine text file with editor

Goto:   Begin this document End this document UVSI Home-Page

G1. correcting signs of zoned numeric fields translated to ASCII

Two methods of transferring 9 track data files to UNIX have been discussed.

TIP/ix 'fcsload' requires COBOL copy book record definitions, and it therefore knows the location of signed unpacked numeric fields and can convert any zone signed units digits correctly.

The Vancouver Utility job 't9copy2' can be used to restore data tapes when COBOL copy books are not available.

If packed fields are present, use option a0 to inhibit translate,& selectively translate, as has already been discussed.

This sub-section explains how to correct any files that have been restored by t9copy2 & have signed unpacked fields.

Data type code 'zx' of the 'mvn' instruction is provided to correct the units position of numeric zoned (unpacked) fields that have been translated from EBCDIC to ASCII without allowing for zoned signs.

      EBCDIC zone + sign is x'C0', + 0123456789 becomes {ABCDEFGHI
      EBCDIC zone - sign is x'D0', - 0123456789 becomes }JKLMNOPQR

Code 'x' converts positive units digits to 0123456789 (numeric zones) but negative units digit depends on whether the uvcp/uvcopy/uvsort utility has been generated with DISAM for Microfocus COBOL or not since conventions are different for Microfocus COBOL & MBP COBOL

      Microfocus zone - sign is x'70', - 0123456789 becomes pqrstuvwxy
      MBP COBOL zoned - sign is x'40', - 0123456789 becomes @ABCDEFGHI

Goto:   Begin this document End this document UVSI Home-Page

G2. correcting signs of zoned numeric fields translated to ASCII

A good example of a file with signed zoned numerics translated to ASCII is the dat1/sales1 file shown in the uvtrain.doc section of volume 1, and a few records are shown below.

 Note the units digit of QTY & QMOUNT are:  +0 +1 +9 -0 -1 -9

sample file with signed numerics translated to ASCII

          1         2         3         4         5         6
 1234567890123456789012345678901234567890123456789012345678901234
 CUST#    SLM  DATE   INV#     PROD#     QTY   PRICE    AMOUNT
 130140    21 940802 IN111001  HAM001  00002{ 0000001 00000002{
 130140    21 940802 IN111001  SCR012  00002A 0001001 00002102A
 223240    65 940816 IN441     BIT001  00002I 0009001 00026102I
 308685    75 940812 IN6605    SAW001  00001} 0000001 00000001}
 308685    75 940812 IN6605    WID115  00001J 0001001 00001101J
 406082    65 940816 IN441     HAM001  00001R 0009001 00017101R

sample file - after correction for Microfocus COBOL

 130140    21 940802 IN111001  HAM001  000020 0000001 000000020
 130140    21 940802 IN111001  SCR012  000021 0001001 000021021
 223240    65 940816 IN441     BIT001  000029 0009001 000261029
 308685    75 940812 IN6605    SAW001  00001p 0000001 00000001p
 308685    75 940812 IN6605    WID115  00001q 0001001 00001101q
 406082    65 940816 IN441     HAM001  00001y 0009001 00017101y

sample file - after correction for MBP COBOL

 130140    21 940802 IN111001  HAM001  000020 0000001 000000020
 130140    21 940802 IN111001  SCR012  000021 0001001 000021021
 223240    65 940816 IN441     BIT001  000029 0009001 000261029
 308685    75 940812 IN6605    SAW001  00001@ 0000001 00000001@
 308685    75 940812 IN6605    WID115  00001A 0001001 00001101A
 406082    65 940816 IN441     HAM001  00001I 0009001 00017101I

The units digits could be corrected with either 'uvcp' or 'uvcopy' & both solutions are illustrated on the next page.

Goto:   Begin this document End this document UVSI Home-Page

G3. correcting signs of zoned numeric fields translated to ASCII

The following sample solutions assume the input file is 'sales1' in the 'DATA' directory & that we will make the corrections while copying over to a 'tmp' directory.

sample correction of signed unpacked fields with 'uvcp'


       uvcp "fili1=DATA/sales1,rcs=64,typ=RSF,filo1=tmp/sales1,
       ======================================================
                            mvn=38(6)38(6zx),mvn=53(9)53(9zx)"
                            ==================================

sample correction of signed unpacked fields with 'uvcopy'

 # slcnv1  - correct signed digits of unpacked fields in sales1'
 #         - converting EBCDIC zone signs to ASCII zone signs
 opr='$jobname - correct signed digits of unpacked fields in sales1'
 fili1=?DATA/sales1,rcs=64,typ=RSF
 filo1=?tmp/sales1,rcs=64,typ=RSF
 @run
        opn    all
 loop   get    fili1,a0(64)
        skp>   eof
        mvc    b0(64),a0
 #
        mvn    b38(6),a38(6zx)
        mvn    b45(7),a45(7zx)
        mvn    b53(9),a53(9zx)
 #
        put    filo1,b0(64)
        skp    loop
 #
 eof    cls    all
        eoj

After verifying the results (with uvhd) you could copy the output file back to the original directory.

note
  • it would be easier to use the special translate table provided
    for correction of zoned signed numeric fields translated from
    EBCDIC without any special consideration.
        trt    b38(24),$trts         correct zoned signs cols
                                     anywhere in cols 39-62

Goto:   Begin this document End this document UVSI Home-Page

H1. IBMtape1 - convert EBCDIC std lbl tape to ASCII disc file

IBMtape1 functions

Bypasses standard labels, with option to display on console & option to display 1st 64 bytes of each data block.

Translates data from EBCDIC to ASCII, but option to inhibit in case of packed/binary data fields present.

Use the translate inhibit option if variable length records since the block & record size prefixes are binary (see the follow-on job IBMvarfix1 for variable length processing)

Checks block count in the EOF1 label to the actual counted & reports any difference

Handles any block size up to 32,768 Default option b0 uses the block size from the HDR2 label to read data blocks but could use b32768 for tape drives that stop at the gap or for variable length tape files See subsections I,J,K in section DATAtrsfr.doc for more details on tape drive types, option b,& multifile tape formats.

Processes only the 1st data file on a standard labelled tape (for multi-file tape see the 't9copy2' job in DATAtrsfr.doc)

IBMtape1 applicability

Most of the 9 track tape files formerly used on mainframe systems probably will be redesigned to disc files on the UNIX system, because UNIX cobol programs can not read or write 9 track tapes & even if they could, you probably do not want to maintain EBCDIC standard labelled tapes on UNIX.

The IBMtape1 job is intended for tape files from outside sources, such as IBM mainframes that transfer data to your system.

You would insert this uvcopy job into the converted script just prior to the cobol program that was used to input the 9 track tape on the mainframe.

If the tape were formerly copied to disc with the mainframe DATA utility, then this job will replace the DATA utility (which would have been converted to the 'cp' or 'uvcp' utility by the jclunix converter.

The next page will illustrate the following:

1 - an mainframe cobol job that formerly read a 9 track tape 2 - the equivalent script after conversion to UNIX by jclunix 3 - the modified script after editing to insert the IBMtape1 job

Goto:   Begin this document End this document UVSI Home-Page

H2. IBMtape1 example - original mainframe JCL

// JOB IBMTAPE // JNOTE 'DEMO IBMTAPE1 JOB TO INPUT EBCDIC STD LBLS ON UNIX' // DVC 90 // LFD TAPEIN // DVC RUN // LBL DATAFILE2 // LFD OUTPUT,,INIT // EXEC COBOL9 /&

IBMtape1 example - after conversion by jclunix

 #JOB ibmtape
 DX="cobx1/";DP=tmp;DC=tmp;DW=wrk;D1=tf;
 echo "DEMO IBMTAPE1 JOB TO INPUT EBCDIC STD LBLS ON UNIX"
 tapein=/dev/nrtape2; export tapein
 output=$DW/datafile2; export output
 #EXEC COBOL9
 ${DX}cobol9
 if [ $? -gt 0 ] ;then read r?"ERR step 1 - kill or continue";fi
 echo "..... cobol9 completed: `date` "
 #----------------- end step# 01 cobol9 -----------------
 echo "***** job IBMTAPE completed: `date` "
 exit 0

IBMtape1 example - after manual editing to insert IBMtape1 step

 #JOB ibmtape
 DX="cobx/1";DP=tmp;DC=tmp;DW=wrk;D1=tf;
 echo "DEMO IBMTAPE1 JOB TO INPUT EBCDIC STD LBLS ON UNIX"
 #
 fili1=/dev/nrtape2; export fili1                             <-- inserted
 filo1=$DW/datafile1; export filo1                          <-- inserted
 uvcopy IBMtape1,fili1=,filo1=,uop=q0a1d1                   <-- inserted
 #
 tapein=$DW/datafile1; export tapein                        <-- modified
 output=$DW/datafile2; export output                        <-- modified
 #EXEC COBOL9
 ${DX}cobol9
 if [ $? -gt 0 ] ;then read r?"ERR step 1 - kill or continue";fi
 echo "..... cobol9 completed: `date` "
 #----------------- end step# 01 cobol9 -----------------
 echo "***** job IBMTAPE completed: `date` "
 exit 0
note
  • re the 'fili1=,filo1=,' on the uvcopy command line
  • equating fili1 & filo1 to null causes the uvcopy utility to use
    the environmental values which are set by the prior equates.

Goto:   Begin this document End this document UVSI Home-Page

H3. customized tape input - for packed data or record reformatting

IBMtape1 is a general purpose job that can be used to input any EBCDIC standard labelled tape that does not contain packed or binary fields.

If you have a tape with packed data, it is probably easier to use the IBMtape1 job with the 'no translate' to ASCII option & then write a subsequent uvcopy job to translate only the character data fields.

For simple record layouts, you would use the 'uvcp' utility because you can specify all instructions on the command line, rather than requiring a separate parameter file as does uvcopy.

Of course when the record layout is complex (ie the packed fields are not in contiguous groups), then it is better to use uvcopy & a separate parameter file in which you can code multiple instructions more easily.

Two examples of using uvcp for simple record layouts are presented below. For complex record layouts, please see the examples in section uvcopy4.doc - especially sample jobs 'cnvtcm' & 'cnvtgl'.

             example #1 - inputting IBM tapes with packed data
             -------------------------------------------------
given
  • IBM std lbl tape rcsz=160 & record layout as folows:
    001-100 - character data
    101-160 - 12 x 5 byte packed decimal fields
 required- convert the tape to a disc file translating the character
           data to ASCII, but not the packed data.

solution


 1. uvcopy IBMtape1,fili1=/dev/rmt/nrtape2,filo1=ebcdic,uop=q0a0b0d1
    ================================================================

 2. uvcp "fili1=ebcdic,rcs=160,typ=RSF,filo1=ascii,tra=0(100)"
    ==========================================================

Goto:   Begin this document End this document UVSI Home-Page

H4. example #2 - inputting IBM tapes with packed data & reformatting

given
  • IBM std lbl tape rcsz=160 (same as in example #1)
    001-100 - character data
    101-160 - 12 x 5 byte packed decimal fields
 required- convert the tape to a disc file translating the character
           data to ASCII, but not the packed data.
         - convert the packed fields to unpacked (ASCII zoned numeric)
           allowing 10 bytes output for each 5 byte input field
           (with the sign in a separate leading byte)
     note- the output record size will be 220 bytes
         - the 12 x 5 byte packed fields in 101-160 will now be
           12 x 10 = 120 bytes in columns 101-220

solution


 1. uvcopy IBMtape1,fili1=/dev/rmt/nrtape2,filo1=e,uop=q0a0b0d1
    ===========================================================
  1. uvcp "fili1=ebcdic,rcs=160,typ=RSF,filo1=ascii,rcs=220,\ tra=0(100),mvnx12=100(5p)100(-10z)" ===================================

Goto:   Begin this document End this document UVSI Home-Page

I1. IBMvarfix1 - convert variable length records to fixed length

This job would follow the IBMtape1 job (previously presented), when the tape was in variable length format.

IBM standard variable length tapes have binary block & record prefixes & you must not have used the translate to ASCII option in IBMtape1, since that would destroy the binary prefixes.

This job will strip out the block & record prefixes, converting the file to a fixed length specified by the operator. The length should be at least as long as the longest record in the file & any shorter records will be blank padded on the right.

You can use the translate to ASCII option in this job, if you know that the records do not have any packed or binary fields (other than the prefixes which are dropped here).

If the records do have packed fields, then you should specify no translate here & use a subsequent uvcp or uvcopy job to translate the records (non-packed areas only).

For simple record layouts (where packed fields are contiguous), see the 'uvcp' examples in the IBMtape1 job documentaion. For complex record layouts (where packed & character fields are intermixed), see the following uvcopy example 'IBMtranfix1'.

The following pages will present:

1 - operating instructions for IBMvarfix1 & IBMtranfix1 2 - listing of the IBMvarfix1 job 3 - listing of the IBMtranfix1 job

note
  • IBMtape1 (previously presented) & IBMvarfix1 are general purpose
    jobs that apply to any IBM tape & variable length tape.

Goto:   Begin this document End this document UVSI Home-Page

I2. IBMvarfix1 & IBMtranfix1 - Op. Instrns. & example of use

given
  • IBM standard variable length tape (block size max 32,768)
  • packed fields are present in the records
    (see layout in IBMtranfix1 job listing a few pages ahead)
required
  • convrt to fixed length records of 348 bytes (using IBMvarfix1)
  • follow on job IBMtranfix1 will translate to ASCII
note1
  • base/fixed portion of record is known to be 348 bytes
  • we might be dropping off a variable no of 'occurs depending on'
    fields (such as legal descriptions in a tax file, etc)
  • or we might be converting a file in variable length format, but
    in fact all records are the same size
note2
  • for completeness, operating instructions for all 3 jobs involved
    are given below.

 1. uvcopy IBMtape1,fili1=/dev/rmt/nrtape2,filo1=ebcdic1,uop=q0a0b0d1
    =================================================================

 2. uvcopy IBMvarfix1,fili1=ebcdic1,filo1=ebcdic2,uop=q0a0r348
    ==========================================================

 3. uvcopy IBMtranfix1,fili1=ebcdic2,filo1=ascii1
    =============================================
note
  • you do not need to enter the full commands as shown above.
  • if preferred, you can enter only 'uvcopy' + the jobname
    & you will be prompted for the filenames & options.

Goto:   Begin this document End this document UVSI Home-Page

K1. uvcopy jobs used in this section

The uvcopy jobs referenced in this section are summarized on this page, All jobs are included in the uvadm/pf directory & you can inspect or print:

 vi pf/t9list1          <-- inspect with 'vi'
 uvlp12 pf/t9list1      <-- print with uvlp12 (or lp)
t9list1
  • investigate any kind of tape, labelled or unlabelled
  • option to translate EBCDIC to ASCII
  • displays block#, block size,& 1st 60 bytes of each data block
t9list2
  • investigate EBCDIC std lbl 9 track tapes
  • displays the std lbls & optionally 1st 64 of each data block
    expects: VOL1,HDR1,HDR2,TM,..data..,TM,EOF1,EOF2,TM,--etc--
  • NOT listed here, but available in the uvadm/pf directory
t9list3
  • list STANDARD LABELLED 9 track mag tape
  • creates a report file for listing on laser or line printer
  • lists records in 100 byte segments if rcsz > 100
  • options to print 1st so many blocks or records
t9list4
  • list UNLABELLED 9 track mag tape
  • creates a report file for listing on laser or line printer
  • options to specify block size & record size if known
t9copy1
  • select & copy any 1 file from a multi-file std lbl tape
  • includes the same options as for t9copy2 (see below)
t9copy1u
  • copy unlabelled 9 track tape file(s) to disc
  • options to translate EBCDIC to ASCII
  • displays 1st 64 bytes of 1st block & prompts for out filename
t9copy2
  • copy all files from a multi-file std lbl tape to a directory
  • options to display labels & 1st 64 bytes of data blocks
  • options to translate EBCDIC to ASCII or not, or conditional
    translate to ASCII if no packed or binary data is found.
  • default option is no translate (which would require following
    separate translate jobs depending on record layouts)
t9copy3
  • interactive copy files from EBCDIC standard labelled tape
    to a UNIX directory with translation to ASCII
  • displays each HDR1 label & prompts for copy/bypass y/n ?

Goto:   Begin this document End this document UVSI Home-Page

K2. uvcopy jobs used in this section - continued

t9write1
  • write 1 file to std lbl 9 track tape (allows multi-volumes)
    to send files to outside agencies requiring std lbls
  • options for rcsz/blksz, translate to EBCDIC/UPPER case
  • enhanced to display existing labels, before overwrite
  • test tape status & prompt tp put online (bombs if not online)
  • At end each volume, prompts to mount next volume
  • display record & block counts for each volume & in total
t9write2
  • write multi-part files to std lbl tapes (allow multi-volumes)
  • multi-part files are same data, spread over multi-files
    maybe because too big for 1 file
  • Before running the job, you must pre-edit a file with the
    filenames of the multi-parts (max 100 filenames).
t9write3
  • write multiple files to standard labelled 9 track tape
    to send files to outside agencies requiring std lbls
  • guided by a control file that contains the filenames
    of the files to be written & the desired record size,
    block size,& options to translate to UPPER &/or EBCDIC
t9write1u
  • write 1 file to standard labelled 9 track tape
  • options for rcsz/blksz, translate to EBCDIC/UPPER case
t9writeA
  • customized demo version of t9write1
  • to write the uvadm/dat1/custmas file to 9 track tape
  • 256 byte records, packed fields in columns 121-240
  • will write standard labelled tape with blocksize 8192
    translating each record to EBCDIC (except for packed fields).
t9copyA
  • customized demo version of t9copy1
  • to read the standard labelled tape written by t9writeA
  • translating each record to ASCII (except for packed fields).
IBMtape1
  • job to convert EBCDIC standard labelled tapes to ASCII
    to replace mainframe DATA utilities or front-end cobol programs
    that formerly read the tape directly.
IBMvarfix1
  • job required when for tapes with variable length records.
    follows the IBMtape1 job to strip out the variable length
    prefixes converting the file to fixed length records.
    option to translate to ASCII, but this cannot be done yet
    if any packed fields are present.
 IBMtranfix1- this is an example of a follow on custom job
              to translate a particular record layout to ASCII.

Goto:   Begin this document End this document UVSI Home-Page

Visitor Counters for ThisYear and LastYear