C:\Users\Donna\Desktop\1403_03\old\wfeco15b.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Program : WFECO15B
*S*** System : FINANCIER
*S*** Title : Electronic Correction Export
*S*** Function : This program exports Correction and Duplicate Request
*S*** records from the WF-ECAR file.
*S***
*S*** Copyright 1995 - 2013 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S***
*S** LOCAL USING WWREQIBD /* Input parameter PDA
*S** LOCAL USING WFECARSD /* Passed to object subprogram
*S** LOCAL USING WFECARSR /* Passed to object subprogram
*S** LOCAL USING WFCPC15D /* Passed to object subprogram
*S** LOCAL USING WFCPC15R /* Passed to object subprogram
*S** LOCAL USING WFFED15D /* Passed to object subprogram
*S** LOCAL USING WFFED15R /* Passed to object subprogram
*S** LOCAL USING WWTABLED /* Passed to object subprogram
*S** LOCAL USING WWTABLER /* Passed to object subprogram
*S** LOCAL USING WWAOBJ /* Used by object subprograms
*S***
*S** LOCAL USING WWCONST /* Constants LDA
*S** LOCAL USING WFECARSL /* ECARS LDA
*S***
*S** LOCAL
*S** 01 #MAX-READ(P3) INIT<50>
*S** 01 #MAX-WRITE(P3) INIT<10>
*S** 01 #ET-READ-COUNTER(P7)
*S** 01 #ET-WRITE-COUNTER(P7)
*S***
*S** 01 #READ-COUNTER(P7)
*S** 01 #BYPASS-COUNTER(P7)
*S** 01 #WRITE-COUNTER(P7)
*S** 01 #ECAR-COUNTER(P7)
*S***
*S** 01 #END-KEY
*S** 02 WF-EC-TYPE(A3)
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-EC-NEW-REJ(A1)
*S** 01 REDEFINE #END-KEY
*S** 02 #END-KEY-RED(A19)
*S***
*S*** Literals utilized by Event History routine
*S** 01 #EVENT-TYPE(A5) CONST<'ECorr'>
*S** 01 #EVENT-DESC(A40)
*S***
*S*** Fields used in 2015 data massaging
*S** 01 #FMT-DATE(D)
*S** 01 #FLDNO-PJ(A3) INIT<'163'>
*S***
*S** 01 #ECAR-WRITTEN(L)
*S** 01 #BYPASS-ECAR(L)
*S** 01 #REJ-ASM-OVR(L)
*S** 01 #EMAIL-UPD(L)
*S** 01 #HS-UPD(L)
*S** 01 #LAST-CORR(P3)
*S** 01 #HOLD-NEW-REJ(A1)
*S** 01 #EFF-DATE(D)
*S** 01 #RPT-MSG(A20)
*S***
*S** 01 #CNVT-BYTE(A1)
*S** 01 #SIGNED-FIELD(L)
*S** 01 #FIELD-NEG(N1)
*S** 01 #FIELD-LENGTH(N2)
*S** 01 #NEGATIVE(L)
*S** 01 #ECAR-NUMERICS
*S** 02 #ECAR-N3(N3)
*S** 02 REDEFINE #ECAR-N3
*S** 03 #ECAR-A3(A3)
*S** 02 #ECAR-N4(N4)
*S** 02 REDEFINE #ECAR-N4
*S** 03 #ECAR-A4(A4)
*S** 02 #ECAR-N5(N5)
*S** 02 REDEFINE #ECAR-N5
*S** 03 #ECAR-A5(A5)
*S** 02 #ECAR-N6(N6)
*S** 02 REDEFINE #ECAR-N6
*S** 03 #ECAR-A6(A6)
*S** 02 #ECAR-N7(N7)
*S** 02 REDEFINE #ECAR-N7
*S** 03 #ECAR-A7(A7)
*S***
*S*** Output files
*S** 01 WF-ECAR
*S** 02 #YR(A1)
*S** 02 #PELLID(A13)
*S** 02 #CORRECTIONS(A38/12)
*S** 02 REDEFINE #CORRECTIONS
*S** 03 #DATA-CORR(12)
*S** 04 #FLD(A3)
*S** 04 #VAL(A35)
*S** 02 #EMAIL-ADDR(A50)
*S** 02 #EMAIL-ADDR-PAR(A50)
*S** 02 #HS-NAME(A50)
*S** 02 #TRAN-SRCE-TYPE(A2)
*S** 02 #XMIT-DATE(A8)
*S** 02 #ASM1-OVR(A1)
*S** 02 #ASM2-OVR(A1)
*S** 02 #ASM3-OVR(A1)
*S** 02 #ASM4-OVR(A1)
*S** 02 #ASM5-OVR(A1)
*S** 02 #ASM6-OVR(A1)
*S** 02 #REJ3-OVR(A1)
*S** 02 #REJ12-OVR(A1)
*S** 02 #REJ20-OVR(A1)
*S** 02 #REJA-OVR(A1)
*S** 02 #REJB-OVR(A1)
*S** 02 #REJC-OVR(A1)
*S** 02 #REJG-OVR(A1)
*S** 02 #REJJ-OVR(A1)
*S** 02 #REJK-OVR(A1)
*S** 02 #REJN-OVR(A1)
*S** 02 #REJW-OVR(A1)
*S** 02 #REJ21-OVR(A1)
*S** 02 #COLLEGE-CODE(A6)
*S** 02 #FILLER2(A26)
*S***
*S** 01 #AID-CCYY(A4)
*S** 01 REDEFINE #AID-CCYY
*S** 02 #AID-CC(A2)
*S** 02 #AID-YY(A2)
*S** 02 REDEFINE #AID-YY
*S** 03 #AID-Y1(N1)
*S** 03 #AID-Y2(N1)
*S***
*S** 01 #SUBSCRIPTS
*S** 02 #SUB(P3)
*S** 02 #SUB2(P3)
*S** 02 #SUB3(P3)
*S***
*S** 01 #PASS-FIELDS
*S** 02 #STATUS-FUNCTION(A8)
*S** 02 #STATUS-DECISION(A1)
*S** 02 #PASS-STAT(A1)
*S**END-DEFINE
*S***
*S*** Define printers, formats, headings
*S**EJECT OFF(1)
*S**FORMAT(1) LS=80 PS=60 ZP=ON IS=OFF ES=OFF SG=OFF
*S**FORMAT(3) LS=80 PS=60 ZP=ON IS=OFF ES=OFF SG=OFF
*S***
*S**AT TOP OF PAGE(3)
*S** WRITE(3) NOTITLE ##PGM-ID
*S** 16T '*** FINANCIER ELECTRONIC CORRECTIONS EXPORT ***'
*S** 71T 'Page' *PAGE-NUMBER(3)(EM=ZZ9)
*S** / *DATX(EM=LLL' 'DD', 'YYYY)
*S** 30T 'Limited Trial/Sample'
*S** 71T *TIMX(EM=HH':'II' 'AP)
*S** // 31T 'Aid Year:' ##DISP-AY
*S** / 36T ##DISP-LIT ##DISP-FAO
*S** /// 'StudentID Name'
*S** SKIP(3) 1
*S**END-TOPPAGE
*S***
*S*************************************************************************
*S***
*S*** Load parameters
*S** MOVE ##PASS-TEMP TO PASS-BATCH-FLDS
*S** MOVE ##AID-YEAR TO #AID-CCYY
*S** MOVE #INPUT-EFF-DATE-D TO #EFF-DATE
*S***
*S*** Get FAO record
*S** MOVE 'GET' TO WWAOBJ.#FUNCTION
*S** ASSIGN WWTABLED.WW-RECORD-TYPE = TABLE-TYPE
*S** ASSIGN WWTABLED.WW-TABLE-ID = 'FAO'
*S** ASSIGN WWTABLED.WW-TABLE-VALUE = ##FAO-ID
*S** PERFORM CALL-OBJECT-TABLE
*S***
*S*** Set up keys for sequential file processing
*S** RESET WFECARSD
*S** ASSIGN WFECARSD.WF-EC-TYPE = EDE-TYPE
*S** ASSIGN WFECARSD.WF-AID-YEAR = ##AID-YEAR
*S** ASSIGN WFECARSD.WF-FAO = ##FAO-ID
*S** MOVE BY NAME WFECARSD TO #END-KEY
*S** MOVE H'FF' TO #END-KEY.WW-STUDENT-ID
*S** #END-KEY.WF-EC-NEW-REJ
*S***
*S***
*S**PROG.
*S** REPEAT
*S** /*
*S** /* Read next ECAR record
*S** MOVE 'NEXT' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** /*
*S** /* End of records to be processed
*S** IF NOT WWAOBJ.#EXISTS OR
*S** WFECARSD-ID > #END-KEY-RED
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S** END-IF
*S** /*
*S** ADD 1 TO #READ-COUNTER
*S** ADD 1 TO #ET-READ-COUNTER
*S** IF #ET-READ-COUNTER > #MAX-READ
*S** PERFORM COMMIT-OR-BACKOUT
*S** END-IF
*S** MOVE WFECARSD.WW-STUDENT-ID TO ##STUDENT-ID
*S** /*
*S** /* If RECOVER mode, process "X" records
*S** IF #INPUT-RUNMODE = 'RECOVER'
*S** IF WFECARSD.WF-EC-NEW-REJ NE 'X' OR
*S** WFECARSD.WW-CDATE NE #EFF-DATE
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If not RECOVER mode, skip "X" records
*S** ELSE
*S** IF WFECARSD.WF-EC-NEW-REJ = 'X'
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* Skip "N" record if an "R" record exists
*S** IF WFECARSD.WF-EC-NEW-REJ = 'N'
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = 'R'
*S** MOVE 'EXISTS' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = 'N'
*S** IF WWAOBJ.#EXISTS
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** /* Bypass record if student has corrections already in process
*S** IF #INPUT-RUNMODE NE 'RECOVER'
*S** MOVE WFECARSD.WF-EC-NEW-REJ TO #HOLD-NEW-REJ
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = 'X'
*S** MOVE 'EXISTS' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = #HOLD-NEW-REJ
*S** IF WWAOBJ.#EXISTS
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** ELSE
*S** MOVE 'GET' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get CPS data
*S** ASSIGN WFCPC15D.WF-FAO = ##FAO-ID
*S** ASSIGN WFCPC15D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-CPS
*S** /*
*S** /* Only process WF-ECAR records if:
*S** /* submit flag set to C (corrections pending)
*S** /* AND student has a Pell ID
*S** IF #INPUT-RUNMODE NE 'RECOVER'
*S** IF WFECARSD.WF-EC-SUBMIT NE 'C' OR
*S** (WFECARSD.WF-EC-SUBMIT = 'C' AND
*S** WFCPC15D.WF-CP-FED-ID = SPACE)
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** END-IF
*S** /*
*S** PERFORM GET-STUDENT-INFO
*S** /*
*S** /* Perform Decision status lookup
*S** IF #INPUT-RUNMODE NE 'RECOVER'
*S** MOVE 'ElecCorr' TO #STATUS-FUNCTION
*S** PERFORM GET-STATUS-FUNCTION #STATUS-FUNCTION #STATUS-DECISION
*S** IF #STATUS-DECISION NE 'Y'
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** END-IF
*S** /*
*S** /* Perform appropriate subroutine for correction tape source
*S** MOVE BY NAME WFECARSD TO WFECARSL
*S** PERFORM LOAD-ECAR
*S** /*
*S** /* Add event
*S** IF #ECAR-WRITTEN
*S** PERFORM ADD-EVENT #EVENT-TYPE #EVENT-DESC
*S** END-IF
*S** /*
*S** /* If limited run, print report line
*S** IF (#INPUT-RUNMODE = 'TRIAL' OR = 'SAMPLE')
*S** AND #INPUT-LIMIT-COUNT > 0
*S** IF #ECAR-WRITTEN
*S** MOVE 'Correction(s)' TO #RPT-MSG
*S** WRITE(3) ##SID ##COMP-NAME #RPT-MSG
*S** END-IF
*S** END-IF
*S** /*
*S** /* Check for limited-run maximum
*S** IF (#INPUT-RUNMODE = 'TRIAL' OR = 'SAMPLE')
*S** AND #INPUT-LIMIT-COUNT > 0
*S** IF #WRITE-COUNTER GE #INPUT-LIMIT-COUNT
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S** END-IF
*S** END-IF
*S** END-REPEAT /* PROG.
*S***
*S*** Issue final END TRANSACTION
*S** PERFORM COMMIT-OR-BACKOUT
*S***
*S*** Print job statistics
*S** WRITE(1) NOTITLE
*S** 15T 'FINANCIER processing:' /
*S** 17T 'Correction records read:'
*S** (I) 55T #READ-COUNTER (EM=Z,ZZZ,ZZ9) //
*S** 17T 'Students with corrections exported:'
*S** (I) 55T #ECAR-COUNTER (EM=Z,ZZZ,ZZ9) /
*S** 19T 'Electronic transactions exported:'
*S** (I) 55T #WRITE-COUNTER (EM=Z,ZZZ,ZZ9) /
*S** 17T 'Correction records bypassed:'
*S** (I) 55T #BYPASS-COUNTER (EM=Z,ZZZ,ZZ9) /
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-CPS
*S*************************************************************************
*S** /*
*S** /* Call WF-CPS file object subprogram
*S** CALLNAT 'WFCPC15O' WW-GDA
*S** WFCPC15D
*S** WFCPC15D-ID
*S** WFCPC15R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-CPS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-ECARS
*S*************************************************************************
*S** /*
*S** /* Call WF-ECARS file object subprogram
*S** CALLNAT 'WFECARSO' WW-GDA
*S** WFECARSD
*S** WFECARSD-ID
*S** WFECARSR
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-ECARS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-FEDERAL
*S*************************************************************************
*S** /*
*S** /* Call WF-FEDERAL file object subprogram
*S** CALLNAT 'WFFED15O' WW-GDA
*S** WFFED15D
*S** WFFED15D-ID
*S** WFFED15R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-FEDERAL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-TABLE
*S*************************************************************************
*S** /*
*S** /* Call WW-TABLE file object subprogram
*S** CALLNAT 'WWTABLEO' WW-GDA
*S** WWTABLED
*S** WWTABLED-ID
*S** WWTABLER
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-TABLE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE LOAD-ECAR
*S*************************************************************************
*S** /*
*S** RESET #ECAR-WRITTEN
*S** #BYPASS-ECAR
*S** #REJ-ASM-OVR
*S** #EMAIL-UPD
*S** #HS-UPD
*S** /*
*S** /* Find last correction (may not be consecutive if manual deletes)
*S** ASSIGN #LAST-CORR = 0
*S** FOR #SUB = 100 TO 1 STEP -1
*S** IF ECAR-FIELD(#SUB) NE SPACE
*S** ASSIGN #LAST-CORR = #SUB
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-FOR
*S** IF #LAST-CORR = 0
*S** ASSIGN #BYPASS-ECAR = TRUE
*S** ELSE
*S** /*
*S** /* Read WF-FEDERAL record
*S** ASSIGN WFFED15D.WF-FAO = ##FAO-ID
*S** ASSIGN WFFED15D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-FEDERAL
*S** /*
*S** /* If professional judgment flag set, insure that it is sent
*S** IF WFFED15D.WF-FE-F-PROF-JUDG = 'Y'
*S** FOR #SUB = 1 TO #LAST-CORR STEP 1
*S** IF ECAR-FIELD(#SUB) = #FLDNO-PJ
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-FOR
*S** IF ECAR-FIELD(#SUB) NE #FLDNO-PJ
*S** ADD 1 TO #LAST-CORR
*S** ASSIGN ECAR-FIELD(#LAST-CORR) = #FLDNO-PJ
*S** ASSIGN ECAR-VALUE(#LAST-CORR) = '1'
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get reject/assumption overrides from WF-FEDERAL record
*S** ASSIGN WFFED15D.WF-FAO = ##FAO-ID
*S** ASSIGN WFFED15D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-FEDERAL
*S** DECIDE FOR EVERY CONDITION
*S** WHEN WFFED15D.WF-FE-F-REJ3-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ3-OVR
*S** WHEN WFFED15D.WF-FE-F-REJ12-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ12-OVR
*S** WHEN WFFED15D.WF-FE-F-REJ20-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ20-OVR
*S** WHEN WFFED15D.WF-FE-F-REJ21-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ21-OVR
*S** WHEN WFFED15D.WF-FE-F-REJA-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJA-OVR
*S** WHEN WFFED15D.WF-FE-F-REJB-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJB-OVR
*S** WHEN WFFED15D.WF-FE-F-REJC-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJC-OVR
*S** WHEN WFFED15D.WF-FE-F-REJG-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJG-OVR
*S** WHEN WFFED15D.WF-FE-F-REJJ-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJJ-OVR
*S** WHEN WFFED15D.WF-FE-F-REJK-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJK-OVR
*S** WHEN WFFED15D.WF-FE-F-REJN-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJN-OVR
*S** WHEN WFFED15D.WF-FE-F-REJW-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJW-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM1-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM1-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM2-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM2-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM3-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM3-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM4-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM4-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM5-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM5-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM6-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM6-OVR
*S** WHEN ANY
*S** ASSIGN #REJ-ASM-OVR = TRUE
*S** WHEN NONE
*S** IGNORE
*S** END-DECIDE
*S** /*
*S** PERFORM MASSAGE-DATA-2015
*S** RESET #SUB2
*S** ADD 1 TO #ECAR-COUNTER
*S** FOR #SUB = 1 TO #LAST-CORR
*S** IF ECAR-FIELD(#SUB) = ' '
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If reject or assumption override, skip
*S** /* (Override "corrections" trigger transmission, but must
*S** /* be sent with every history correciton submission, so
*S** /* they are retrieved from the WF-FEDERAL record above.)
*S** IF SUBSTRING(ECAR-FIELD(#SUB),1,2) = 'OR' OR = 'OA'
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If e-mail address update, load fixed field and skip
*S** IF ECAR-FIELD(#SUB) = 'EMA'
*S** MOVE ECAR-VALUE (#SUB) TO WF-ECAR.#EMAIL-ADDR
*S** ASSIGN #EMAIL-UPD = TRUE
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If high school name update, load fixed field and skip
*S** IF ECAR-FIELD(#SUB) = 'HSN'
*S** MOVE ECAR-VALUE (#SUB) TO WF-ECAR.#HS-NAME
*S** ASSIGN #HS-UPD = TRUE
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** ADD 1 TO #SUB2
*S** MOVE ECAR-FIELD(#SUB) TO WF-ECAR.#FLD(#SUB2)
*S** MOVE ECAR-VALUE(#SUB) TO WF-ECAR.#VAL(#SUB2)
*S** IF #SUB2 = 12
*S** PERFORM WRITE-ECAR
*S** END-IF
*S** END-FOR
*S** IF #SUB2 > 0 OR #REJ-ASM-OVR OR #EMAIL-UPD OR #HS-UPD
*S** PERFORM WRITE-ECAR
*S** END-IF
*S** ASSIGN #ECAR-WRITTEN = TRUE
*S** COMPRESS 'Correction/FedID #' WFCPC15D.WF-CP-FED-ID
*S** INTO #EVENT-DESC LEAVING NO
*S** END-IF
*S** /*
*S** /* If record written or empty ECAR record found,
*S** /* replace ECAR record with "transmitted" type
*S** IF #ECAR-WRITTEN OR #BYPASS-ECAR
*S** ASSIGN WWAOBJ.#FUNCTION = 'DELETE'
*S** PERFORM CALL-OBJECT-ECARS
*S** RESET ##MSG
*S** MOVE 'X' TO WFECARSD.WF-EC-NEW-REJ
*S** ASSIGN WWAOBJ.#FUNCTION = 'STORE'
*S** PERFORM CALL-OBJECT-ECARS
*S** ADD 1 TO #ET-WRITE-COUNTER
*S** IF #ET-WRITE-COUNTER > #MAX-WRITE
*S** PERFORM COMMIT-OR-BACKOUT
*S** END-IF
*S** END-IF
*S**END-SUBROUTINE /* LOAD-ECAR
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE MASSAGE-DATA-2015
*S*************************************************************************
*S** /*
*S** FOR #SUB = 1 TO #LAST-CORR
*S** IF ECAR-FIELD(#SUB) = ' '
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* Sign numeric fields
*S** RESET #SIGNED-FIELD
*S** DECIDE ON FIRST VALUE OF ECAR-FIELD(#SUB)
*S** VALUE '038', '041', '042', '100', '103', '104'
*S** ASSIGN #SIGNED-FIELD = TRUE
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** IF #SIGNED-FIELD
*S** EXAMINE ECAR-VALUE(#SUB) FOR '-' DELETE GIVING NUMBER #FIELD-NEG
*S** EXAMINE ECAR-VALUE(#SUB) FOR '%' GIVING LENGTH #FIELD-LENGTH
*S** RESET #NEGATIVE
*S** IF #FIELD-NEG > 0
*S** ASSIGN #NEGATIVE = TRUE
*S** END-IF
*S** DECIDE ON FIRST VALUE OF #FIELD-LENGTH
*S** VALUE 3
*S** IF ECAR-VALUE(#SUB) IS (N3)
*S** ASSIGN #ECAR-N3 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A3,3,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A3,3,1)
*S** MOVE #ECAR-A3 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 4
*S** IF ECAR-VALUE(#SUB) IS (N4)
*S** ASSIGN #ECAR-N4 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A4,4,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A4,4,1)
*S** MOVE #ECAR-A4 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 5
*S** IF ECAR-VALUE(#SUB) IS (N5)
*S** ASSIGN #ECAR-N5 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A5,5,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A5,5,1)
*S** MOVE #ECAR-A5 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 6
*S** IF ECAR-VALUE(#SUB) IS (N6)
*S** ASSIGN #ECAR-N6 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A6,6,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A6,6,1)
*S** MOVE #ECAR-A6 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 7
*S** IF ECAR-VALUE(#SUB) IS (N7)
*S** ASSIGN #ECAR-N7 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A7,7,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A7,7,1)
*S** MOVE #ECAR-A7 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** END-IF
*S** END-FOR
*S**END-SUBROUTINE /* MASSAGE-DATA-2015
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE WRITE-ECAR
*S*************************************************************************
*S** /*
*S** /* Write Correction record when maximum occurrence reached
*S** MOVE #AID-Y2 TO WF-ECAR.#YR
*S** MOVE '1C' TO WF-ECAR.#TRAN-SRCE-TYPE
*S** MOVE WFCPC15D.WF-CP-FED-ID TO WF-ECAR.#PELLID
*S** IF WFCPC15D.WF-CP-COLLEGE = SPACE
*S** MOVE ##FAO-INST-CODE TO WF-ECAR.#COLLEGE-CODE
*S** ELSE
*S** MOVE WFCPC15D.WF-CP-COLLEGE TO WF-ECAR.#COLLEGE-CODE
*S** END-IF
*S** MOVE EDITED *DATX(EM=YYYYMMDD) TO WF-ECAR.#XMIT-DATE
*S** WRITE WORK FILE 1 WF-ECAR
*S** ADD 1 TO #WRITE-COUNTER
*S** RESET #SUB2
*S** RESET #REJ-ASM-OVR
*S** #EMAIL-UPD
*S** #HS-UPD
*S** RESET WF-ECAR
*S**END-SUBROUTINE /* WRITE-ECAR
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE COMMIT-OR-BACKOUT
*S*************************************************************************
*S** /*
*S** /* Periodically issue END TRANSACTION
*S** IF #INPUT-RUNMODE = 'TRIAL'
*S** BACKOUT TRANSACTION
*S** ELSE
*S** END TRANSACTION
*S** END-IF
*S** RESET #ET-READ-COUNTER #ET-WRITE-COUNTER
*S**END-SUBROUTINE /* COMMIT-OR-BACKOUT
*S**END
*E
C:\Users\Donna\Desktop\1403_03\new\wfeco15b.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Program : WFECO15B
*S*** System : FINANCIER
*S*** Title : Electronic Correction Export
*S*** Function : This program exports Correction and Duplicate Request
*S*** records from the WF-ECAR file.
*S***
*S*** Copyright 1995 - 2013 WolffPack, Inc. All rights reserved.
*S***
*S*** *****NOTE: Update MASSAGE-DATA-YYYY Section each year to account
*S*** for changed cps field numbers related to signed fields
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S***
*S** LOCAL USING WWREQIBD /* Input parameter PDA
*S** LOCAL USING WFECARSD /* Passed to object subprogram
*S** LOCAL USING WFECARSR /* Passed to object subprogram
*S** LOCAL USING WFCPC15D /* Passed to object subprogram
*S** LOCAL USING WFCPC15R /* Passed to object subprogram
*S** LOCAL USING WFFED15D /* Passed to object subprogram
*S** LOCAL USING WFFED15R /* Passed to object subprogram
*S** LOCAL USING WWTABLED /* Passed to object subprogram
*S** LOCAL USING WWTABLER /* Passed to object subprogram
*S** LOCAL USING WWAOBJ /* Used by object subprograms
*S***
*S** LOCAL USING WWCONST /* Constants LDA
*S** LOCAL USING WFECARSL /* ECARS LDA
*S***
*S** LOCAL
*S** 01 #MAX-READ(P3) INIT<50>
*S** 01 #MAX-WRITE(P3) INIT<10>
*S** 01 #ET-READ-COUNTER(P7)
*S** 01 #ET-WRITE-COUNTER(P7)
*S***
*S** 01 #READ-COUNTER(P7)
*S** 01 #BYPASS-COUNTER(P7)
*S** 01 #WRITE-COUNTER(P7)
*S** 01 #ECAR-COUNTER(P7)
*S***
*S** 01 #END-KEY
*S** 02 WF-EC-TYPE(A3)
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-EC-NEW-REJ(A1)
*S** 01 REDEFINE #END-KEY
*S** 02 #END-KEY-RED(A19)
*S***
*S*** Literals utilized by Event History routine
*S** 01 #EVENT-TYPE(A5) CONST<'ECorr'>
*S** 01 #EVENT-DESC(A40)
*S***
*S*** Fields used in 2015 data massaging
*S** 01 #FMT-DATE(D)
*S** 01 #FLDNO-PJ(A3) INIT<'163'>
*S***
*S** 01 #ECAR-WRITTEN(L)
*S** 01 #BYPASS-ECAR(L)
*S** 01 #REJ-ASM-OVR(L)
*S** 01 #EMAIL-UPD(L)
*S** 01 #HS-UPD(L)
*S** 01 #LAST-CORR(P3)
*S** 01 #HOLD-NEW-REJ(A1)
*S** 01 #EFF-DATE(D)
*S** 01 #RPT-MSG(A20)
*S***
*S** 01 #CNVT-BYTE(A1)
*S** 01 #SIGNED-FIELD(L)
*S** 01 #FIELD-NEG(N1)
*S** 01 #FIELD-LENGTH(N2)
*S** 01 #NEGATIVE(L)
*S** 01 #ECAR-NUMERICS
*S** 02 #ECAR-N3(N3)
*S** 02 REDEFINE #ECAR-N3
*S** 03 #ECAR-A3(A3)
*S** 02 #ECAR-N4(N4)
*S** 02 REDEFINE #ECAR-N4
*S** 03 #ECAR-A4(A4)
*S** 02 #ECAR-N5(N5)
*S** 02 REDEFINE #ECAR-N5
*S** 03 #ECAR-A5(A5)
*S** 02 #ECAR-N6(N6)
*S** 02 REDEFINE #ECAR-N6
*S** 03 #ECAR-A6(A6)
*S** 02 #ECAR-N7(N7)
*S** 02 REDEFINE #ECAR-N7
*S** 03 #ECAR-A7(A7)
*S***
*S*** Output files
*S** 01 WF-ECAR
*S** 02 #YR(A1)
*S** 02 #PELLID(A13)
*S** 02 #CORRECTIONS(A38/12)
*S** 02 REDEFINE #CORRECTIONS
*S** 03 #DATA-CORR(12)
*S** 04 #FLD(A3)
*S** 04 #VAL(A35)
*S** 02 #EMAIL-ADDR(A50)
*S** 02 #EMAIL-ADDR-PAR(A50)
*S** 02 #HS-NAME(A50)
*S** 02 #TRAN-SRCE-TYPE(A2)
*S** 02 #XMIT-DATE(A8)
*S** 02 #ASM1-OVR(A1)
*S** 02 #ASM2-OVR(A1)
*S** 02 #ASM3-OVR(A1)
*S** 02 #ASM4-OVR(A1)
*S** 02 #ASM5-OVR(A1)
*S** 02 #ASM6-OVR(A1)
*S** 02 #REJ3-OVR(A1)
*S** 02 #REJ12-OVR(A1)
*S** 02 #REJ20-OVR(A1)
*S** 02 #REJA-OVR(A1)
*S** 02 #REJB-OVR(A1)
*S** 02 #REJC-OVR(A1)
*S** 02 #REJG-OVR(A1)
*S** 02 #REJJ-OVR(A1)
*S** 02 #REJK-OVR(A1)
*S** 02 #REJN-OVR(A1)
*S** 02 #REJW-OVR(A1)
*S** 02 #REJ21-OVR(A1)
*S** 02 #COLLEGE-CODE(A6)
*S** 02 #FILLER2(A26)
*S***
*S** 01 #AID-CCYY(A4)
*S** 01 REDEFINE #AID-CCYY
*S** 02 #AID-CC(A2)
*S** 02 #AID-YY(A2)
*S** 02 REDEFINE #AID-YY
*S** 03 #AID-Y1(N1)
*S** 03 #AID-Y2(N1)
*S***
*S** 01 #SUBSCRIPTS
*S** 02 #SUB(P3)
*S** 02 #SUB2(P3)
*S** 02 #SUB3(P3)
*S***
*S** 01 #PASS-FIELDS
*S** 02 #STATUS-FUNCTION(A8)
*S** 02 #STATUS-DECISION(A1)
*S** 02 #PASS-STAT(A1)
*S**END-DEFINE
*S***
*S*** Define printers, formats, headings
*S**EJECT OFF(1)
*S**FORMAT(1) LS=80 PS=60 ZP=ON IS=OFF ES=OFF SG=OFF
*S**FORMAT(3) LS=80 PS=60 ZP=ON IS=OFF ES=OFF SG=OFF
*S***
*S**AT TOP OF PAGE(3)
*S** WRITE(3) NOTITLE ##PGM-ID
*S** 16T '*** FINANCIER ELECTRONIC CORRECTIONS EXPORT ***'
*S** 71T 'Page' *PAGE-NUMBER(3)(EM=ZZ9)
*S** / *DATX(EM=LLL' 'DD', 'YYYY)
*S** 30T 'Limited Trial/Sample'
*S** 71T *TIMX(EM=HH':'II' 'AP)
*S** // 31T 'Aid Year:' ##DISP-AY
*S** / 36T ##DISP-LIT ##DISP-FAO
*S** /// 'StudentID Name'
*S** SKIP(3) 1
*S**END-TOPPAGE
*S***
*S*************************************************************************
*S***
*S*** Load parameters
*S** MOVE ##PASS-TEMP TO PASS-BATCH-FLDS
*S** MOVE ##AID-YEAR TO #AID-CCYY
*S** MOVE #INPUT-EFF-DATE-D TO #EFF-DATE
*S***
*S*** Get FAO record
*S** MOVE 'GET' TO WWAOBJ.#FUNCTION
*S** ASSIGN WWTABLED.WW-RECORD-TYPE = TABLE-TYPE
*S** ASSIGN WWTABLED.WW-TABLE-ID = 'FAO'
*S** ASSIGN WWTABLED.WW-TABLE-VALUE = ##FAO-ID
*S** PERFORM CALL-OBJECT-TABLE
*S***
*S*** Set up keys for sequential file processing
*S** RESET WFECARSD
*S** ASSIGN WFECARSD.WF-EC-TYPE = EDE-TYPE
*S** ASSIGN WFECARSD.WF-AID-YEAR = ##AID-YEAR
*S** ASSIGN WFECARSD.WF-FAO = ##FAO-ID
*S** MOVE BY NAME WFECARSD TO #END-KEY
*S** MOVE H'FF' TO #END-KEY.WW-STUDENT-ID
*S** #END-KEY.WF-EC-NEW-REJ
*S***
*S***
*S**PROG.
*S** REPEAT
*S** /*
*S** /* Read next ECAR record
*S** MOVE 'NEXT' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** /*
*S** /* End of records to be processed
*S** IF NOT WWAOBJ.#EXISTS OR
*S** WFECARSD-ID > #END-KEY-RED
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S** END-IF
*S** /*
*S** ADD 1 TO #READ-COUNTER
*S** ADD 1 TO #ET-READ-COUNTER
*S** IF #ET-READ-COUNTER > #MAX-READ
*S** PERFORM COMMIT-OR-BACKOUT
*S** END-IF
*S** MOVE WFECARSD.WW-STUDENT-ID TO ##STUDENT-ID
*S** /*
*S** /* If RECOVER mode, process "X" records
*S** IF #INPUT-RUNMODE = 'RECOVER'
*S** IF WFECARSD.WF-EC-NEW-REJ NE 'X' OR
*S** WFECARSD.WW-CDATE NE #EFF-DATE
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If not RECOVER mode, skip "X" records
*S** ELSE
*S** IF WFECARSD.WF-EC-NEW-REJ = 'X'
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* Skip "N" record if an "R" record exists
*S** IF WFECARSD.WF-EC-NEW-REJ = 'N'
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = 'R'
*S** MOVE 'EXISTS' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = 'N'
*S** IF WWAOBJ.#EXISTS
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** /* Bypass record if student has corrections already in process
*S** IF #INPUT-RUNMODE NE 'RECOVER'
*S** MOVE WFECARSD.WF-EC-NEW-REJ TO #HOLD-NEW-REJ
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = 'X'
*S** MOVE 'EXISTS' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** ASSIGN WFECARSD.WF-EC-NEW-REJ = #HOLD-NEW-REJ
*S** IF WWAOBJ.#EXISTS
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** ELSE
*S** MOVE 'GET' TO WWAOBJ.#FUNCTION
*S** PERFORM CALL-OBJECT-ECARS
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get CPS data
*S** ASSIGN WFCPC15D.WF-FAO = ##FAO-ID
*S** ASSIGN WFCPC15D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-CPS
*S** /*
*S** /* Only process WF-ECAR records if:
*S** /* submit flag set to C (corrections pending)
*S** /* AND student has a Pell ID
*S** IF #INPUT-RUNMODE NE 'RECOVER'
*S** IF WFECARSD.WF-EC-SUBMIT NE 'C' OR
*S** (WFECARSD.WF-EC-SUBMIT = 'C' AND
*S** WFCPC15D.WF-CP-FED-ID = SPACE)
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** END-IF
*S** /*
*S** PERFORM GET-STUDENT-INFO
*S** /*
*S** /* Perform Decision status lookup
*S** IF #INPUT-RUNMODE NE 'RECOVER'
*S** MOVE 'ElecCorr' TO #STATUS-FUNCTION
*S** PERFORM GET-STATUS-FUNCTION #STATUS-FUNCTION #STATUS-DECISION
*S** IF #STATUS-DECISION NE 'Y'
*S** ADD 1 TO #BYPASS-COUNTER
*S** ESCAPE TOP
*S** END-IF
*S** END-IF
*S** /*
*S** /* Perform appropriate subroutine for correction tape source
*S** MOVE BY NAME WFECARSD TO WFECARSL
*S** PERFORM LOAD-ECAR
*S** /*
*S** /* Add event
*S** IF #ECAR-WRITTEN
*S** PERFORM ADD-EVENT #EVENT-TYPE #EVENT-DESC
*S** END-IF
*S** /*
*S** /* If limited run, print report line
*S** IF (#INPUT-RUNMODE = 'TRIAL' OR = 'SAMPLE')
*S** AND #INPUT-LIMIT-COUNT > 0
*S** IF #ECAR-WRITTEN
*S** MOVE 'Correction(s)' TO #RPT-MSG
*S** WRITE(3) ##SID ##COMP-NAME #RPT-MSG
*S** END-IF
*S** END-IF
*S** /*
*S** /* Check for limited-run maximum
*S** IF (#INPUT-RUNMODE = 'TRIAL' OR = 'SAMPLE')
*S** AND #INPUT-LIMIT-COUNT > 0
*S** IF #WRITE-COUNTER GE #INPUT-LIMIT-COUNT
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S** END-IF
*S** END-IF
*S** END-REPEAT /* PROG.
*S***
*S*** Issue final END TRANSACTION
*S** PERFORM COMMIT-OR-BACKOUT
*S***
*S*** Print job statistics
*S** WRITE(1) NOTITLE
*S** 15T 'FINANCIER processing:' /
*S** 17T 'Correction records read:'
*S** (I) 55T #READ-COUNTER (EM=Z,ZZZ,ZZ9) //
*S** 17T 'Students with corrections exported:'
*S** (I) 55T #ECAR-COUNTER (EM=Z,ZZZ,ZZ9) /
*S** 19T 'Electronic transactions exported:'
*S** (I) 55T #WRITE-COUNTER (EM=Z,ZZZ,ZZ9) /
*S** 17T 'Correction records bypassed:'
*S** (I) 55T #BYPASS-COUNTER (EM=Z,ZZZ,ZZ9) /
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-CPS
*S*************************************************************************
*S** /*
*S** /* Call WF-CPS file object subprogram
*S** CALLNAT 'WFCPC15O' WW-GDA
*S** WFCPC15D
*S** WFCPC15D-ID
*S** WFCPC15R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-CPS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-ECARS
*S*************************************************************************
*S** /*
*S** /* Call WF-ECARS file object subprogram
*S** CALLNAT 'WFECARSO' WW-GDA
*S** WFECARSD
*S** WFECARSD-ID
*S** WFECARSR
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-ECARS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-FEDERAL
*S*************************************************************************
*S** /*
*S** /* Call WF-FEDERAL file object subprogram
*S** CALLNAT 'WFFED15O' WW-GDA
*S** WFFED15D
*S** WFFED15D-ID
*S** WFFED15R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-FEDERAL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-TABLE
*S*************************************************************************
*S** /*
*S** /* Call WW-TABLE file object subprogram
*S** CALLNAT 'WWTABLEO' WW-GDA
*S** WWTABLED
*S** WWTABLED-ID
*S** WWTABLER
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-TABLE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE LOAD-ECAR
*S*************************************************************************
*S** /*
*S** RESET #ECAR-WRITTEN
*S** #BYPASS-ECAR
*S** #REJ-ASM-OVR
*S** #EMAIL-UPD
*S** #HS-UPD
*S** /*
*S** /* Find last correction (may not be consecutive if manual deletes)
*S** ASSIGN #LAST-CORR = 0
*S** FOR #SUB = 100 TO 1 STEP -1
*S** IF ECAR-FIELD(#SUB) NE SPACE
*S** ASSIGN #LAST-CORR = #SUB
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-FOR
*S** IF #LAST-CORR = 0
*S** ASSIGN #BYPASS-ECAR = TRUE
*S** ELSE
*S** /*
*S** /* Read WF-FEDERAL record
*S** ASSIGN WFFED15D.WF-FAO = ##FAO-ID
*S** ASSIGN WFFED15D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-FEDERAL
*S** /*
*S** /* If professional judgment flag set, insure that it is sent
*S** IF WFFED15D.WF-FE-F-PROF-JUDG = 'Y'
*S** FOR #SUB = 1 TO #LAST-CORR STEP 1
*S** IF ECAR-FIELD(#SUB) = #FLDNO-PJ
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-FOR
*S** IF ECAR-FIELD(#SUB) NE #FLDNO-PJ
*S** ADD 1 TO #LAST-CORR
*S** ASSIGN ECAR-FIELD(#LAST-CORR) = #FLDNO-PJ
*S** ASSIGN ECAR-VALUE(#LAST-CORR) = '1'
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get reject/assumption overrides from WF-FEDERAL record
*S** ASSIGN WFFED15D.WF-FAO = ##FAO-ID
*S** ASSIGN WFFED15D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-FEDERAL
*S** DECIDE FOR EVERY CONDITION
*S** WHEN WFFED15D.WF-FE-F-REJ3-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ3-OVR
*S** WHEN WFFED15D.WF-FE-F-REJ12-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ12-OVR
*S** WHEN WFFED15D.WF-FE-F-REJ20-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ20-OVR
*S** WHEN WFFED15D.WF-FE-F-REJ21-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJ21-OVR
*S** WHEN WFFED15D.WF-FE-F-REJA-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJA-OVR
*S** WHEN WFFED15D.WF-FE-F-REJB-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJB-OVR
*S** WHEN WFFED15D.WF-FE-F-REJC-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJC-OVR
*S** WHEN WFFED15D.WF-FE-F-REJG-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJG-OVR
*S** WHEN WFFED15D.WF-FE-F-REJJ-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJJ-OVR
*S** WHEN WFFED15D.WF-FE-F-REJK-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJK-OVR
*S** WHEN WFFED15D.WF-FE-F-REJN-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJN-OVR
*S** WHEN WFFED15D.WF-FE-F-REJW-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#REJW-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM1-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM1-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM2-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM2-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM3-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM3-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM4-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM4-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM5-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM5-OVR
*S** WHEN WFFED15D.WF-FE-F-ASM6-OVR = 'Y'
*S** MOVE '1' TO WF-ECAR.#ASM6-OVR
*S** WHEN ANY
*S** ASSIGN #REJ-ASM-OVR = TRUE
*S** WHEN NONE
*S** IGNORE
*S** END-DECIDE
*S** /*
*S** PERFORM MASSAGE-DATA-2015
*S** RESET #SUB2
*S** ADD 1 TO #ECAR-COUNTER
*S** FOR #SUB = 1 TO #LAST-CORR
*S** IF ECAR-FIELD(#SUB) = ' '
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If reject or assumption override, skip
*S** /* (Override "corrections" trigger transmission, but must
*S** /* be sent with every history correciton submission, so
*S** /* they are retrieved from the WF-FEDERAL record above.)
*S** IF SUBSTRING(ECAR-FIELD(#SUB),1,2) = 'OR' OR = 'OA'
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If e-mail address update, load fixed field and skip
*S** IF ECAR-FIELD(#SUB) = 'EMA'
*S** MOVE ECAR-VALUE (#SUB) TO WF-ECAR.#EMAIL-ADDR
*S** ASSIGN #EMAIL-UPD = TRUE
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* If high school name update, load fixed field and skip
*S** IF ECAR-FIELD(#SUB) = 'HSN'
*S** MOVE ECAR-VALUE (#SUB) TO WF-ECAR.#HS-NAME
*S** ASSIGN #HS-UPD = TRUE
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** ADD 1 TO #SUB2
*S** MOVE ECAR-FIELD(#SUB) TO WF-ECAR.#FLD(#SUB2)
*S** MOVE ECAR-VALUE(#SUB) TO WF-ECAR.#VAL(#SUB2)
*S** IF #SUB2 = 12
*S** PERFORM WRITE-ECAR
*S** END-IF
*S** END-FOR
*S** IF #SUB2 > 0 OR #REJ-ASM-OVR OR #EMAIL-UPD OR #HS-UPD
*S** PERFORM WRITE-ECAR
*S** END-IF
*S** ASSIGN #ECAR-WRITTEN = TRUE
*S** COMPRESS 'Correction/FedID #' WFCPC15D.WF-CP-FED-ID
*S** INTO #EVENT-DESC LEAVING NO
*S** END-IF
*S** /*
*S** /* If record written or empty ECAR record found,
*S** /* replace ECAR record with "transmitted" type
*S** IF #ECAR-WRITTEN OR #BYPASS-ECAR
*S** ASSIGN WWAOBJ.#FUNCTION = 'DELETE'
*S** PERFORM CALL-OBJECT-ECARS
*S** RESET ##MSG
*S** MOVE 'X' TO WFECARSD.WF-EC-NEW-REJ
*S** ASSIGN WWAOBJ.#FUNCTION = 'STORE'
*S** PERFORM CALL-OBJECT-ECARS
*S** ADD 1 TO #ET-WRITE-COUNTER
*S** IF #ET-WRITE-COUNTER > #MAX-WRITE
*S** PERFORM COMMIT-OR-BACKOUT
*S** END-IF
*S** END-IF
*S**END-SUBROUTINE /* LOAD-ECAR
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE MASSAGE-DATA-2015
*S*************************************************************************
*S** /*
*S** FOR #SUB = 1 TO #LAST-CORR
*S** IF ECAR-FIELD(#SUB) = ' '
*S** ESCAPE TOP
*S** END-IF
*S** /*
*S** /* Sign numeric fields
*S** RESET #SIGNED-FIELD
*S** DECIDE ON FIRST VALUE OF ECAR-FIELD(#SUB)
*S** VALUE '039', '042', '043', '102', '105', '106'
*S** ASSIGN #SIGNED-FIELD = TRUE
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** IF #SIGNED-FIELD
*S** EXAMINE ECAR-VALUE(#SUB) FOR '-' DELETE GIVING NUMBER #FIELD-NEG
*S** EXAMINE ECAR-VALUE(#SUB) FOR '%' GIVING LENGTH #FIELD-LENGTH
*S** RESET #NEGATIVE
*S** IF #FIELD-NEG > 0
*S** ASSIGN #NEGATIVE = TRUE
*S** END-IF
*S** DECIDE ON FIRST VALUE OF #FIELD-LENGTH
*S** VALUE 3
*S** IF ECAR-VALUE(#SUB) IS (N3)
*S** ASSIGN #ECAR-N3 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A3,3,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A3,3,1)
*S** MOVE #ECAR-A3 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 4
*S** IF ECAR-VALUE(#SUB) IS (N4)
*S** ASSIGN #ECAR-N4 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A4,4,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A4,4,1)
*S** MOVE #ECAR-A4 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 5
*S** IF ECAR-VALUE(#SUB) IS (N5)
*S** ASSIGN #ECAR-N5 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A5,5,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A5,5,1)
*S** MOVE #ECAR-A5 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 6
*S** IF ECAR-VALUE(#SUB) IS (N6)
*S** ASSIGN #ECAR-N6 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A6,6,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A6,6,1)
*S** MOVE #ECAR-A6 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** VALUE 7
*S** IF ECAR-VALUE(#SUB) IS (N7)
*S** ASSIGN #ECAR-N7 = VAL(ECAR-VALUE(#SUB))
*S** MOVE SUBSTRING(#ECAR-A7,7,1) TO #CNVT-BYTE
*S** PERFORM CONVERT-TO-SIGNS #CNVT-BYTE #NEGATIVE
*S** MOVE #CNVT-BYTE TO SUBSTRING(#ECAR-A7,7,1)
*S** MOVE #ECAR-A7 TO ECAR-VALUE(#SUB)
*S** END-IF
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** END-IF
*S** END-FOR
*S**END-SUBROUTINE /* MASSAGE-DATA-2015
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE WRITE-ECAR
*S*************************************************************************
*S** /*
*S** /* Write Correction record when maximum occurrence reached
*S** MOVE #AID-Y2 TO WF-ECAR.#YR
*S** MOVE '1C' TO WF-ECAR.#TRAN-SRCE-TYPE
*S** MOVE WFCPC15D.WF-CP-FED-ID TO WF-ECAR.#PELLID
*S** IF WFCPC15D.WF-CP-COLLEGE = SPACE
*S** MOVE ##FAO-INST-CODE TO WF-ECAR.#COLLEGE-CODE
*S** ELSE
*S** MOVE WFCPC15D.WF-CP-COLLEGE TO WF-ECAR.#COLLEGE-CODE
*S** END-IF
*S** MOVE EDITED *DATX(EM=YYYYMMDD) TO WF-ECAR.#XMIT-DATE
*S** WRITE WORK FILE 1 WF-ECAR
*S** ADD 1 TO #WRITE-COUNTER
*S** RESET #SUB2
*S** RESET #REJ-ASM-OVR
*S** #EMAIL-UPD
*S** #HS-UPD
*S** RESET WF-ECAR
*S**END-SUBROUTINE /* WRITE-ECAR
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE COMMIT-OR-BACKOUT
*S*************************************************************************
*S** /*
*S** /* Periodically issue END TRANSACTION
*S** IF #INPUT-RUNMODE = 'TRIAL'
*S** BACKOUT TRANSACTION
*S** ELSE
*S** END TRANSACTION
*S** END-IF
*S** RESET #ET-READ-COUNTER #ET-WRITE-COUNTER
*S**END-SUBROUTINE /* COMMIT-OR-BACKOUT
*S**END
*E
Number of differences: 2
Added(2,0)
Deleted(0,0)
Changed(1)
Changed in changed(6)
Ignored