ecometry 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "minitest", ">= 0"
10
+ gem "rdoc", "~> 3.12"
11
+ gem "bundler"
12
+ gem "jeweler", "~> 1.8.3"
13
+ gem "simplecov", ">= 0"
14
+ end
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Brian
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,9 @@
1
+ = ecometry
2
+
3
+ Gem for writing an Ecometry batch file ('tapemacs' format)
4
+
5
+ == Copyright
6
+
7
+ Copyright (c) 2012 Brian. See LICENSE.txt for
8
+ further details.
9
+
@@ -0,0 +1,44 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake/dsl_definition'
13
+ require 'rake'
14
+
15
+ require 'jeweler'
16
+ Jeweler::Tasks.new do |gem|
17
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
18
+ gem.name = "ecometry"
19
+ gem.homepage = "http://github.com/brianjolly/ecometry"
20
+ gem.license = "MIT"
21
+ gem.summary = %Q{Tool for creating Ecometry batch files}
22
+ gem.description = %Q{Tool for creating Ecometry batch files}
23
+ gem.email = "brian@brianjolly.com"
24
+ gem.authors = ["Brian"]
25
+ # dependencies defined in Gemfile
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+ require 'rdoc/task'
37
+ Rake::RDocTask.new do |rdoc|
38
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
39
+
40
+ rdoc.rdoc_dir = 'rdoc'
41
+ rdoc.title = "ecometry #{version}"
42
+ rdoc.rdoc_files.include('README*')
43
+ rdoc.rdoc_files.include('lib/**/*.rb')
44
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
@@ -0,0 +1,62 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "ecometry"
8
+ s.version = "0.0.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Brian"]
12
+ s.date = "2012-04-10"
13
+ s.description = "Tool for creating Ecometry batch files"
14
+ s.email = "brian@brianjolly.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "ecometry.gemspec",
27
+ "lib/ecometry.rb",
28
+ "lib/layout.rb",
29
+ "test/helper.rb",
30
+ "test/test_ecometry.rb"
31
+ ]
32
+ s.homepage = "http://github.com/brianjolly/ecometry"
33
+ s.licenses = ["MIT"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = "1.8.10"
36
+ s.summary = "Tool for creating Ecometry batch files"
37
+
38
+ if s.respond_to? :specification_version then
39
+ s.specification_version = 3
40
+
41
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
+ s.add_development_dependency(%q<minitest>, [">= 0"])
43
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
44
+ s.add_development_dependency(%q<bundler>, [">= 0"])
45
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
46
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
47
+ else
48
+ s.add_dependency(%q<minitest>, [">= 0"])
49
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
50
+ s.add_dependency(%q<bundler>, [">= 0"])
51
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
52
+ s.add_dependency(%q<simplecov>, [">= 0"])
53
+ end
54
+ else
55
+ s.add_dependency(%q<minitest>, [">= 0"])
56
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
57
+ s.add_dependency(%q<bundler>, [">= 0"])
58
+ s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
59
+ s.add_dependency(%q<simplecov>, [">= 0"])
60
+ end
61
+ end
62
+
@@ -0,0 +1,94 @@
1
+ require_relative 'layout'
2
+
3
+ class Ecometry
4
+ def to_tapemacs fields
5
+ fields.collect do |field|
6
+ format field
7
+ end.join
8
+ end
9
+
10
+ def insert fields, record
11
+ result = String.new(record)
12
+
13
+ fields.each do |field|
14
+ position = get_position_for field
15
+ position_start = position.min
16
+ formatted_field = format field
17
+
18
+ result.slice! position
19
+ result.insert position_start, formatted_field
20
+ end
21
+ result
22
+ end
23
+
24
+ def position_length_of position
25
+ position.max - position.min
26
+ end
27
+
28
+ def get_position_for field
29
+ key = field[0]
30
+ if key && @layout[key]
31
+ r = @layout[key][:position]
32
+ Range.new r.min - 1, r.max - 1
33
+ else
34
+ raise "Position not found for #{key}"
35
+ end
36
+ end
37
+
38
+ def get_format_for field
39
+ key = field[0]
40
+ if key && @layout[key]
41
+ format_factory @layout[key][:format]
42
+ else
43
+ raise "Format not found for #{key}"
44
+ end
45
+ end
46
+
47
+ def format field
48
+ value = field[1]
49
+ format = get_format_for field
50
+
51
+ if value.length > format[:width]
52
+ raise "The value #{value} is longer than it's format allows"
53
+ end
54
+
55
+ case format[:justified]
56
+ when :right
57
+ value = value.rjust format[:width], format[:filler]
58
+ when :left
59
+ value = value.ljust format[:width], format[:filler]
60
+ end
61
+ value
62
+ end
63
+
64
+
65
+ # Known formats
66
+ # X(n), 9(n), 9(4)v9(2), 9(4)v99
67
+ def format_factory format_code
68
+ format = {}
69
+
70
+ widths = format_code.scan /\((\d+)\)/
71
+ width = widths.flatten.inject(0){ |sum,x| sum.to_i + x.to_i }
72
+
73
+ extra_width = !!(format_code.match /v99/ )
74
+ if extra_width; width += 1 end
75
+
76
+ format[:width] = width
77
+
78
+ is_numeric = !!(format_code.match /^9/ )
79
+
80
+ if is_numeric
81
+ format[:justified] = :right
82
+ format[:filler] = '0'
83
+ else
84
+ format[:justified] = :left
85
+ format[:filler] = ' '
86
+ end
87
+
88
+ format
89
+ end
90
+
91
+ def initialize
92
+ load_layout
93
+ end
94
+ end
@@ -0,0 +1,2374 @@
1
+ class Ecometry
2
+ def load_layout
3
+ @layout = {
4
+ :tf00_record_type => {
5
+ :description => "Record Type 00: Batch header (1 per batch)",
6
+ :format => "X(2)",
7
+ :length => 2,
8
+ :position => (1..2),
9
+ :required => true,
10
+ :required_once => false
11
+ },
12
+ :tf00_batch_date => {
13
+ :description => "Creation date of batch (yymmdd)",
14
+ :format => "9(6)",
15
+ :length => 6,
16
+ :position => (3..8),
17
+ :required => true,
18
+ :required_once => false
19
+ },
20
+ :tf00_batch_number => {
21
+ :description => "Control number assign by telemarketing company (increment for each batch)",
22
+ :format => "9(8)",
23
+ :length => 8,
24
+ :position => (9..16),
25
+ :required => false,
26
+ :required_once => false
27
+ },
28
+ :tf00_record_count => {
29
+ :description => "Total number of records",
30
+ :format => "9(8)",
31
+ :length => 8,
32
+ :position => (17..24),
33
+ :required => true,
34
+ :required_once => false
35
+ },
36
+ :tf00_club_order_type => {
37
+ :description => "Clubs order type",
38
+ :format => "X(1)",
39
+ :length => 1,
40
+ :position => (25..25),
41
+ :required => false,
42
+ :required_once => false
43
+ },
44
+ :tf00_filler => {
45
+ :description => "Spaces",
46
+ :format => "X(295)",
47
+ :length => 1,
48
+ :position => (26..320),
49
+ :required => false,
50
+ :required_once => false
51
+ },
52
+ :tf10_rec_type => {
53
+ :description => "Record Type 10: Buyer information (1 per order)",
54
+ :format => "X(2)",
55
+ :length => 2,
56
+ :position => (1..2),
57
+ :required => true,
58
+ :required_once => false
59
+ },
60
+ :tf10_order_no_pre => {
61
+ :description => "Order number prefix",
62
+ :format => "X(1)",
63
+ :length => 1,
64
+ :position => (3..3),
65
+ :required => true,
66
+ :required_once => false
67
+ },
68
+ :tf10_order_no => {
69
+ :description => "Order number",
70
+ :format => "9(7)",
71
+ :length => 7,
72
+ :position => (4..10),
73
+ :required => true,
74
+ :required_once => false
75
+ },
76
+ :tf10_source_offer => {
77
+ :description => "Source code offer",
78
+ :format => "X(8)",
79
+ :length => 8,
80
+ :position => (11..18),
81
+ :required => false,
82
+ :required_once => false
83
+ },
84
+ :tf10_source_use => {
85
+ :description => "Source code use",
86
+ :format => "X(8)",
87
+ :length => 8,
88
+ :position => (19..26),
89
+ :required => false,
90
+ :required_once => false
91
+ },
92
+ :tf10_mail_date => {
93
+ :description => "Mail date of order (mmddyy) (Default = current date)",
94
+ :format => "X(8)",
95
+ :length => 8,
96
+ :position => (27..34),
97
+ :required => false,
98
+ :required_once => false
99
+ },
100
+ :tf10_pay_method => {
101
+ :description => "Pay method (Code descriptions, type PM)",
102
+ :format => "X(2)",
103
+ :length => 2,
104
+ :position => (35..36),
105
+ :required => true,
106
+ :required_once => false
107
+ },
108
+ :tf10_fname => {
109
+ :description => "First name",
110
+ :format => "X(16)",
111
+ :length => 16,
112
+ :position => (37..52),
113
+ :required => false,
114
+ :required_once => true
115
+ },
116
+ :tf10_mi => {
117
+ :description => "Middle initial",
118
+ :format => "X(1)",
119
+ :length => 1,
120
+ :position => (53..53),
121
+ :required => false,
122
+ :required_once => false
123
+ },
124
+ :tf10_lname => {
125
+ :description => "Last name",
126
+ :format => "X(16)",
127
+ :length => 16,
128
+ :position => (54..69),
129
+ :required => false,
130
+ :required_once => true
131
+ },
132
+ :tf10_title_code => {
133
+ :description => "Title code",
134
+ :format => "X(2)",
135
+ :length => 2,
136
+ :position => (70..71),
137
+ :required => false,
138
+ :required_once => false
139
+ },
140
+ :tf10_co_name => {
141
+ :description => "Company name",
142
+ :format => "X(30)",
143
+ :length => 30,
144
+ :position => (72..101),
145
+ :required => false,
146
+ :required_once => true
147
+ },
148
+ :tf10_ref1 => {
149
+ :description => "Address reference line 1",
150
+ :format => "X(30)",
151
+ :length => 30,
152
+ :position => (102..131),
153
+ :required => false,
154
+ :required_once => false
155
+ },
156
+ :tf10_ref2 => {
157
+ :description => "Address reference line 2",
158
+ :format => "X(30)",
159
+ :length => 30,
160
+ :position => (132..161),
161
+ :required => false,
162
+ :required_once => false
163
+ },
164
+ :tf10_street => {
165
+ :description => "Street address or PO Box number",
166
+ :format => "X(30)",
167
+ :length => 30,
168
+ :position => (162..191),
169
+ :required => true,
170
+ :required_once => false
171
+ },
172
+ :tf10_city => {
173
+ :description => "City",
174
+ :format => "X(30)",
175
+ :length => 30,
176
+ :position => (192..221),
177
+ :required => true,
178
+ :required_once => false
179
+ },
180
+ :tf10_state => {
181
+ :description => "State (enter FN if foreign)",
182
+ :format => "X(2)",
183
+ :length => 2,
184
+ :position => (222..223),
185
+ :required => true,
186
+ :required_once => false
187
+ },
188
+ :tf10_zip_code => {
189
+ :description => "Zip Code",
190
+ :format => "X(14)",
191
+ :length => 14,
192
+ :position => (224..237),
193
+ :required => true,
194
+ :required_once => false
195
+ },
196
+ :tf10_country_code => {
197
+ :description => "Country Code (required only if state = FN)",
198
+ :format => "X(4)",
199
+ :length => 4,
200
+ :position => (238..241),
201
+ :required => false,
202
+ :required_once => false
203
+ },
204
+ :tf10_day_phone => {
205
+ :description => "Day phone number",
206
+ :format => "X(14)",
207
+ :length => 14,
208
+ :position => (242..255),
209
+ :required => false,
210
+ :required_once => false
211
+ },
212
+ :tf10_ngt_phone => {
213
+ :description => "Night phone number",
214
+ :format => "X(14)",
215
+ :length => 14,
216
+ :position => (256..269),
217
+ :required => false,
218
+ :required_once => false
219
+ },
220
+ :tf10_old_custno => {
221
+ :description => "Cross reference to customer",
222
+ :format => "X(16)",
223
+ :length => 16,
224
+ :position => (270..285),
225
+ :required => false,
226
+ :required_once => false
227
+ },
228
+ :tf10_birth_date => {
229
+ :description => "Customer's birth date in ccyymmdd format, used with the Bill Me Later pay method.",
230
+ :format => "X(8)",
231
+ :length => 8,
232
+ :position => (286..293),
233
+ :required => false,
234
+ :required_once => false
235
+ },
236
+ :tf10_cust_no => {
237
+ :description => "Ecometry customer number",
238
+ :format => "9(9)",
239
+ :length => 9,
240
+ :position => (294..302),
241
+ :required => false,
242
+ :required_once => false
243
+ },
244
+ :tf10_cust_chkdig => {
245
+ :description => "Customer number check digit",
246
+ :format => "X(1)",
247
+ :length => 1,
248
+ :position => (303..303),
249
+ :required => false,
250
+ :required_once => false
251
+ },
252
+ :tf10_cust_edp => {
253
+ :description => "Customer EDP number (Ecometry Internal)",
254
+ :format => "9(9)",
255
+ :length => 9,
256
+ :position => (304..312),
257
+ :required => false,
258
+ :required_once => false
259
+ },
260
+ :tf10_no_promo => {
261
+ :description => "Do not promote",
262
+ :format => "9(1)",
263
+ :length => 14,
264
+ :position => (313..313),
265
+ :required => false,
266
+ :required_once => false
267
+ },
268
+ :tf10_no_rent => {
269
+ :description => "Do not rent",
270
+ :format => "X(1)",
271
+ :length => 1,
272
+ :position => (314..314),
273
+ :required => false,
274
+ :required_once => false
275
+ },
276
+ :tf10_repl_addr => {
277
+ :description => "Address replacement flag",
278
+ :format => "X(1)",
279
+ :length => 1,
280
+ :position => (315..315),
281
+ :required => false,
282
+ :required_once => false
283
+ },
284
+ :tf10_filler => {
285
+ :description => "Spaces",
286
+ :format => "X(5)",
287
+ :length => 5,
288
+ :position => (316..320),
289
+ :required => false,
290
+ :required_once => false
291
+ },
292
+ :tf11_rec_type => {
293
+ :description => "Record Type 11: Customer inquiries. (If Record Type 11 exists, there will not be a Record Type 10)",
294
+ :format => "X(2)",
295
+ :length => 2,
296
+ :position => (1..2),
297
+ :required => true,
298
+ :required_once => false
299
+ },
300
+ :tf11_order_no_pre => {
301
+ :description => "Order number prefix",
302
+ :format => "X(1)",
303
+ :length => 1,
304
+ :position => (3..3),
305
+ :required => true,
306
+ :required_once => false
307
+ },
308
+ :tf11_order_no => {
309
+ :description => "Order number",
310
+ :format => "X(7)",
311
+ :length => 7,
312
+ :position => (4..10),
313
+ :required => true,
314
+ :required_once => false
315
+ },
316
+ :tf11_source_offer => {
317
+ :description => "Source code offer",
318
+ :format => "X(8)",
319
+ :length => 8,
320
+ :position => (11..18),
321
+ :required => false,
322
+ :required_once => false
323
+ },
324
+ :tf11_source_use => {
325
+ :description => "Source code use",
326
+ :format => "X(8)",
327
+ :length => 8,
328
+ :position => (19..26),
329
+ :required => false,
330
+ :required_once => false
331
+ },
332
+ :tf11_first_date => {
333
+ :description => "First date of inquiry (mmddyy)",
334
+ :format => "X(8)",
335
+ :length => 8,
336
+ :position => (27..34),
337
+ :required => true,
338
+ :required_once => false
339
+ },
340
+ :tf11_fname => {
341
+ :description => "First name",
342
+ :format => "X(16)",
343
+ :length => 16,
344
+ :position => (35..50),
345
+ :required => false,
346
+ :required_once => true
347
+ },
348
+ :tf11_mi => {
349
+ :description => "Middle initial",
350
+ :format => "X(1)",
351
+ :length => 1,
352
+ :position => (51..51),
353
+ :required => false,
354
+ :required_once => false
355
+ },
356
+ :tf11_lname => {
357
+ :description => "Last name",
358
+ :format => "X(16)",
359
+ :length => 16,
360
+ :position => (52..67),
361
+ :required => false,
362
+ :required_once => true
363
+ },
364
+ :tf11_title_code => {
365
+ :description => "Title code",
366
+ :format => "X(2)",
367
+ :length => 2,
368
+ :position => (68..69),
369
+ :required => false,
370
+ :required_once => false
371
+ },
372
+ :tf11_co_name => {
373
+ :description => "Company name",
374
+ :format => "X(30)",
375
+ :length => 30,
376
+ :position => (70..99),
377
+ :required => false,
378
+ :required_once => true
379
+ },
380
+ :tf11_ref1 => {
381
+ :description => "Address reference line 1",
382
+ :format => "X(30)",
383
+ :length => 30,
384
+ :position => (100..129),
385
+ :required => false,
386
+ :required_once => false
387
+ },
388
+ :tf11_ref2 => {
389
+ :description => "Address reference line 2",
390
+ :format => "X(30)",
391
+ :length => 30,
392
+ :position => (130..159),
393
+ :required => false,
394
+ :required_once => false
395
+ },
396
+ :tf11_street => {
397
+ :description => "Street address or PO Box number",
398
+ :format => "X(30)",
399
+ :length => 30,
400
+ :position => (160..189),
401
+ :required => true,
402
+ :required_once => false
403
+ },
404
+ :tf11_city => {
405
+ :description => "City",
406
+ :format => "X(30)",
407
+ :length => 30,
408
+ :position => (190..219),
409
+ :required => true,
410
+ :required_once => false
411
+ },
412
+ :tf11_state => {
413
+ :description => "State (enter FN if foreign)",
414
+ :format => "X(2)",
415
+ :length => 2,
416
+ :position => (220..221),
417
+ :required => true,
418
+ :required_once => false
419
+ },
420
+ :tf11_zip_code => {
421
+ :description => "Zip Code",
422
+ :format => "X(14)",
423
+ :length => 14,
424
+ :position => (222..235),
425
+ :required => true,
426
+ :required_once => false
427
+ },
428
+ :tf11_phone_number => {
429
+ :description => "Phone number",
430
+ :format => "X(14)",
431
+ :length => 14,
432
+ :position => (236..249),
433
+ :required => false,
434
+ :required_once => false
435
+ },
436
+ :tf11_country_code => {
437
+ :description => "Country code (required only if state = FN)",
438
+ :format => "X(4)",
439
+ :length => 4,
440
+ :position => (250..253),
441
+ :required => false,
442
+ :required_once => false
443
+ },
444
+ :tf11_old_custnum => {
445
+ :description => "Cross reference to inquiry",
446
+ :format => "X(18)",
447
+ :length => 18,
448
+ :position => (254..271),
449
+ :required => false,
450
+ :required_once => false
451
+ },
452
+ :tf11_sw_issue_no => {
453
+ :description => "Switch card issue number",
454
+ :format => "X(2)",
455
+ :length => 2,
456
+ :position => (272..273),
457
+ :required => false,
458
+ :required_once => false
459
+ },
460
+ :tf11_sw_start_date => {
461
+ :description => "Switch card start date yymm format",
462
+ :format => "X(4)",
463
+ :length => 4,
464
+ :position => (274..277),
465
+ :required => false,
466
+ :required_once => false
467
+ },
468
+ :tf11_cust_type => {
469
+ :description => "Customer type code",
470
+ :format => "X(2)",
471
+ :length => 2,
472
+ :position => (278..279),
473
+ :required => false,
474
+ :required_once => false
475
+ },
476
+ :tf11_cc_type => {
477
+ :description => "Credit card type",
478
+ :format => "X(2)",
479
+ :length => 2,
480
+ :position => (280..281),
481
+ :required => false,
482
+ :required_once => false
483
+ },
484
+ :tf11_card_no => {
485
+ :description => "Credit card number",
486
+ :format => "X(20)",
487
+ :length => 20,
488
+ :position => (282..301),
489
+ :required => false,
490
+ :required_once => false
491
+ },
492
+ :tf11_exp_year => {
493
+ :description => "Credit card expiration year",
494
+ :format => "X(2)",
495
+ :length => 2,
496
+ :position => (302..303),
497
+ :required => false,
498
+ :required_once => false
499
+ },
500
+ :tf11_exp_month => {
501
+ :description => "Credit card expiration month",
502
+ :format => "X(2)",
503
+ :length => 2,
504
+ :position => (304..305),
505
+ :required => false,
506
+ :required_once => false
507
+ },
508
+ :tf11_error_code => {
509
+ :description => "Error code",
510
+ :format => "X(1)",
511
+ :length => 1,
512
+ :position => (306..306),
513
+ :required => false,
514
+ :required_once => false
515
+ },
516
+ :tf11_fax_number => {
517
+ :description => "Fax number",
518
+ :format => "X(14)",
519
+ :length => 14,
520
+ :position => (307..320),
521
+ :required => false,
522
+ :required_once => false
523
+ },
524
+ :tf12_rec_type => {
525
+ :description => "Record Type 12: Payer information (optional)",
526
+ :format => "X(2)",
527
+ :length => 2,
528
+ :position => (1..2),
529
+ :required => true,
530
+ :required_once => false
531
+ },
532
+ :tf12_order_no_pre => {
533
+ :description => "Order number prefix",
534
+ :format => "X(1)",
535
+ :length => 1,
536
+ :position => (3..3),
537
+ :required => true,
538
+ :required_once => false
539
+ },
540
+ :tf12_order_no => {
541
+ :description => "Order number",
542
+ :format => "X(7)",
543
+ :length => 7,
544
+ :position => (4..10),
545
+ :required => true,
546
+ :required_once => false
547
+ },
548
+ :tf12_filler1 => {
549
+ :description => "Spaces",
550
+ :format => "X(24)",
551
+ :length => 24,
552
+ :position => (11..34),
553
+ :required => false,
554
+ :required_once => false
555
+ },
556
+ :tf12_fname => {
557
+ :description => "First name",
558
+ :format => "X(16)",
559
+ :length => 16,
560
+ :position => (35..50),
561
+ :required => false,
562
+ :required_once => true
563
+ },
564
+ :tf12_mi => {
565
+ :description => "Middle initial",
566
+ :format => "X(1)",
567
+ :length => 1,
568
+ :position => (51..51),
569
+ :required => false,
570
+ :required_once => false
571
+ },
572
+ :tf12_lname => {
573
+ :description => "Last name",
574
+ :format => "X(16)",
575
+ :length => 16,
576
+ :position => (52..67),
577
+ :required => false,
578
+ :required_once => true
579
+ },
580
+ :tf12_title_code => {
581
+ :description => "Title code",
582
+ :format => "X(2)",
583
+ :length => 2,
584
+ :position => (68..69),
585
+ :required => false,
586
+ :required_once => false
587
+ },
588
+ :tf12_co_name => {
589
+ :description => "Company name",
590
+ :format => "X(30)",
591
+ :length => 30,
592
+ :position => (70..99),
593
+ :required => false,
594
+ :required_once => true
595
+ },
596
+ :tf12_ref1 => {
597
+ :description => "Address reference line 1",
598
+ :format => "X(30)",
599
+ :length => 30,
600
+ :position => (100..129),
601
+ :required => false,
602
+ :required_once => false
603
+ },
604
+ :tf12_ref2 => {
605
+ :description => "Address reference line 2",
606
+ :format => "X(30)",
607
+ :length => 30,
608
+ :position => (130..159),
609
+ :required => false,
610
+ :required_once => false
611
+ },
612
+ :tf12_street => {
613
+ :description => "Street address or PO Box number",
614
+ :format => "X(30)",
615
+ :length => 30,
616
+ :position => (160..189),
617
+ :required => true,
618
+ :required_once => false
619
+ },
620
+ :tf12_city => {
621
+ :description => "City",
622
+ :format => "X(30)",
623
+ :length => 30,
624
+ :position => (190..219),
625
+ :required => true,
626
+ :required_once => false
627
+ },
628
+ :tf12_state => {
629
+ :description => "State (enter FN if foreign)",
630
+ :format => "X(2)",
631
+ :length => 2,
632
+ :position => (220..221),
633
+ :required => true,
634
+ :required_once => false
635
+ },
636
+ :tf12_zip_code => {
637
+ :description => "Zip Code",
638
+ :format => "X(14)",
639
+ :length => 14,
640
+ :position => (222..235),
641
+ :required => true,
642
+ :required_once => false
643
+ },
644
+ :tf12_phone_number => {
645
+ :description => "Phone number",
646
+ :format => "X(14)",
647
+ :length => 14,
648
+ :position => (236..249),
649
+ :required => false,
650
+ :required_once => false
651
+ },
652
+ :tf12_country_code => {
653
+ :description => "Country code (required only if state = FN)",
654
+ :format => "X(4)",
655
+ :length => 4,
656
+ :position => (250..253),
657
+ :required => false,
658
+ :required_once => false
659
+ },
660
+ :tf12_old_cust_no => {
661
+ :description => "Cross reference to customer",
662
+ :format => "X(24)",
663
+ :length => 24,
664
+ :position => (254..277),
665
+ :required => false,
666
+ :required_once => false
667
+ },
668
+ :tf12_cust_no => {
669
+ :description => "Ecometry customer number",
670
+ :format => "9(9)",
671
+ :length => 9,
672
+ :position => (278..286),
673
+ :required => false,
674
+ :required_once => false
675
+ },
676
+ :tf12_chk_dig => {
677
+ :description => "Customer number check digit",
678
+ :format => "X(1)",
679
+ :length => 1,
680
+ :position => (287..287),
681
+ :required => false,
682
+ :required_once => false
683
+ },
684
+ :tf12_repl_addr => {
685
+ :description => "Address replacement flag",
686
+ :format => "X(1)",
687
+ :length => 1,
688
+ :position => (288..288),
689
+ :required => false,
690
+ :required_once => false
691
+ },
692
+ :tf12_filler3 => {
693
+ :description => "Spaces",
694
+ :format => "X(32)",
695
+ :length => 32,
696
+ :position => (289..320),
697
+ :required => false,
698
+ :required_once => false
699
+ },
700
+ :tf13_rec_type => {
701
+ :description => "Record Type 13: Payer information (optional)",
702
+ :format => "X(2)",
703
+ :length => 2,
704
+ :position => (1..2),
705
+ :required => true,
706
+ :required_once => false
707
+ },
708
+ :tf13_order_no_pre => {
709
+ :description => "Order number prefix",
710
+ :format => "X(1)",
711
+ :length => 1,
712
+ :position => (3..3),
713
+ :required => true,
714
+ :required_once => false
715
+ },
716
+ :tf13_order_no => {
717
+ :description => "Order number",
718
+ :format => "X(7)",
719
+ :length => 7,
720
+ :position => (4..10),
721
+ :required => true,
722
+ :required_once => false
723
+ },
724
+ :tf13_email_addr => {
725
+ :description => "Customer's email address",
726
+ :format => "X(47)",
727
+ :length => 47,
728
+ :position => (11..57),
729
+ :required => false,
730
+ :required_once => false
731
+ },
732
+ :tf13_filler => {
733
+ :description => "Internal use only",
734
+ :format => "X(3)",
735
+ :length => 3,
736
+ :position => (58..60),
737
+ :required => false,
738
+ :required_once => false
739
+ },
740
+ :tf13_net_pass => {
741
+ :description => "User internet password",
742
+ :format => "X(16)",
743
+ :length => 16,
744
+ :position => (61..76),
745
+ :required => false,
746
+ :required_once => false
747
+ },
748
+ :tf13_reserved_area => {
749
+ :description => "Reserved for future use",
750
+ :format => "X(84)",
751
+ :length => 84,
752
+ :position => (77..160),
753
+ :required => false,
754
+ :required_once => false
755
+ },
756
+ :tf13_web_order_flag => {
757
+ :description => "Passing a value of Y in this field causes Ecometry to flag this order as one that came from an e-commerce channel. A value of Y in this field indicates that it is Batch Order flagged as web.",
758
+ :format => "X(1)",
759
+ :length => 1,
760
+ :position => (161..161),
761
+ :required => false,
762
+ :required_once => false
763
+ },
764
+ :tf13_ssn => {
765
+ :description => "The last four digits of the customer's Social Security Number used as part of the authorization data for a Bill Me Later Order; this data should be preceded by five zeros.",
766
+ :format => "X(9)",
767
+ :length => 9,
768
+ :position => (162..170),
769
+ :required => false,
770
+ :required_once => false
771
+ },
772
+ :tf13_filler => {
773
+ :description => "Filler",
774
+ :format => "X(150)",
775
+ :length => 150,
776
+ :position => (171..320),
777
+ :required => false,
778
+ :required_once => false
779
+ },
780
+ :tf15_rec_type => {
781
+ :description => "Record Type 15: Additional order information",
782
+ :format => "X(2)",
783
+ :length => 2,
784
+ :position => (1..2),
785
+ :required => true,
786
+ :required_once => false
787
+ },
788
+ :tf15_order_no_pre => {
789
+ :description => "Order number prefix",
790
+ :format => "X(1)",
791
+ :length => 1,
792
+ :position => (3..3),
793
+ :required => true,
794
+ :required_once => false
795
+ },
796
+ :tf15_order_no => {
797
+ :description => "Order number",
798
+ :format => "X(7)",
799
+ :length => 7,
800
+ :position => (4..10),
801
+ :required => true,
802
+ :required_once => false
803
+ },
804
+ :tf15_remit_amt => {
805
+ :description => "Amount remitted (pre-paid order only)",
806
+ :format => "9(6)v9(2)",
807
+ :length => 6.2,
808
+ :position => (11..18),
809
+ :required => false,
810
+ :required_once => false
811
+ },
812
+ :tf15_future_code => {
813
+ :description => "User-defined future-order date code. For example, date-code X could be 12/20/05.",
814
+ :format => "X(1)",
815
+ :length => 1,
816
+ :position => (19..19),
817
+ :required => false,
818
+ :required_once => false
819
+ },
820
+ :tf15_future_fil => {
821
+ :description => "If TF15-FUTURE-CODE is a date code, this field is blank. If a date is used. TF15-FUTURE-CODE and this field are used together to contain the 8-character date (mm/dd/yy).",
822
+ :format => "X(7)",
823
+ :length => 7,
824
+ :position => (20..26),
825
+ :required => false,
826
+ :required_once => false
827
+ },
828
+ :tf15_purchase_ord => {
829
+ :description => "Purchase order number",
830
+ :format => "X(20)",
831
+ :length => 20,
832
+ :position => (27..46),
833
+ :required => false,
834
+ :required_once => false
835
+ },
836
+ :tf15_entered_date => {
837
+ :description => "Order entry date (default = current date) (mm/dd/yy)",
838
+ :format => "X(8)",
839
+ :length => 8,
840
+ :position => (47..54),
841
+ :required => false,
842
+ :required_once => false
843
+ },
844
+ :tf15_entered_time => {
845
+ :description => "Order entry date (default = current date) (hhmmss)",
846
+ :format => "X(6)",
847
+ :length => 6,
848
+ :position => (55..60),
849
+ :required => false,
850
+ :required_once => false
851
+ },
852
+ :tf15_entered_by => {
853
+ :description => "Operator's name (default = Batch Order)",
854
+ :format => "X(8)",
855
+ :length => 8,
856
+ :position => (61..68),
857
+ :required => false,
858
+ :required_once => false
859
+ },
860
+ :tf15_hld_complt_sw => {
861
+ :description => "Hold order until complete (Y/N)",
862
+ :format => "X(1)",
863
+ :length => 1,
864
+ :position => (69..69),
865
+ :required => false,
866
+ :required_once => false
867
+ },
868
+ :tf15_expedite_ord => {
869
+ :description => "Expedite order (Y/N)",
870
+ :format => "X(1)",
871
+ :length => 1,
872
+ :position => (70..70),
873
+ :required => false,
874
+ :required_once => false
875
+ },
876
+ :tf15_no_bo => {
877
+ :description => "Cancel if on backorder (Y/N)",
878
+ :format => "X(1)",
879
+ :length => 1,
880
+ :position => (71..71),
881
+ :required => false,
882
+ :required_once => false
883
+ },
884
+ :tf15_postpone_ord => {
885
+ :description => "Wait for customer (Y/N)",
886
+ :format => "X(1)",
887
+ :length => 1,
888
+ :position => (72..72),
889
+ :required => false,
890
+ :required_once => false
891
+ },
892
+ :tf15_no_insurance => {
893
+ :description => "Do not charge insurance (Y/N)",
894
+ :format => "X(1)",
895
+ :length => 1,
896
+ :position => (73..73),
897
+ :required => false,
898
+ :required_once => false
899
+ },
900
+ :tf15_cc_up_frnt_override => {
901
+ :description => "Override offer CC bill up front (Y/N)",
902
+ :format => "X(1)",
903
+ :length => 1,
904
+ :position => (74..74),
905
+ :required => false,
906
+ :required_once => false
907
+ },
908
+ :tf15_overpayment => {
909
+ :description => "Apply overpayment to old open debits (Y/N)",
910
+ :format => "X(1)",
911
+ :length => 1,
912
+ :position => (75..75),
913
+ :required => false,
914
+ :required_once => false
915
+ },
916
+ :tf15_so_flag => {
917
+ :description => "Standing order",
918
+ :format => "X(1)",
919
+ :length => 1,
920
+ :position => (76..76),
921
+ :required => false,
922
+ :required_once => false
923
+ },
924
+ :tf15_gender => {
925
+ :description => "Gender code for customer's gender",
926
+ :format => "X(1)",
927
+ :length => 1,
928
+ :position => (77..77),
929
+ :required => false,
930
+ :required_once => false
931
+ },
932
+ :tf15_filler1 => {
933
+ :description => "Spaces",
934
+ :format => "X(5)",
935
+ :length => 5,
936
+ :position => (78..82),
937
+ :required => false,
938
+ :required_once => false
939
+ },
940
+ :tf15_opt_table1 => {
941
+ :description => "",
942
+ :format => "X(4)",
943
+ :length => 4,
944
+ :position => (83..86),
945
+ :required => false,
946
+ :required_once => false
947
+ },
948
+ :tf15_ship_meth => {
949
+ :description => "Ship method for the order's Buyer. Refer to the Determining the Ship Method for Batch Orders topic in Batch Order Production for a discussion of how this field is used.",
950
+ :format => "X(2)",
951
+ :length => 2,
952
+ :position => (87..88),
953
+ :required => false,
954
+ :required_once => false
955
+ },
956
+ :tf15_demographics => {
957
+ :description => "Demographic information. The 100 characters of demographics data is composed of two 50-character strings.",
958
+ :format => "X(100)",
959
+ :length => 100,
960
+ :position => (89..188),
961
+ :required => false,
962
+ :required_once => false
963
+ },
964
+ :tf15_sales_terr => {
965
+ :description => "Sales territory (OA orders)",
966
+ :format => "X(4)",
967
+ :length => 4,
968
+ :position => (189..192),
969
+ :required => false,
970
+ :required_once => false
971
+ },
972
+ :tf15_sales_rep => {
973
+ :description => "Sales representative code (OA orders)",
974
+ :format => "X(4)",
975
+ :length => 4,
976
+ :position => (193..196),
977
+ :required => false,
978
+ :required_once => false
979
+ },
980
+ :tf15_fax_no => {
981
+ :description => "Buyer's fax number",
982
+ :format => "X(14)",
983
+ :length => 14,
984
+ :position => (197..210),
985
+ :required => false,
986
+ :required_once => false
987
+ },
988
+ :tf15_order_xref => {
989
+ :description => "Order number cross reference",
990
+ :format => "X(24)",
991
+ :length => 24,
992
+ :position => (211..234),
993
+ :required => false,
994
+ :required_once => false
995
+ },
996
+ :tf15_cust_type => {
997
+ :description => "Customer type code",
998
+ :format => "X(2)",
999
+ :length => 2,
1000
+ :position => (235..236),
1001
+ :required => false,
1002
+ :required_once => false
1003
+ },
1004
+ :tf15_error_flag => {
1005
+ :description => "Reject routing indicator (reject reason code, as defined in Code Descriptions, type TP)",
1006
+ :format => "X(1)",
1007
+ :length => 1,
1008
+ :position => (237..237),
1009
+ :required => false,
1010
+ :required_once => false
1011
+ },
1012
+ :tf15_installments => {
1013
+ :description => "Number of installments",
1014
+ :format => "X(1)",
1015
+ :length => 1,
1016
+ :position => (238..238),
1017
+ :required => false,
1018
+ :required_once => false
1019
+ },
1020
+ :tf15_ship_date => {
1021
+ :description => "Ship date (mm/dd/yy) (default = current date)",
1022
+ :format => "X(8)",
1023
+ :length => 8,
1024
+ :position => (239..246),
1025
+ :required => false,
1026
+ :required_once => false
1027
+ },
1028
+ :tf15_user_hold_code => {
1029
+ :description => "User hold code",
1030
+ :format => "X(1)",
1031
+ :length => 1,
1032
+ :position => (247..247),
1033
+ :required => false,
1034
+ :required_once => false
1035
+ },
1036
+ :tf15_bank_acct_no => {
1037
+ :description => "Bank account number",
1038
+ :format => "X(24)",
1039
+ :length => 24,
1040
+ :position => (248..271),
1041
+ :required => false,
1042
+ :required_once => false
1043
+ },
1044
+ :tf15_rut_no => {
1045
+ :description => "Chilean Citizen Identification Number",
1046
+ :format => "X(10)",
1047
+ :length => 10,
1048
+ :position => (272..281),
1049
+ :required => false,
1050
+ :required_once => false
1051
+ },
1052
+ :tf15_filler2 => {
1053
+ :description => "Spaces",
1054
+ :format => "X(17)",
1055
+ :length => 17,
1056
+ :position => (282..298),
1057
+ :required => false,
1058
+ :required_once => false
1059
+ },
1060
+ :tf15_if_continuity => {
1061
+ :description => "Continuity flag (Y/N)",
1062
+ :format => "X(1)",
1063
+ :length => 1,
1064
+ :position => (299..299),
1065
+ :required => false,
1066
+ :required_once => false
1067
+ },
1068
+ :tf15_if_bypass_adv => {
1069
+ :description => "Address verify bypass (Y/N): Used for continuity orders only.",
1070
+ :format => "X(1)",
1071
+ :length => 1,
1072
+ :position => (300..300),
1073
+ :required => false,
1074
+ :required_once => false
1075
+ },
1076
+ :tf15_disc_one => {
1077
+ :description => "Discount Code1",
1078
+ :format => "X(1)",
1079
+ :length => 1,
1080
+ :position => (301..301),
1081
+ :required => false,
1082
+ :required_once => false
1083
+ },
1084
+ :tf15_disc_two => {
1085
+ :description => "Discount Code2",
1086
+ :format => "X(1)",
1087
+ :length => 1,
1088
+ :position => (302..302),
1089
+ :required => false,
1090
+ :required_once => false
1091
+ },
1092
+ :tf15_fedex_acct_no => {
1093
+ :description => "Third party FedEx account number.",
1094
+ :format => "X(9)",
1095
+ :length => 9,
1096
+ :position => (303..311),
1097
+ :required => false,
1098
+ :required_once => false
1099
+ },
1100
+ :tf15_ups_acct_no => {
1101
+ :description => "Third party UPS account number.",
1102
+ :format => "X(6)",
1103
+ :length => 6,
1104
+ :position => (312..317),
1105
+ :required => false,
1106
+ :required_once => false
1107
+ },
1108
+ :tf15_sat_del => {
1109
+ :description => "Saturday Delivery Flag",
1110
+ :format => "X(1)",
1111
+ :length => 1,
1112
+ :position => (318..318),
1113
+ :required => false,
1114
+ :required_once => false
1115
+ },
1116
+ :tf15_filler3 => {
1117
+ :description => "Spaces",
1118
+ :format => "X(2)",
1119
+ :length => 2,
1120
+ :position => (319..320),
1121
+ :required => false,
1122
+ :required_once => false
1123
+ },
1124
+ :tf16_rec_type => {
1125
+ :description => "Record Type 16: Customer comments",
1126
+ :format => "X(2)",
1127
+ :length => 2,
1128
+ :position => (1..2),
1129
+ :required => true,
1130
+ :required_once => false
1131
+ },
1132
+ :tf16_order_no_pre => {
1133
+ :description => "Order number prefix",
1134
+ :format => "X(1)",
1135
+ :length => 1,
1136
+ :position => (3..3),
1137
+ :required => true,
1138
+ :required_once => false
1139
+ },
1140
+ :tf16_order_no => {
1141
+ :description => "Order number",
1142
+ :format => "X(7)",
1143
+ :length => 7,
1144
+ :position => (4..10),
1145
+ :required => true,
1146
+ :required_once => false
1147
+ },
1148
+ :tf16_comment1 => {
1149
+ :description => "First 60 character customer comment",
1150
+ :format => "X(60)",
1151
+ :length => 60,
1152
+ :position => (11..70),
1153
+ :required => true,
1154
+ :required_once => false
1155
+ },
1156
+ :tf16_comment2 => {
1157
+ :description => "Second 60 character customer comment",
1158
+ :format => "X(60)",
1159
+ :length => 60,
1160
+ :position => (71..130),
1161
+ :required => true,
1162
+ :required_once => false
1163
+ },
1164
+ :tf16_prt_on_pkslp1 => {
1165
+ :description => "Print first comment on packing slip",
1166
+ :format => "X(1)",
1167
+ :length => 1,
1168
+ :position => (131..131),
1169
+ :required => false,
1170
+ :required_once => false
1171
+ },
1172
+ :tf16_prt_on_label1 => {
1173
+ :description => "Print first comment on shipping label",
1174
+ :format => "X(1)",
1175
+ :length => 1,
1176
+ :position => (132..132),
1177
+ :required => false,
1178
+ :required_once => false
1179
+ },
1180
+ :tf16_filler => {
1181
+ :description => "Spaces",
1182
+ :format => "X(1)",
1183
+ :length => 1,
1184
+ :position => (133..133),
1185
+ :required => false,
1186
+ :required_once => false
1187
+ },
1188
+ :tf16_prt_on_pkslp2 => {
1189
+ :description => "Print second comment on packing slip",
1190
+ :format => "X(1)",
1191
+ :length => 1,
1192
+ :position => (134..134),
1193
+ :required => false,
1194
+ :required_once => false
1195
+ },
1196
+ :tf16_prt_on_label2 => {
1197
+ :description => "Print second comment on shipping label",
1198
+ :format => "X(1)",
1199
+ :length => 1,
1200
+ :position => (135..135),
1201
+ :required => false,
1202
+ :required_once => false
1203
+ },
1204
+ :tf16_filler => {
1205
+ :description => "Spaces",
1206
+ :format => "X(185)",
1207
+ :length => 185,
1208
+ :position => (136..320),
1209
+ :required => false,
1210
+ :required_once => false
1211
+ },
1212
+ :tf17_rec_type => {
1213
+ :description => "Record Type 17: Coupon information",
1214
+ :format => "X(2)",
1215
+ :length => 2,
1216
+ :position => (1..2),
1217
+ :required => true,
1218
+ :required_once => false
1219
+ },
1220
+ :tf17_order_no_pre => {
1221
+ :description => "Order number prefix",
1222
+ :format => "X(1)",
1223
+ :length => 1,
1224
+ :position => (3..3),
1225
+ :required => true,
1226
+ :required_once => false
1227
+ },
1228
+ :tf17_order_no => {
1229
+ :description => "Order number",
1230
+ :format => "X(7)",
1231
+ :length => 7,
1232
+ :position => (4..10),
1233
+ :required => true,
1234
+ :required_once => false
1235
+ },
1236
+ :tf17_coupon_info => {
1237
+ :description => "Eighteen occurrences of the 17-byte coupon sub-record shown in Table 4.14",
1238
+ :format => "X(306)",
1239
+ :length => 7,
1240
+ :position => (11..316),
1241
+ :required => false,
1242
+ :required_once => false
1243
+ },
1244
+ :tf17_filler => {
1245
+ :description => "Spaces",
1246
+ :format => "X(4)",
1247
+ :length => 4,
1248
+ :position => (317..320),
1249
+ :required => false,
1250
+ :required_once => false
1251
+ },
1252
+ :tf17_coupon_no => {
1253
+ :description => "The entry in this field is either a Coupon/Gift Certificate Number or a Discount Table Number",
1254
+ :format => "X(9)",
1255
+ :length => 9,
1256
+ :position => (1..9),
1257
+ :required => false,
1258
+ :required_once => false
1259
+ },
1260
+ :tf17_percent_off => {
1261
+ :description => "Percentage off as stated in the coupon",
1262
+ :format => "9(2)",
1263
+ :length => 2,
1264
+ :position => (10..11),
1265
+ :required => false,
1266
+ :required_once => false
1267
+ },
1268
+ :tf17_dollar_off => {
1269
+ :description => "Dollar value off as stated in the coupon",
1270
+ :format => "9(4)v9(2)",
1271
+ :length => 6,
1272
+ :position => (12..17),
1273
+ :required => false,
1274
+ :required_once => false
1275
+ },
1276
+ :tf18_rec_type => {
1277
+ :description => "Record Type 18: Partial Gift Certificate information",
1278
+ :format => "X(2)",
1279
+ :length => 2,
1280
+ :position => (1..2),
1281
+ :required => true,
1282
+ :required_once => false
1283
+ },
1284
+ :tf18_order_no_pre => {
1285
+ :description => "Order number prefix",
1286
+ :format => "X(1)",
1287
+ :length => 1,
1288
+ :position => (3..3),
1289
+ :required => true,
1290
+ :required_once => false
1291
+ },
1292
+ :tf18_order_no => {
1293
+ :description => "Order number",
1294
+ :format => "X(7)",
1295
+ :length => 7,
1296
+ :position => (4..10),
1297
+ :required => false,
1298
+ :required_once => false
1299
+ },
1300
+ :tf18_gift_cert_info => {
1301
+ :description => "Twenty occurrences of the 18-byte Gift Certificate sub-record shown in Table 4.16",
1302
+ :format => "X(180)",
1303
+ :length => 180,
1304
+ :position => (11..190),
1305
+ :required => false,
1306
+ :required_once => false
1307
+ },
1308
+ :tf18_filler => {
1309
+ :description => "Spaces",
1310
+ :format => "X(130)",
1311
+ :length => 130,
1312
+ :position => (191..320),
1313
+ :required => false,
1314
+ :required_once => false
1315
+ },
1316
+ :tf18_gift_cert_no => {
1317
+ :description => "The entry in this field is the Gift Certificate number plus the check digit. The check digit is the last position of the Gift Certificate number that prints on both the Gift Certificate and the Gift Certificate Register.",
1318
+ :format => "X(9)",
1319
+ :length => 9,
1320
+ :position => (1..9),
1321
+ :required => false,
1322
+ :required_once => false
1323
+ },
1324
+ :tf18_gc_redeem_amt => {
1325
+ :description => "Redeemed amount for Gift Certificate",
1326
+ :format => "9(7)v9(2)",
1327
+ :length => 9,
1328
+ :position => (10..18),
1329
+ :required => false,
1330
+ :required_once => false
1331
+ },
1332
+ :tf20_rec_type => {
1333
+ :description => "Record Type 20: Credit card information",
1334
+ :format => "X(2)",
1335
+ :length => 2,
1336
+ :position => (1..2),
1337
+ :required => true,
1338
+ :required_once => false
1339
+ },
1340
+ :tf20_order_no_pre => {
1341
+ :description => "Order number prefix",
1342
+ :format => "X(1)",
1343
+ :length => 1,
1344
+ :position => (3..3),
1345
+ :required => true,
1346
+ :required_once => false
1347
+ },
1348
+ :tf20_order_no => {
1349
+ :description => "Order number",
1350
+ :format => "X(7)",
1351
+ :length => 7,
1352
+ :position => (4..10),
1353
+ :required => true,
1354
+ :required_once => false
1355
+ },
1356
+ :tf20_cc_type => {
1357
+ :description => "Credit card type (Code Descriptions, type PM)",
1358
+ :format => "X(2)",
1359
+ :length => 2,
1360
+ :position => (11..12),
1361
+ :required => true,
1362
+ :required_once => false
1363
+ },
1364
+ :tf20_cc_card_no => {
1365
+ :description => "Credit card number",
1366
+ :format => "X(20)",
1367
+ :length => 20,
1368
+ :position => (13..32),
1369
+ :required => true,
1370
+ :required_once => false
1371
+ },
1372
+ :tf20_exp_year => {
1373
+ :description => "Credit card expiration year",
1374
+ :format => "X(2)",
1375
+ :length => 2,
1376
+ :position => (33..34),
1377
+ :required => true,
1378
+ :required_once => false
1379
+ },
1380
+ :tf20_exp_month => {
1381
+ :description => "Credit card expiration month",
1382
+ :format => "X(2)",
1383
+ :length => 2,
1384
+ :position => (35..36),
1385
+ :required => true,
1386
+ :required_once => false
1387
+ },
1388
+ :tf20_auth_code => {
1389
+ :description => "Credit card authorization code",
1390
+ :format => "X(6)",
1391
+ :length => 6,
1392
+ :position => (37..42),
1393
+ :required => false,
1394
+ :required_once => false
1395
+ },
1396
+ :tf20_auth_flag => {
1397
+ :description => "CC authorization flag",
1398
+ :format => "X(1)",
1399
+ :length => 1,
1400
+ :position => (43..43),
1401
+ :required => false,
1402
+ :required_once => false
1403
+ },
1404
+ :tf20_sw_issue_no => {
1405
+ :description => "Switch card issue number",
1406
+ :format => "X(2)",
1407
+ :length => 2,
1408
+ :position => (44..45),
1409
+ :required => false,
1410
+ :required_once => false
1411
+ },
1412
+ :tf20_sw_start_date => {
1413
+ :description => "Switch card start date yymm format",
1414
+ :format => "X(4)",
1415
+ :length => 4,
1416
+ :position => (46..49),
1417
+ :required => false,
1418
+ :required_once => false
1419
+ },
1420
+ :tf20_security_code_number => {
1421
+ :description => "CC Security Code",
1422
+ :format => "X(4)",
1423
+ :length => 4,
1424
+ :position => (50..53),
1425
+ :required => false,
1426
+ :required_once => false
1427
+ },
1428
+ :tf20_cc_resp_code => {
1429
+ :description => "Credit card response code",
1430
+ :format => "X(4)",
1431
+ :length => 4,
1432
+ :position => (54..57),
1433
+ :required => false,
1434
+ :required_once => false
1435
+ },
1436
+ :tf20_bml_promo_code => {
1437
+ :description => "Bill Me Later promo code",
1438
+ :format => "9(4)",
1439
+ :length => 4,
1440
+ :position => (58..61),
1441
+ :required => false,
1442
+ :required_once => false
1443
+ },
1444
+ :tf20_bml_pay_div_no => {
1445
+ :description => "Bill Me Later Payment Division Number",
1446
+ :format => "9(6)",
1447
+ :length => 6,
1448
+ :position => (62..67),
1449
+ :required => false,
1450
+ :required_once => false
1451
+ },
1452
+ :tf20_filler => {
1453
+ :description => "Spaces",
1454
+ :format => "X(253)",
1455
+ :length => 253,
1456
+ :position => (68..320),
1457
+ :required => false,
1458
+ :required_once => false
1459
+ },
1460
+ :tf21_rec_type => {
1461
+ :description => "Record Type 21: Order comments (optional)",
1462
+ :format => "X(2)",
1463
+ :length => 2,
1464
+ :position => (1..2),
1465
+ :required => true,
1466
+ :required_once => false
1467
+ },
1468
+ :tf21_order_no_pre => {
1469
+ :description => "Order number prefix",
1470
+ :format => "X(1)",
1471
+ :length => 1,
1472
+ :position => (3..3),
1473
+ :required => true,
1474
+ :required_once => false
1475
+ },
1476
+ :tf21_order_no => {
1477
+ :description => "Order number",
1478
+ :format => "X(7)",
1479
+ :length => 7,
1480
+ :position => (4..10),
1481
+ :required => true,
1482
+ :required_once => false
1483
+ },
1484
+ :tf21_comment1 => {
1485
+ :description => "First 60 character order comment",
1486
+ :format => "X(60)",
1487
+ :length => 60,
1488
+ :position => (11..70),
1489
+ :required => true,
1490
+ :required_once => false
1491
+ },
1492
+ :tf21_comment2 => {
1493
+ :description => "Second 60 character order comment",
1494
+ :format => "X(60)",
1495
+ :length => 60,
1496
+ :position => (71..130),
1497
+ :required => true,
1498
+ :required_once => false
1499
+ },
1500
+ :tf21_prt_on_pkslp1 => {
1501
+ :description => "Print first comment on packing slip",
1502
+ :format => "X(1)",
1503
+ :length => 1,
1504
+ :position => (131..131),
1505
+ :required => false,
1506
+ :required_once => false
1507
+ },
1508
+ :tf21_prt_on_label1 => {
1509
+ :description => "Print first comment on shipping label",
1510
+ :format => "X(1)",
1511
+ :length => 1,
1512
+ :position => (132..132),
1513
+ :required => false,
1514
+ :required_once => false
1515
+ },
1516
+ :tf21_prt_on_greet1 => {
1517
+ :description => "Print first comment on warehouse label",
1518
+ :format => "X(1)",
1519
+ :length => 1,
1520
+ :position => (133..133),
1521
+ :required => false,
1522
+ :required_once => false
1523
+ },
1524
+ :tf21_prt_on_pkslp2 => {
1525
+ :description => "Print second comment on packing slip",
1526
+ :format => "X(1)",
1527
+ :length => 1,
1528
+ :position => (134..134),
1529
+ :required => false,
1530
+ :required_once => false
1531
+ },
1532
+ :tf21_prt_on_label2 => {
1533
+ :description => "Print second comment on shipping label",
1534
+ :format => "X(1)",
1535
+ :length => 1,
1536
+ :position => (135..135),
1537
+ :required => false,
1538
+ :required_once => false
1539
+ },
1540
+ :tf21_prt_on_greet2 => {
1541
+ :description => "Print second comment on warehouse label",
1542
+ :format => "X(1)",
1543
+ :length => 1,
1544
+ :position => (136..136),
1545
+ :required => false,
1546
+ :required_once => false
1547
+ },
1548
+ :tf21_prt_on_voice1 => {
1549
+ :description => "Print first comment on invoice",
1550
+ :format => "X(1)",
1551
+ :length => 1,
1552
+ :position => (137..137),
1553
+ :required => false,
1554
+ :required_once => false
1555
+ },
1556
+ :tf21_prt_on_voice2 => {
1557
+ :description => "Print second comment on invoice",
1558
+ :format => "X(1)",
1559
+ :length => 1,
1560
+ :position => (138..138),
1561
+ :required => false,
1562
+ :required_once => false
1563
+ },
1564
+ :tf21_filler => {
1565
+ :description => "Spaces",
1566
+ :format => "X(182)",
1567
+ :length => 182,
1568
+ :position => (139..320),
1569
+ :required => false,
1570
+ :required_once => false
1571
+ },
1572
+ :tf30_rec_type => {
1573
+ :description => "Record Type 30: Ship-To record (multiple-optional)",
1574
+ :format => "X(2)",
1575
+ :length => 2,
1576
+ :position => (1..2),
1577
+ :required => true,
1578
+ :required_once => false
1579
+ },
1580
+ :tf30_order_no_pre => {
1581
+ :description => "Order number prefix",
1582
+ :format => "X(1)",
1583
+ :length => 1,
1584
+ :position => (3..3),
1585
+ :required => true,
1586
+ :required_once => false
1587
+ },
1588
+ :tf30_order_no => {
1589
+ :description => "Order number",
1590
+ :format => "X(7)",
1591
+ :length => 7,
1592
+ :position => (4..10),
1593
+ :required => true,
1594
+ :required_once => false
1595
+ },
1596
+ :tf30_fname => {
1597
+ :description => "First name",
1598
+ :format => "X(16)",
1599
+ :length => 16,
1600
+ :position => (11..26),
1601
+ :required => false,
1602
+ :required_once => true
1603
+ },
1604
+ :tf30_mi => {
1605
+ :description => "Middle initial",
1606
+ :format => "X(1)",
1607
+ :length => 1,
1608
+ :position => (27..27),
1609
+ :required => false,
1610
+ :required_once => false
1611
+ },
1612
+ :tf30_lname => {
1613
+ :description => "Last name",
1614
+ :format => "X(16)",
1615
+ :length => 16,
1616
+ :position => (28..43),
1617
+ :required => false,
1618
+ :required_once => true
1619
+ },
1620
+ :tf30_title_code => {
1621
+ :description => "Title code",
1622
+ :format => "X(2)",
1623
+ :length => 2,
1624
+ :position => (44..45),
1625
+ :required => false,
1626
+ :required_once => false
1627
+ },
1628
+ :tf30_co_name => {
1629
+ :description => "Company name",
1630
+ :format => "X(30)",
1631
+ :length => 30,
1632
+ :position => (46..75),
1633
+ :required => false,
1634
+ :required_once => true
1635
+ },
1636
+ :tf30_ref1 => {
1637
+ :description => "Address reference line 1",
1638
+ :format => "X(30)",
1639
+ :length => 30,
1640
+ :position => (76..105),
1641
+ :required => false,
1642
+ :required_once => false
1643
+ },
1644
+ :tf30_ref2 => {
1645
+ :description => "Address reference line 2",
1646
+ :format => "X(30)",
1647
+ :length => 30,
1648
+ :position => (106..135),
1649
+ :required => false,
1650
+ :required_once => false
1651
+ },
1652
+ :tf30_street => {
1653
+ :description => "Street address or PO Box number",
1654
+ :format => "X(30)",
1655
+ :length => 30,
1656
+ :position => (136..165),
1657
+ :required => true,
1658
+ :required_once => false
1659
+ },
1660
+ :tf30_city => {
1661
+ :description => "City",
1662
+ :format => "X(30)",
1663
+ :length => 30,
1664
+ :position => (166..195),
1665
+ :required => true,
1666
+ :required_once => false
1667
+ },
1668
+ :tf30_state => {
1669
+ :description => "State (enter FN if foreign)",
1670
+ :format => "X(2)",
1671
+ :length => 2,
1672
+ :position => (196..197),
1673
+ :required => true,
1674
+ :required_once => false
1675
+ },
1676
+ :tf30_zip_code => {
1677
+ :description => "Zip Code",
1678
+ :format => "X(14)",
1679
+ :length => 14,
1680
+ :position => (198..211),
1681
+ :required => true,
1682
+ :required_once => false
1683
+ },
1684
+ :tf30_country_code => {
1685
+ :description => "Country code (required only if state = FN)",
1686
+ :format => "X(4)",
1687
+ :length => 4,
1688
+ :position => (212..215),
1689
+ :required => false,
1690
+ :required_once => false
1691
+ },
1692
+ :tf30_phone_no => {
1693
+ :description => "Phone number",
1694
+ :format => "X(14)",
1695
+ :length => 14,
1696
+ :position => (216..229),
1697
+ :required => false,
1698
+ :required_once => false
1699
+ },
1700
+ :tf30_old_cust_no => {
1701
+ :description => "Cross reference to customer",
1702
+ :format => "X(24)",
1703
+ :length => 24,
1704
+ :position => (230..253),
1705
+ :required => false,
1706
+ :required_once => false
1707
+ },
1708
+ :tf30_cust_no => {
1709
+ :description => "Ecometry customer number",
1710
+ :format => "9(9)",
1711
+ :length => 9,
1712
+ :position => (254..262),
1713
+ :required => false,
1714
+ :required_once => false
1715
+ },
1716
+ :tf30_chk_dig => {
1717
+ :description => "Customer number check digit",
1718
+ :format => "X(1)",
1719
+ :length => 1,
1720
+ :position => (263..263),
1721
+ :required => false,
1722
+ :required_once => false
1723
+ },
1724
+ :tf30_cust_edp => {
1725
+ :description => "Customer EDP number (Ecometry Internal)",
1726
+ :format => "9(9)",
1727
+ :length => 9,
1728
+ :position => (264..272),
1729
+ :required => false,
1730
+ :required_once => false
1731
+ },
1732
+ :tf30_convenience_flag => {
1733
+ :description => "Convenience ship-to (Y/N/A) (default is N)",
1734
+ :format => "X(1)",
1735
+ :length => 1,
1736
+ :position => (273..273),
1737
+ :required => false,
1738
+ :required_once => false
1739
+ },
1740
+ :tf30_future_code => {
1741
+ :description => "User-defined future-order date code. For example, date-code X could be 12/20/05.",
1742
+ :format => "X(1)",
1743
+ :length => 1,
1744
+ :position => (274..274),
1745
+ :required => false,
1746
+ :required_once => false
1747
+ },
1748
+ :tf30_future_fil => {
1749
+ :description => "If TF30-FUTURE-CODE is a date code, this field is blank. If a date is used. TF30-FUTURE-CODE and this field are used together to contain the 8-character date (mm/dd/yy).",
1750
+ :format => "X(7)",
1751
+ :length => 7,
1752
+ :position => (275..281),
1753
+ :required => false,
1754
+ :required_once => false
1755
+ },
1756
+ :tf30_ship_meth => {
1757
+ :description => "Ship method for this ship-to. Refer to the Determining the Ship Method for Batch Orders topic in Batch Order Production for a discussion of how this field is used.",
1758
+ :format => "X(2)",
1759
+ :length => 2,
1760
+ :position => (282..283),
1761
+ :required => false,
1762
+ :required_once => false
1763
+ },
1764
+ :tf30_repl_addr => {
1765
+ :description => "Address replacement flag",
1766
+ :format => "X(1)",
1767
+ :length => 1,
1768
+ :position => (284..284),
1769
+ :required => false,
1770
+ :required_once => false
1771
+ },
1772
+ :tf30_filler2 => {
1773
+ :description => "Spaces",
1774
+ :format => "X(36)",
1775
+ :length => 36,
1776
+ :position => (285..320),
1777
+ :required => false,
1778
+ :required_once => false
1779
+ },
1780
+ :tf31_rec_type => {
1781
+ :description => "Record Type 31: Ship-To comments (optional)",
1782
+ :format => "X(2)",
1783
+ :length => 2,
1784
+ :position => (1..2),
1785
+ :required => true,
1786
+ :required_once => false
1787
+ },
1788
+ :tf31_order_no_pre => {
1789
+ :description => "Order number prefix",
1790
+ :format => "X(1)",
1791
+ :length => 1,
1792
+ :position => (3..3),
1793
+ :required => true,
1794
+ :required_once => false
1795
+ },
1796
+ :tf31_order_no => {
1797
+ :description => "Order number",
1798
+ :format => "9(7)",
1799
+ :length => 7,
1800
+ :position => (4..10),
1801
+ :required => true,
1802
+ :required_once => false
1803
+ },
1804
+ :tf31_comment1 => {
1805
+ :description => "First 60 character customer comment",
1806
+ :format => "X(60)",
1807
+ :length => 60,
1808
+ :position => (11..70),
1809
+ :required => true,
1810
+ :required_once => false
1811
+ },
1812
+ :tf31_comment2 => {
1813
+ :description => "Second 60 character customer comment",
1814
+ :format => "X(60)",
1815
+ :length => 60,
1816
+ :position => (71..130),
1817
+ :required => true,
1818
+ :required_once => false
1819
+ },
1820
+ :tf31_prt_on_pkslp1 => {
1821
+ :description => "Print first comment on packing slip",
1822
+ :format => "X(1)",
1823
+ :length => 1,
1824
+ :position => (131..131),
1825
+ :required => false,
1826
+ :required_once => false
1827
+ },
1828
+ :tf31_prt_on_label1 => {
1829
+ :description => "Print first comment on shipping label",
1830
+ :format => "X(1)",
1831
+ :length => 1,
1832
+ :position => (132..132),
1833
+ :required => false,
1834
+ :required_once => false
1835
+ },
1836
+ :tf31_prt_on_greet1 => {
1837
+ :description => "Print first comment on warehouse label",
1838
+ :format => "X(1)",
1839
+ :length => 1,
1840
+ :position => (133..133),
1841
+ :required => false,
1842
+ :required_once => false
1843
+ },
1844
+ :tf31_prt_on_pkslp2 => {
1845
+ :description => "Print second comment on packing slip",
1846
+ :format => "X(1)",
1847
+ :length => 1,
1848
+ :position => (134..134),
1849
+ :required => false,
1850
+ :required_once => false
1851
+ },
1852
+ :tf31_prt_on_label2 => {
1853
+ :description => "Print second comment on shipping label",
1854
+ :format => "X(1)",
1855
+ :length => 1,
1856
+ :position => (135..135),
1857
+ :required => false,
1858
+ :required_once => false
1859
+ },
1860
+ :tf31_prt_on_greet2 => {
1861
+ :description => "Print second comment on warehouse label",
1862
+ :format => "X(1)",
1863
+ :length => 1,
1864
+ :position => (136..136),
1865
+ :required => false,
1866
+ :required_once => false
1867
+ },
1868
+ :tf31_prt_on_invoice1 => {
1869
+ :description => "Print first comment on invoice",
1870
+ :format => "X(1)",
1871
+ :length => 1,
1872
+ :position => (137..137),
1873
+ :required => false,
1874
+ :required_once => false
1875
+ },
1876
+ :tf31_prt_on_invoice2 => {
1877
+ :description => "Print second comment on invoice",
1878
+ :format => "X(1)",
1879
+ :length => 1,
1880
+ :position => (138..138),
1881
+ :required => false,
1882
+ :required_once => false
1883
+ },
1884
+ :tf31_filler => {
1885
+ :description => "Spaces",
1886
+ :format => "X(182)",
1887
+ :length => 182,
1888
+ :position => (139..320),
1889
+ :required => false,
1890
+ :required_once => false
1891
+ },
1892
+ :tf33_rec_type => {
1893
+ :description => "Record Type 33: Ship-To Email address (one per tf30 record in the order)",
1894
+ :format => "X(2)",
1895
+ :length => 2,
1896
+ :position => (1..2),
1897
+ :required => false,
1898
+ :required_once => false
1899
+ },
1900
+ :tf33_order_no_pre => {
1901
+ :description => "Order number prefix",
1902
+ :format => "X(1)",
1903
+ :length => 1,
1904
+ :position => (3..3),
1905
+ :required => true,
1906
+ :required_once => false
1907
+ },
1908
+ :tf33_order_no => {
1909
+ :description => "Order number",
1910
+ :format => "X(7)",
1911
+ :length => 7,
1912
+ :position => (4..10),
1913
+ :required => false,
1914
+ :required_once => false
1915
+ },
1916
+ :tf33_email_addr => {
1917
+ :description => "E-mail address for a ship-to",
1918
+ :format => "X(50)",
1919
+ :length => 50,
1920
+ :position => (11..60),
1921
+ :required => false,
1922
+ :required_once => false
1923
+ },
1924
+ :tf33_filler => {
1925
+ :description => "Spaces",
1926
+ :format => "X(260)",
1927
+ :length => 260,
1928
+ :position => (61..320),
1929
+ :required => false,
1930
+ :required_once => false
1931
+ },
1932
+ :tf40_rec_type => {
1933
+ :description => "Record Type 40: Line-item record (multiple)",
1934
+ :format => "X(2)",
1935
+ :length => 2,
1936
+ :position => (1..2),
1937
+ :required => true,
1938
+ :required_once => false
1939
+ },
1940
+ :tf40_order_no_pre => {
1941
+ :description => "Order number prefix",
1942
+ :format => "X(1)",
1943
+ :length => 1,
1944
+ :position => (3..3),
1945
+ :required => true,
1946
+ :required_once => false
1947
+ },
1948
+ :tf40_order_no => {
1949
+ :description => "Order number",
1950
+ :format => "X(7)",
1951
+ :length => 7,
1952
+ :position => (4..10),
1953
+ :required => true,
1954
+ :required_once => false
1955
+ },
1956
+ :tf40_internals => {
1957
+ :description => "Spaces",
1958
+ :format => "X(2)",
1959
+ :length => 2,
1960
+ :position => (11..12),
1961
+ :required => false,
1962
+ :required_once => false
1963
+ },
1964
+ :tf40_quantity => {
1965
+ :description => "Line item quantity Blank or 0 = the line item is canceled",
1966
+ :format => "9(4)",
1967
+ :length => 4,
1968
+ :position => (13..16),
1969
+ :required => true,
1970
+ :required_once => false
1971
+ },
1972
+ :tf40_edp_no => {
1973
+ :description => "Ecometry internal product number Blank = use product number to find product.",
1974
+ :format => "9(9)",
1975
+ :length => 9,
1976
+ :position => (17..25),
1977
+ :required => false,
1978
+ :required_once => false
1979
+ },
1980
+ :tf40_tax_exem_no => {
1981
+ :description => "Tax ID number becomes an account comment",
1982
+ :format => "X(60)",
1983
+ :length => 60,
1984
+ :position => (26..85),
1985
+ :required => false,
1986
+ :required_once => false
1987
+ },
1988
+ :tf40_item_no => {
1989
+ :description => "Product number in Ecometry",
1990
+ :format => "X(20)",
1991
+ :length => 20,
1992
+ :position => (86..105),
1993
+ :required => true,
1994
+ :required_once => false
1995
+ },
1996
+ :tf40_tax_amt => {
1997
+ :description => "Total tax amount for order (optional) (only used in the first Record Type 42 for each order) Blank = Ecometry calculates the tax amount at Order Entry",
1998
+ :format => "9(6)v99",
1999
+ :length => 7,
2000
+ :position => (106..112),
2001
+ :required => false,
2002
+ :required_once => false
2003
+ },
2004
+ :tf40_tax_rate => {
2005
+ :description => "Tax rate assigned to order (only used in the first Record type 40 for each order) Blank or 0 = Ecometry calculates the tax",
2006
+ :format => "9(2)v9(4)",
2007
+ :length => 6,
2008
+ :position => (113..118),
2009
+ :required => false,
2010
+ :required_once => false
2011
+ },
2012
+ :tf40_tax_exem => {
2013
+ :description => "Order is tax exempt (Y/N)",
2014
+ :format => "X(1)",
2015
+ :length => 1,
2016
+ :position => (119..119),
2017
+ :required => false,
2018
+ :required_once => false
2019
+ },
2020
+ :tf40_ship_meth => {
2021
+ :description => "Ship method (optional). Valid ship method 01-99.",
2022
+ :format => "9(2)",
2023
+ :length => 2,
2024
+ :position => (120..121),
2025
+ :required => false,
2026
+ :required_once => false
2027
+ },
2028
+ :tf40_p_h_amt => {
2029
+ :description => "Total postage for order (optional) (only used in the first record type 40 for each order) Blank = Postage the same as Order Entry. Amount must be right justified and zero filled",
2030
+ :format => "9(5)v9(2)",
2031
+ :length => 7,
2032
+ :position => (122..128),
2033
+ :required => false,
2034
+ :required_once => false
2035
+ },
2036
+ :tf40_price => {
2037
+ :description => "Spaces = Ecometry pricing routine. Right justified and zero filled.",
2038
+ :format => "9(7)v9(2)",
2039
+ :length => 9,
2040
+ :position => (129..137),
2041
+ :required => false,
2042
+ :required_once => false
2043
+ },
2044
+ :tf40_ship_date => {
2045
+ :description => "Ship date of order (mm/dd/yy) (only used in the first Record type 40 for each order) Blank = use ship date from record type 15",
2046
+ :format => "X(8)",
2047
+ :length => 8,
2048
+ :position => (138..145),
2049
+ :required => false,
2050
+ :required_once => false
2051
+ },
2052
+ :tf40_pos_ret => {
2053
+ :description => "Point of sale return (Y = POS return)",
2054
+ :format => "X(1)",
2055
+ :length => 1,
2056
+ :position => (146..146),
2057
+ :required => false,
2058
+ :required_once => false
2059
+ },
2060
+ :tf40_post_x => {
2061
+ :description => "Additional postage (only used in the first record type 40 for each order)",
2062
+ :format => "9(5)v99",
2063
+ :length => 6,
2064
+ :position => (147..153),
2065
+ :required => false,
2066
+ :required_once => false
2067
+ },
2068
+ :tf40_assoc_line_no => {
2069
+ :description => "Associated Product Line Number",
2070
+ :format => "9(3)",
2071
+ :length => 3,
2072
+ :position => (154..156),
2073
+ :required => false,
2074
+ :required_once => false
2075
+ },
2076
+ :tf40_gift_cert_no => {
2077
+ :description => "Gift certificate number",
2078
+ :format => "X(8)",
2079
+ :length => 8,
2080
+ :position => (157..164),
2081
+ :required => false,
2082
+ :required_once => false
2083
+ },
2084
+ :tf40_gc_virtual_auth => {
2085
+ :description => "Virtual gift card authorization",
2086
+ :format => "X(6)",
2087
+ :length => 6,
2088
+ :position => (165..170),
2089
+ :required => false,
2090
+ :required_once => false
2091
+ },
2092
+ :tf40_gc_virtual_no => {
2093
+ :description => "Virtual gift card number",
2094
+ :format => "X(19)",
2095
+ :length => 19,
2096
+ :position => (171..189),
2097
+ :required => false,
2098
+ :required_once => false
2099
+ },
2100
+ :tf40_gc_virtual_pin => {
2101
+ :description => "Virtual gift card pin",
2102
+ :format => "X(8)",
2103
+ :length => 8,
2104
+ :position => (190..197),
2105
+ :required => false,
2106
+ :required_once => false
2107
+ },
2108
+ :tf40_filler1 => {
2109
+ :description => "Spaces",
2110
+ :format => "X(113)",
2111
+ :length => 113,
2112
+ :position => (198..310),
2113
+ :required => false,
2114
+ :required_once => false
2115
+ },
2116
+ :tf40_overide_price => {
2117
+ :description => "Price override flag (Y/N)",
2118
+ :format => "X(1)",
2119
+ :length => 1,
2120
+ :position => (311..311),
2121
+ :required => false,
2122
+ :required_once => false
2123
+ },
2124
+ :tf40_club_sales_type => {
2125
+ :description => "Code used to describe the application of an individual sale in a club environment. Set in Code Descriptions, type TS.",
2126
+ :format => "X(1)",
2127
+ :length => 1,
2128
+ :position => (312..312),
2129
+ :required => false,
2130
+ :required_once => false
2131
+ },
2132
+ :tf40_return_flag => {
2133
+ :description => "Order history only",
2134
+ :format => "X(1)",
2135
+ :length => 1,
2136
+ :position => (313..313),
2137
+ :required => false,
2138
+ :required_once => false
2139
+ },
2140
+ :tf40_povrd_reason => {
2141
+ :description => "Price override reason",
2142
+ :format => "X(2)",
2143
+ :length => 2,
2144
+ :position => (314..315),
2145
+ :required => false,
2146
+ :required_once => false
2147
+ },
2148
+ :tf40_filler2 => {
2149
+ :description => "Spaces",
2150
+ :format => "X(5)",
2151
+ :length => 5,
2152
+ :position => (316..320),
2153
+ :required => false,
2154
+ :required_once => false
2155
+ },
2156
+ :tf41_rec_type => {
2157
+ :description => "Record Type 41: Custom product comments (optional), up to ten type 41 records per product",
2158
+ :format => "X(2)",
2159
+ :length => 2,
2160
+ :position => (1..2),
2161
+ :required => true,
2162
+ :required_once => false
2163
+ },
2164
+ :tf41_order_no_pre => {
2165
+ :description => "Order number prefix",
2166
+ :format => "X(1)",
2167
+ :length => 1,
2168
+ :position => (3..3),
2169
+ :required => true,
2170
+ :required_once => false
2171
+ },
2172
+ :tf41_order_no => {
2173
+ :description => "Order number",
2174
+ :format => "X(7)",
2175
+ :length => 7,
2176
+ :position => (4..10),
2177
+ :required => true,
2178
+ :required_once => false
2179
+ },
2180
+ :tf41_comment1 => {
2181
+ :description => "First 60 character customize comment",
2182
+ :format => "X(60)",
2183
+ :length => 60,
2184
+ :position => (11..70),
2185
+ :required => true,
2186
+ :required_once => false
2187
+ },
2188
+ :tf41_comment2 => {
2189
+ :description => "Second 60 character customize comment",
2190
+ :format => "X(60)",
2191
+ :length => 60,
2192
+ :position => (71..130),
2193
+ :required => true,
2194
+ :required_once => false
2195
+ },
2196
+ :tf41_bank_acct1 => {
2197
+ :description => "Bank account 1 (Y/N)",
2198
+ :format => "X(1)",
2199
+ :length => 1,
2200
+ :position => (131..131),
2201
+ :required => false,
2202
+ :required_once => false
2203
+ },
2204
+ :tf41_bank_acct2 => {
2205
+ :description => "Bank account 2 (Y/N)",
2206
+ :format => "X(1)",
2207
+ :length => 1,
2208
+ :position => (132..132),
2209
+ :required => false,
2210
+ :required_once => false
2211
+ },
2212
+ :tf41_edp_nox => {
2213
+ :description => "Kit component product EDP number.",
2214
+ :format => "X(9)",
2215
+ :length => 9,
2216
+ :position => (133..141),
2217
+ :required => false,
2218
+ :required_once => false
2219
+ },
2220
+ :tf41_citb_token_no => {
2221
+ :description => "CardintheBox Token",
2222
+ :format => "X(9)",
2223
+ :length => 9,
2224
+ :position => (142..150),
2225
+ :required => false,
2226
+ :required_once => false
2227
+ },
2228
+ :tf41_citb_sku => {
2229
+ :description => "CardintheBox SKU",
2230
+ :format => "X(9)",
2231
+ :length => 9,
2232
+ :position => (151..159),
2233
+ :required => false,
2234
+ :required_once => false
2235
+ },
2236
+ :tf41_filler => {
2237
+ :description => "Spaces",
2238
+ :format => "X(140)",
2239
+ :length => 140,
2240
+ :position => (160..299),
2241
+ :required => false,
2242
+ :required_once => false
2243
+ },
2244
+ :tf41_flag => {
2245
+ :description => "Internal use only",
2246
+ :format => "X(1)",
2247
+ :length => 1,
2248
+ :position => (300..300),
2249
+ :required => false,
2250
+ :required_once => false
2251
+ },
2252
+ :tf41_item_no => {
2253
+ :description => "Internal use only",
2254
+ :format => "X(20)",
2255
+ :length => 20,
2256
+ :position => (301..320),
2257
+ :required => false,
2258
+ :required_once => false
2259
+ },
2260
+ :tf42_rec_type => {
2261
+ :description => "Record Type 42: Variable component (multiple-optional)",
2262
+ :format => "X(2)",
2263
+ :length => 2,
2264
+ :position => (1..2),
2265
+ :required => true,
2266
+ :required_once => false
2267
+ },
2268
+ :tf42_order_no_pre => {
2269
+ :description => "Order number prefix",
2270
+ :format => "X(1)",
2271
+ :length => 1,
2272
+ :position => (3..3),
2273
+ :required => true,
2274
+ :required_once => false
2275
+ },
2276
+ :tf42_order_no => {
2277
+ :description => "Order number",
2278
+ :format => "X(7)",
2279
+ :length => 7,
2280
+ :position => (4..10),
2281
+ :required => true,
2282
+ :required_once => false
2283
+ },
2284
+ :tf42_quantity => {
2285
+ :description => "Line item quantity (blank or 0 = the line item is canceled)",
2286
+ :format => "9(6)",
2287
+ :length => 6,
2288
+ :position => (11..16),
2289
+ :required => true,
2290
+ :required_once => false
2291
+ },
2292
+ :tf42_edp_no => {
2293
+ :description => "Internal Ecometry number (optional) Spaces = use product number to find product",
2294
+ :format => "9(9)",
2295
+ :length => 9,
2296
+ :position => (17..25),
2297
+ :required => false,
2298
+ :required_once => false
2299
+ },
2300
+ :tf42_tax_exem_no => {
2301
+ :description => "Tax identification number (optional) becomes an account comment",
2302
+ :format => "X(60)",
2303
+ :length => 60,
2304
+ :position => (26..85),
2305
+ :required => false,
2306
+ :required_once => false
2307
+ },
2308
+ :tf42_item_no => {
2309
+ :description => "Product number in Ecometry",
2310
+ :format => "X(20)",
2311
+ :length => 20,
2312
+ :position => (86..105),
2313
+ :required => true,
2314
+ :required_once => false
2315
+ },
2316
+ :tf42_tax_amt => {
2317
+ :description => "Total tax amount for order (optional) (only used in the first Record Type 40 for each order) Blank = Ecometry calculates the tax amount at Order Entry",
2318
+ :format => "9(5)v9(2)",
2319
+ :length => 7,
2320
+ :position => (106..112),
2321
+ :required => false,
2322
+ :required_once => false
2323
+ },
2324
+ :tf42_tax_rate => {
2325
+ :description => "Tax rate assigned to order. Blank or 0 = Ecometry calculates the tax",
2326
+ :format => "9(2)v9(4)",
2327
+ :length => 6,
2328
+ :position => (113..118),
2329
+ :required => false,
2330
+ :required_once => false
2331
+ },
2332
+ :tf42_tax_exem => {
2333
+ :description => "Order is tax exempt (Y/N)",
2334
+ :format => "X(1)",
2335
+ :length => 1,
2336
+ :position => (119..119),
2337
+ :required => false,
2338
+ :required_once => false
2339
+ },
2340
+ :tf42_ship_meth => {
2341
+ :description => "Ship method (optional). Valid ship method 01-99.",
2342
+ :format => "9(2)",
2343
+ :length => 2,
2344
+ :position => (120..121),
2345
+ :required => false,
2346
+ :required_once => false
2347
+ },
2348
+ :tf42_post_amt => {
2349
+ :description => "Total postage for order (optional). If blank, Batch Order changes postage the same as Order Entry. If 0, Batch Order does not charge postage for the order.",
2350
+ :format => "9(5)v9(2)",
2351
+ :length => 7,
2352
+ :position => (122..128),
2353
+ :required => false,
2354
+ :required_once => false
2355
+ },
2356
+ :tf42_price => {
2357
+ :description => "Spaces = Ecometry pricing routine 0 = No Charge for this product",
2358
+ :format => "9(7)v9(2)",
2359
+ :length => 9,
2360
+ :position => (129..137),
2361
+ :required => false,
2362
+ :required_once => false
2363
+ },
2364
+ :tf42_filler => {
2365
+ :description => "Spaces",
2366
+ :format => "X(183)",
2367
+ :length => 183,
2368
+ :position => (138..320),
2369
+ :required => false,
2370
+ :required_once => false
2371
+ },
2372
+ }
2373
+ end
2374
+ end