Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Conversion of a noncataloged tape file to disk

&pagelevel(3)&pagelevel

Input:

SAM file PERS.TA on tape

Output:

  • ISAM file PERS.TAB
    The ISAM record key is created with the record counter.
    The output records are restructured.

  • Output to SYSLST
    All the records containing C’MANCHESTER’, starting from column 29, are selected for printer output.

Tracer listing:

/EXPORT-FILE FILE=*NAME(FILE-NAME=PERS.TA)
/IMPORT-FILE - &* —————————————————————————————————————————————————————————  (1)
/   SUPPORT=*TAPE(FILE-NAME=PERS.TA,-
/                 VOLUME=FK0090,DEVICE-TYPE=TAPE-C4)
/ADD-FILE-LINK -
/   FILE-NAME=PERS.TA,-
/   SUPPORT=*TAPE,-
/   LINK-NAME=IN
/CREATE-FILE FILE-NAME=PERS.TAB &* ————————————————————————————————————————  (2)
/ADD-FILE-LINK -
/   FILE-NAME=PERS.TAB,-
/   RECORD-FORMAT=*FIXED,RECORD-SIZE=82,-
/   SUPPORT=*DISK,-
/   LINK-NAME=OUT1
/START-PERCON &* ——————————————————————————————————————————————————————————  (3)
//ASSIGN-INPUT-FILE - &* ——————————————————————————————————————————————————  (4)
//   FILE=*TAPE-FILE(NAME=PERS.TA),-
//   LINK-NAME=IN
//ASSIGN-OUTPUT-FILE - &*——————————————————————————————————————————————————  (5)
//   FILE=*DISK-FILE(NAME=PERS.TAB),-
//   LINK-NAME=OUT1
//ASSIGN-OUTPUT-FILE - &* —————————————————————————————————————————————————  (6)
//   FILE=*SYSLST,-
//   LINK-NAME=OUT2

(1)

The noncataloged tape file PERS.TA with its attributes is assigned.

(2)

The output file PERS.TAB with its attributes is assigned.

(3)

PERCON is called.

(4)

The noncataloged tape file PERS.TA is assigned.

(5)

The output file PERS.TAB is assigned with the link name OUT1.

(6)

The printer output file is assigned with the link name OUT2.

//SET-RECORD-MAPPING -
//   OUTPUT-LINK-NAME=OUT1,- &* ———————————————————————————————————————————  (7)
//   OUTPUT-FIELDS=(-
//      *RECORD-COUNTER(-
//            LINK-NAME=OUT1,-
//            OUTPUT-POSITION=1,-
//            OUTPUT-LENGTH=8,-
//            OUTPUT-FORMAT=*ZONED-DECIMAL),-
//      '|'   (OUTPUT-POSITION=10),-
//      *FIELD(INPUT-POSITION=5,-
//             INPUT-LENGTH=10,-
//             OUTPUT-POSITION=12),-
//      '|'(OUTPUT-POSITION=24),-
//      *FIELD(INPUT-POSITION=17,-
//             INPUT-LENGTH=10,-
//             OUTPUT-POSITION=26),-
//      '|'(OUTPUT-POSITION=37),-
//      *FIELD(INPUT-POSITION=29,-
//             INPUT-LENGTH=10,-
//             OUTPUT-POSITION=39),-
//      '|'(OUTPUT-POSITION=51),-
//      *FIELD(INPUT-POSITION=44,-
//             INPUT-LENGTH=20,-
//             OUTPUT-POSITION=53),-
//      '|'(OUTPUT-POSITION=75),-
//      *FIELD(INPUT-POSITION=69,-
//             INPUT-LENGTH=4,-
//             OUTPUT-POSITION=77),-
//      '|'(OUTPUT-POSITION=82))
//SELECT-INPUT-RECORDS - &* ——————————————————————————————————————————————  (8)
//   OUTPUT-LINK-NAME=OUT2,- 
//   CONDITION=((29,10)=C'MANCHESTER')
//END &* —————————————————————————————————————————————————————————————————  (9)
%  DMS0DE3 TAPE WITH VSN FK0090 FOR FILE :catid:$userid.PERS.TA IS    ———— (10)
           MOUNTED ON DEVICE AF
%  DMS0DE7 SAM FILE CLOSED: FILE NAME=:catid:$userid.PERS.TA, LINKNAME=IN,
           BLOCK COUNT=000001 ———————————————————————————————————————————— (11)

(7)

The SET-RECORD-MAPPING statement transfers the record counter and selected fields of the input record to the output record.

(8)

The SELECT-INPUT-RECORDS statement selects all the records containing C’MANCHESTER’ as of column 29. The records are transferred to the print file with the link name OUT2.

(9)

The END statement starts the transfer operation and terminates PERCON.

(10)

DMS message: the tape with the volume serial number FK0090, which contains the input file, has been mounted.

(11)

DMS message: the SAM file PERS.TA has been closed.

%  PER0030 NUMBER OF PROCESSED RECORDS FOR LINK=IN (FILE=PERS.TA):    12 (12)
%  PER0030 NUMBER OF PROCESSED RECORDS FOR LINK=OUT1 (FILE=PERS.TAB):   12
%  PER0030 NUMBER OF PROCESSED RECORDS FOR LINK=OUT2  :          7
%  PER0031 PERCON TERMINATED NORMALLY ————————————————————————————————— (13)

(12)

PERCON messages: the number of records transferred per file is output. The files are listed with their link and file names.

(13)

PERCON was terminated normally.

Printout of the file PERS.TAB
00000000 | BELL        | JOHN       | MANCHESTER  | BOLSOVER STREET 4     | DPT1 |
00000001 | BOTHAM      | NORMAN     | MANCHESTER  | TOWER AVENUE 10       | DPT2 |
00000002 | FINN        | SUSANNA    | NORWICH     | ROSE STREET 11        | DPT2 |
00000003 | GREENE      | WALTER     | BURY        | SINCLAIR CRESCENT 7   | DPT1 |
00000004 | KING        | MONICA     | FALMOUTH    | INMAN SQUARE 61       | DPT3 |
00000005 | LAKER       | ERICA      | MANCHESTER  | BANK DRIVE 8          | DPT1 |
00000006 | PRICE       | ALFRED     | MANCHESTER  | THAMES ROAD 4         | DPT1 |
00000007 | WILSON      | RICHARD    | MANCHESTER  | ACACIA AVENUE 24      | DPT3 |
00000008 | BATES       | FRANK      | HULL        | WOOD STREET 29        | DPT4 |
00000009 | HARRISON    | MAURICE    | MANCHESTER  | SINCLAIR STREET 149   | DPT4 |
00000010 | ROYCE       | ROBERT     | MANCHESTER  | LION'S GATE 74        | DPT4 |
00000011 | SIMPSON     | ELLEN      | KINGS LYNN  | WILLOUGHBY STREET 8   | DPT4 | 
Printout of the selected records
BELL        JOHN        MANCHESTER     BOLSOVER STREET 4        DPT1 
BOTHAM      NORMAN      MANCHESTER     TOWER AVENUE 10          DPT2 
LAKER       ERICA       MANCHESTER     BANK DRIVE 8             DPT1 
PRICE       ALFRED      MANCHESTER     THAMES ROAD 4            DPT1 
WILSON      RICHARD     MANCHESTER     ACACIA AVENUE 24         DPT3 
HARRISON    MAURICE     MANCHESTER     SINCLAIR STREET 149      DPT4 
ROYCE       ROBERT      MANCHESTER     LION'S GATE 74           DPT4