Example of a negative offset
If your copybook defined its fields as:
Ref Field Name Picture Type Start End Length
1 1 REC-TYPE02 AN 1 84 84
2 2 REC-RDW 9(8) BI 1 4 4
3 2 REC-TYPE XX AN 5 6 2
4 2 NAME X(20) AN 7 26 20
5 2 JOB-TITLE X(14) AN 27 40 14
6 2 ADDR1 X(20) AN 41 60 20
7 2 ADDR2 X(20) AN 61 80 20
8 2 POSTCODE X(4) AN 81 84 4
**** End of data ****
and your data records, without a template, consisted of:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---
02Grant Smith Developer 22 Montrose St Thornlie 614
02Andrew Apple Developer 44 Eagle Rise Riverton 613
02Graham Prestcott Developer 256 Hay St Cannington 602
02Bill Somers Developer 84 Murchison Rd Dianella 456
02Ted Dexter Developer 92 Smith St Belmont 620
02Roddy Armstrong Manager 184 Alexander Dve Swan View 613
applying the template generated from this copybook would display your data as:
REC-RDW REC-TYPE NAME JOB-TITLE ADDR1
#2 #3 #4 #5 #6
BI 1:4 AN 5:2 AN 7:20 AN 27:14 AN 41:20
<---+----1> <> <---+----1----+----> <---+----1---> <---+----1----+---->
**** Top of data ****
-252524647 an t Smith Deve loper 22 Montrose St Thor
-252526187 dr ew Apple Deve loper 44 Eagle Rise Rive
-252524647 ah am Prestcott Deve loper 256 Hay St Cann
-252525943 ll Somers Deve loper 84 Murchison Rd Dian
-252517499 d Dexter Deve loper 92 Smith St Belm
-252520042 dd y Armstrong Mana ger 184 Alexander Dve Swan
By adjusting the template with an offset of -4, the records would display as:
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#3 #4 #5 #6 #7 +
AN 1:2 AN 3:20 AN 23:14 AN 37:20 AN 57:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
**** Top of data ****
02 Grant Smith Developer 22 Montrose St Thornlie
02 Andrew Apple Developer 44 Eagle Rise Riverton
02 Graham Prestcott Developer 256 Hay St Cannington
02 Bill Somers Developer 84 Murchison Rd Dianella
02 Ted Dexter Developer 92 Smith St Belmont
02 Roddy Armstrong Manager 184 Alexander Dve Swan View