Example of a positive offset
If your copybook defined its fields as:
Ref Field Name Picture Type Start End Length
1 1 REC-TYPE02 AN 1 80 80
2 2 REC-TYPE XX AN 1 2 2
3 2 NAME X(20) AN 3 22 20
4 2 JOB-TITLE X(14) AN 23 36 14
5 2 ADDR1 X(20) AN 37 56 20
6 2 ADDR2 X(20) AN 57 76 20
7 2 POSTCODE X(4) AN 77 80 4
**** End of data ****
and your data records, without a template, consisted of (note the header information in bold):
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---
000000000102Grant Smith Developer 22 Montrose St Thornlie
000000000202Andrew Apple Developer 44 Eagle Rise Riverton
000000000302Graham Prestcott Developer 256 Hay St Cannington
000000000402Bill Somers Developer 84 Murchison Rd Dianella
000000000502Ted Dexter Developer 92 Smith St Belmont
000000000602Roddy Armstrong Manager 184 Alexander Dve Swan View
applying the template generated from this copybook would display your data as:
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#2 #3 #4 #5 #6 +
AN 1:2 AN 3:20 AN 23:14 AN 37:20 AN 57:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
00 0000000102Grant Smit h Deve loper 22 Montro se St Th
00 0000000202Andrew App le Deve loper 44 Eagle Rise Ri
00 0000000302Graham Pre stcott Deve loper 256 Hay St Ca
00 0000000402Bill Somer s Deve loper 84 Murchi son Rd Di
00 0000000502Ted Dexter Deve loper 92 Smith St Be
00 0000000602Roddy Arms trong Mana ger 184 Alexan der Dve Sw
By adjusting the template with an offset of 10, the records would display as:
REC-TYPE NAME JOB-TITLE ADDR1 ADDR2
#2 #3 #4 #5 #6 +
AN 11:2 AN 13:20 AN 33:14 AN 47:20 AN 67:20
<> <---+----1----+----> <---+----1---> <---+----1----+----> <---+----1--
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