WolffPack differences report |
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
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
|
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Subprogram: WFFEL25N
*S*** System : FINANCIER
*S*** Title : 2024-25 Federal Load subprogram
*S*** Function : This subprogram loads Federal application data from
*S*** the ADD file into the WF-FEDERAL-2425 file.
*S***
*S*** Copyright 1995 - 2024 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S** PARAMETER USING WWPDA
*S** PARAMETER
*S** 01 #PARAMETER-FIELDS
*S** 02 #PGM-PARAMETERS
*S** 03 #EARLIER-REC(A1)
*S** 03 #FED-REJ-CASE(A1)
*S** 03 #OVRD-FED-REJ(A1)
*S** 03 #OVRD-C-PEND(A1)
*S** 03 #OVRD-C-XMIT(A1)
*S** 03 #OVRD-LOCKED(A1)
*S** 03 #OVRD-VERIFD(A1)
*S** 03 #OVRD-PACKAGE(A1)
*S** 02 #PASSED-PARAMETERS
*S** 03 #INPUT-COUNTER(P7)
*S** 03 #NEW-REJ-COUNTER(P7)
*S** 03 #RE-REJ-COUNTER(P7)
*S** 03 #BYPASS-COUNTER(P7)
*S** 03 #ADD-RECORD-COUNTER(P7)
*S** 03 #PROCESSED-RECORD(L)
*S** PARAMETER USING WFADDDSD
*S***
*S** LOCAL USING WFFED25D /* Passed to object subprogram
*S** LOCAL USING WFFED25R /* Passed to object subprogram
*S** LOCAL USING WWSTDNTD /* Passed to object subprogram
*S** LOCAL USING WWSTDNTR /* Passed to object subprogram
*S** LOCAL USING WFCPC25D /* Passed to object subprogram
*S** LOCAL USING WFCPC25R /* Passed to object subprogram
*S** LOCAL USING WWAOBJ /* Passed to object subprograms
*S***
*S*** LOCAL USING WWCONST /* Constants LDA
*S** LOCAL
*S** 01 SPACE (A1) INIT<' '>
*S** 01 EDE-TYPE (A1) INIT<'E'>
*S** 01 INIT-DATE (D)
*S***
*S** LOCAL USING WWVALLDA /* Value validation LDA
*S** LOCAL USING WF25FEDL /* Sequential LDA
*S***
*S** LOCAL
*S** 01 #LOGICALS
*S** 02 #ADD-FEDERAL(L)
*S** 02 #ADD-CPS(L)
*S** 02 #ARRAY-LOADED(L)
*S***
*S** 01 #SUB(P5)
*S** 01 #SUB2(P5)
*S***
*S** 01 #DATA-ERROR
*S** 02 #ERR-SID(A9)
*S** 02 #ERR-NAM(A30)
*S** 02 #ERR-SRC(A1)
*S** 02 #ERR-FLD(A25)
*S** 02 #ERR-VAL(A10)
*S***
*S** 01 #TRANSLATE-FIELD(A30)
*S** 01 #TRANSLATE-CASE(A1)
*S** 01 #REMOVE-SPEC-CH(L)
*S***
*S** 01 #N(N2)
*S** 01 #HOLD-FILE(A8)
*S** 01 #HOLD-SAR(A3)
*S** 01 #HOLD-EFC(A10)
*S** 01 #PASS-KEY(A30)
*S** 01 #PASS-TEMP(A30)
*S***
*S*** Variables utilized by Event History routine
*S** 01 #EVENT-TYPE(A5) CONST<'ADDLd'>
*S** 01 #EVENT-DESC(A40)
*S***
*S** 01 #BLANKS-ARRAY(A200)
*S** 01 REDEFINE #BLANKS-ARRAY
*S** 02 #BLANK(A1/200)
*S***
*S** 01 #EDIT-DATE-YYYYMMDD(A8)
*S** 01 REDEFINE #EDIT-DATE-YYYYMMDD
*S** 02 #EDIT-DATE-YYYYMM(A6)
*S** 02 #EDIT-DATE-DD(A2)
*S***
*S** 01 #HOLD-HOLD(N7)
*S** 01 #HOLD-CDATE(D)
*S** 01 #HOLD-MDATE(D)
*S** 01 #HOLD-LOCK(A1)
*S***
*S** 01 #CNVT-NEG(L)
*S** 01 #CNVT-BYTE(A1)
*S** 01 #SAVE-BYTE(A1)
*S***
*S** 01 #HOLD-LAST(A20)
*S** 01 #HOLD-FIRST(A20)
*S***
*S** 01 #PASS-FIELDS
*S** 02 #PASS-NM-LAST(A20)
*S** 02 #PASS-NM-FIRST(A20)
*S** 02 #PASS-NM-MI(A1)
*S** 02 #PASS-PID(A9)
*S***
*S** 01 #HOLD-LEU(N4.3)
*S** 01 #HOLD-LEU-FLAG(A1)
*S** 01 #DISP-LEU(A8)
*S** 01 #DISP-LEU-LIT(A12)
*S** 01 #hold-field(A50)
*S***
*S** LOCAL USING WWPARNTD
*S**END-DEFINE
*S***
*S*** Define printers, formats, headings
*S**FORMAT(2) LS=80 PS=60 ZP=ON IS=OFF ES=OFF SG=OFF
*S***
*S**FORMAT KD=ON PS=10
*S**SET KEY ALL
*S***
*S**AT TOP OF PAGE(2)
*S** WRITE(2) NOTITLE ##PGM-ID
*S** 27T '*** FINANCIER ADD LOAD ***'
*S** 71T 'Page' *PAGE-NUMBER(2)(EM=ZZ9)
*S** / *DATX(EM=LLL' 'DD', 'YYYY)
*S** 31T 'Field Value Errors'
*S** 71T *TIMX(EM=HH':'II' 'AP)
*S** // 31T 'Aid Year:' ##DISP-AY
*S** / 36T ##DISP-LIT ##DISP-FAO
*S** /// 'StudentID Name Src Error'
*S** SKIP(2) 1
*S**END-TOPPAGE
*S***
*S*** Populate WW-GDA from WW-PDA
*S** MOVE BY POSITION WW-PDA TO WW-GDA
*S***
*S***
*S**PROG.
*S** REPEAT
*S** /*
*S** RESET #PROCESSED-RECORD
*S** #FED-REJ-CASE
*S** #EARLIER-REC
*S** MOVE ##SID TO #ERR-SID
*S** MOVE ##COMP-NAME TO #ERR-NAM
*S** MOVE 'F' TO #ERR-SRC
*S** /*
*S** /* Load LDA from ADD record
*S** MOVE BY NAME WFADDDSD TO WF25FEDL
*S** /*
*S** /* Get Federal data record
*S** MOVE ##STUDENT-ID TO WFFED25D.WW-STUDENT-ID
*S** MOVE ##FAO-ID TO WFFED25D.WF-FAO
*S** /*
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-FEDERAL
*S** /*
*S** IF NOT WWAOBJ.#EXISTS
*S** ASSIGN #ADD-FEDERAL = TRUE
*S** END-IF
*S** /*
*S** /* Federal reject
*S** /* (only applicable for Automatic records)
*S** IF #OVRD-FED-REJ = 'Y' OR
*S** WFADDDSD.WF-AD-REJ-OVERRIDE = 'O'
*S** IGNORE /* Bypass Federal Reject edit
*S** ELSE
*S** IF WFADDDSD.WF-AD-SEND-RSN NE 'C'
*S** IF WF25FEDL.WF-FE-C-DEP-MODEL = 'X' OR ='Y' /* Federal rejects
*S** ASSIGN #FED-REJ-CASE = 'F'
*S** ESCAPE BOTTOM(PROG.)
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get CPS data record
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** ASSIGN WFCPC25D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WFCPC25D.WF-FAO = ##FAO-ID
*S** PERFORM CALL-OBJECT-CPS
*S** IF NOT WWAOBJ.#EXISTS
*S** ASSIGN #ADD-CPS = TRUE
*S** END-IF
*S** /*
*S** /* Don't allow transactions older than current
*S** /* (only if processing batch, override if invoked online)
*S** IF ##PGM-ID = 'WFADDLDB'
*S** IF WF25FEDL.WF-FE-C-TRANS-NO < WFCPC25D.WF-CP-C-TRANS-NO
*S** ASSIGN #EARLIER-REC = 'Y'
*S** ESCAPE BOTTOM(PROG.)
*S** END-IF
*S** END-IF
*S** /*
*S** /* Check for rejects
*S** IF WFADDDSD.WF-AD-REJ-OVERRIDE NE 'O' AND
*S** (WFADDDSD.WF-AD-REJ1 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ2 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ3 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ4 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ5 NE SPACE)
*S** ESCAPE BOTTOM(PROG.)
*S** END-IF
*S** /*
*S** PERFORM UPDATE-STUDENT
*S** PERFORM UPDATE-FEDERAL
*S** MOVE WF25FEDL.WF-ISIR1 to #hold-field
*S** MOVE WF25FEDL.WF-ISIR19 to #hold-field
*S** PERFORM LOAD-ISIR-2425 WF25FEDL.WF-ISIR
*S** WF25FEDL.WF-ISIRB
*S** PERFORM LOAD-NSLDS-2425 WF25FEDL.WF-NSLDS
*S** PERFORM UPDATE-CPS
*S** PERFORM LOAD-CORRECTIONS
*S** /*
*S** /* Add event
*S** PERFORM GET-NSLDS-LEU #HOLD-LEU #HOLD-LEU-FLAG
*S** MOVE EDITED #HOLD-LEU (EM=ZZZ9.999) TO #DISP-LEU
*S** MOVE LEFT JUSTIFIED #DISP-LEU TO #DISP-LEU-LIT
*S** COMPRESS '/LEU=' #DISP-LEU-LIT INTO #DISP-LEU-LIT LEAVING NO
*S** /*
*S** MOVE EDITED WF-CP-A-SAI (EM=Z,ZZZ,ZZ9-) TO #HOLD-EFC
*S** MOVE LEFT JUSTIFIED #HOLD-EFC TO #HOLD-EFC
*S** COMPRESS 'FedTran #' WFCPC25D.WF-CP-C-TRANS-NO '/SAI $' #HOLD-EFC
*S** #DISP-LEU-LIT
*S** INTO #EVENT-DESC LEAVING NO
*S** PERFORM ADD-EVENT #EVENT-TYPE #EVENT-DESC
*S** /*
*S** ADD 1 TO #ADD-RECORD-COUNTER
*S** ASSIGN #PROCESSED-RECORD = TRUE
*S** ASSIGN ##PASS-ACTION = 'L' /* Confirm load on-line
*S** RESET ##PASS-KEY
*S** ESCAPE BOTTOM(PROG.)
*S** END-REPEAT
*S***
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-CPS
*S*************************************************************************
*S** /*
*S** /* Call the WF-CPS-xxyy object subprogram
*S** CALLNAT 'WFCPC25O' WW-GDA
*S** WFCPC25D
*S** WFCPC25D-ID
*S** WFCPC25R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-CPS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-FEDERAL
*S*************************************************************************
*S** /*
*S** /* Call the WF-FEDERAL-xxyy object subprogram
*S** CALLNAT 'WFFED25O' WW-GDA
*S** WFFED25D
*S** WFFED25D-ID
*S** WFFED25R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-FEDERAL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-STUDENT
*S*************************************************************************
*S** /*
*S** /* Call the WW-STUDENT object subprogram
*S** CALLNAT 'WWSTDNTO' WW-GDA
*S** WWSTDNTD
*S** WWSTDNTD-ID
*S** WWSTDNTR
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-STUDENT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE LOAD-CORRECTIONS
*S*************************************************************************
*S** /*
*S** /* First, if Corrected ISIR, delete old corrections
*S** IF WFADDDSD.WF-AD-SEND-RSN = 'C'
*S** MOVE EDE-TYPE TO ##PASS-KEY
*S** MOVE 'X' TO ##PASS-TEMP
*S** PERFORM PURGE-ECAR
*S** END-IF
*S** /*
*S** /* If corrections were made to ADD file fields,
*S** /* create correction records now that student is in FINANCIER
*S** DECIDE FOR EVERY CONDITION
*S** WHEN WFADDDSD.WF-AD-C-SSN = 'S'
*S** /*
*S** /* SSN modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-SSN'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-SSN
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-DOB = 'B'
*S** /*
*S** /* DOB modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-DOB'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** MOVE EDITED WFADDDSD.WW-ST-DOB (EM=YYYYMMDD) TO #VALUE
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-NL = 'L'
*S** /*
*S** /* Last name modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-NM-LAST'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-NM-LAST
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-NF = 'F'
*S** /*
*S** /* First name modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-NM-FIRST'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-NM-FIRST
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-NM = 'M'
*S** /*
*S** /* Middle Initial modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-NM-MI'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-NM-MI
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN ANY
*S** CALLNAT 'WWDUTILN' WW-GDA WWVALLDA
*S** WHEN NONE
*S** IGNORE
*S** END-DECIDE
*S**END-SUBROUTINE /* LOAD-CORRECTIONS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE LOAD-UTIL-ARRAY
*S*************************************************************************
*S** /*
*S** /* Load utility array for correction record create
*S** RESET #ARRAY-LOADED
*S** ASSIGN #N = 1
*S** /*
*S** REPEAT WHILE NOT #ARRAY-LOADED
*S** IF (#FILE(#N) = #HOLD-FILE AND #FIELD(#N) = #PASS-KEY) OR
*S** (#FILE(#N) = ' ' AND #FIELD(#N) = ' ')
*S** ASSIGN #SAR-FLD-NO(#N) = #HOLD-SAR /* Found match OR
*S** ASSIGN #VALU(#N) = #VALUE /* not yet defined
*S** ASSIGN #VALU-SUB = #N
*S** ASSIGN #ARRAY-LOADED = TRUE
*S** IF #FILE(#N) = ' ' AND #FIELD(#N) = ' '
*S** ASSIGN #FILE(#N) = #HOLD-FILE
*S** ASSIGN #FIELD(#N) = #PASS-KEY
*S** END-IF
*S** END-IF
*S** ADD 1 TO #N
*S** END-REPEAT
*S**END-SUBROUTINE /* LOAD-UTIL-ARRAY
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE PERFORM-TRANSLATE-CASE
*S*************************************************************************
*S** /*
*S** /* Case translation routine
*S** PERFORM TRANSLATE-CASE #TRANSLATE-FIELD #TRANSLATE-CASE
*S** #REMOVE-SPEC-CH
*S**END-SUBROUTINE /* PERFORM-TRANSLATE-CASE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-FEDERAL
*S*************************************************************************
*S** /*
*S** /* Add or update Federal information
*S** IF #ADD-FEDERAL
*S** ASSIGN WWAOBJ.#FUNCTION = 'STORE'
*S** ELSE
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** END-IF
*S** /*
*S** CALLNAT 'WFFE225N' WW-GDA #LOGICALS #DATA-ERROR
*S** WF25FEDL WF25FEDL-ID
*S** WFFED25D WFFED25D-ID
*S** WFADDDSD WFADDDSD-ID
*S** WWVALLDA
*S** /*
*S** /* WFFE252N cannot do all FEDERAL updates - USIZE
*S** /*
*S** PERFORM CALL-OBJECT-FEDERAL
*S**END-SUBROUTINE /* UPDATE-FEDERAL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-CPS
*S*************************************************************************
*S** /*
*S** /* Due to size restrictions, CPS is updated in WFFE325N
*S** /*
*S** CALLNAT 'WFFE325N' WW-GDA WFADDDSD WFADDDSD-ID
*S** /*
*S** /* Reread new or updated CPS record to get info for event record
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-CPS
*S**END-SUBROUTINE /* UPDATE-CPS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-PARENTS
*S*************************************************************************
*S** /*
*S** /* Add or update Parent information
*S** /* and update Student record to reflect parent ids
*S** IF WF25FEDL.WF-FE-P1-SSN NE ' '
*S** /*
*S** /* Determine parent 1 Parent ID from the SSN, name and DOB on ISIR
*S** /* If parent 1 Parent ID is second one in Student record, switch
*S** /* the ones in the student's record
*S** /* If parent 1 Parent ID doesn't match first one in Student record,
*S** /* move it into first slot in Student record
*S** MOVE WF25FEDL.WF-FE-P1-NM-LAST TO #PASS-NM-LAST
*S** MOVE WF25FEDL.WF-FE-P1-NM-FIRST TO #PASS-NM-FIRST
*S** RESET #PASS-NM-MI
*S** PERFORM DETERMINE-PID WF25FEDL.WF-FE-P1-SSN
*S** #PASS-NM-LAST #PASS-NM-FIRST
*S** #PASS-NM-MI
*S** WF25FEDL.WF-FE-P1-DOB #PASS-PID
*S** IF #PASS-PID NE ' '
*S** IF #PASS-PID = WWSTDNTD.WW-ST-PARENT-ID2
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID2 = WWSTDNTD.WW-ST-PARENT-ID1
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID1 = #PASS-PID
*S** END-IF
*S** END-IF
*S** IF #PASS-PID NE ' ' AND
*S** #PASS-PID NE WWSTDNTD.WW-ST-PARENT-ID1
*S** MOVE #PASS-PID TO WWSTDNTD.WW-ST-PARENT-ID1
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-SSN NE ' '
*S** /*
*S** /* Determine parent 2 Parent ID from the SSN, name and DOB on ISIR
*S** /* If parent 2 Parent ID is second one in Student record, switch
*S** /* the ones in the student's record
*S** /* If parent 2 Parent ID doesn't match first one in Student record,
*S** /* move it into first slot in Student record
*S** MOVE WF25FEDL.WF-FE-P2-NM-LAST TO #PASS-NM-LAST
*S** MOVE WF25FEDL.WF-FE-P2-NM-FIRST TO #PASS-NM-FIRST
*S** RESET #PASS-NM-MI
*S** PERFORM DETERMINE-PID WF25FEDL.WF-FE-P2-SSN
*S** #PASS-NM-LAST #PASS-NM-FIRST
*S** #PASS-NM-MI
*S** WF25FEDL.WF-FE-P1-DOB #PASS-PID
*S** IF #PASS-PID NE ' '
*S** IF #PASS-PID = WWSTDNTD.WW-ST-PARENT-ID1
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID1 = WWSTDNTD.WW-ST-PARENT-ID2
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID2 = #PASS-PID
*S** END-IF
*S** END-IF
*S** IF #PASS-PID NE ' ' AND
*S** #PASS-PID NE WWSTDNTD.WW-ST-PARENT-ID2
*S** MOVE #PASS-PID TO WWSTDNTD.WW-ST-PARENT-ID2
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get current information for both parents from External file
*S** ASSIGN ##PASS-ACTION = 'R'
*S** RESET WWPARNTD
*S** ASSIGN WWPARNTD.#PARENT1-ID = WWSTDNTD.WW-ST-PARENT-ID1
*S** ASSIGN WWPARNTD.#PARENT2-ID = WWSTDNTD.WW-ST-PARENT-ID2
*S** PERFORM PARENTS-SERVICE WWPARNTD
*S** /*
*S** /* Decide whether parent information needs to be updated
*S** RESET #HOLD-LAST #HOLD-FIRST
*S** IF WWPARNTD.#PARENT1-ID NE ' '
*S** IF WF25FEDL.WF-FE-P1-NM-LAST NE ' '
*S** IF WWPARNTD.#PARENT1-NAME NE ' '
*S** SEPARATE WWPARNTD.#PARENT1-NAME INTO #HOLD-LAST #HOLD-FIRST
*S** IGNORE WITH DELIMITERS ','
*S** MOVE LEFT JUSTIFIED #HOLD-FIRST TO #HOLD-FIRST
*S** ASSIGN #TRANSLATE-CASE = 'U'
*S** MOVE #HOLD-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-NM-LAST NE #TRANSLATE-FIELD OR
*S** (WF25FEDL.WF-FE-P1-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P1-NM-FIRST NE ' ')
*S** IF WF25FEDL.WF-FE-P1-NM-LAST NE #TRANSLATE-FIELD
*S** IF ##CNVT-CASE
*S** ASSIGN #TRANSLATE-CASE = 'M'
*S** MOVE WF25FEDL.WF-FE-P1-NM-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO #HOLD-LAST
*S** ELSE
*S** MOVE WF25FEDL.WF-FE-P1-NM-LAST TO #HOLD-LAST
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P1-NM-FIRST NE ' '
*S** MOVE WF25FEDL.WF-FE-P1-NM-FIRST TO #HOLD-FIRST
*S** END-IF
*S** COMPRESS #HOLD-LAST ',' INTO #HOLD-LAST LEAVING NO
*S** COMPRESS #HOLD-LAST #HOLD-FIRST INTO WWPARNTD.#PARENT1-NAME
*S** WITH DELIMITER ' '
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-SSN NE ' '
*S** MOVE WF25FEDL.WF-FE-P1-SSN TO WWPARNTD.#PARENT1-SSN
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-DOB = MASK(YYYYMMDD)
*S** MOVE EDITED WF25FEDL.WF-FE-P1-DOB
*S** TO WWPARNTD.#PARENT1-DOB (EM=YYYYMMDD)
*S** END-IF
*S** END-IF
*S** /*
*S** RESET #HOLD-LAST #HOLD-FIRST
*S** IF WWPARNTD.#PARENT2-ID NE ' '
*S** IF WF25FEDL.WF-FE-P2-NM-LAST NE ' '
*S** IF WWPARNTD.#PARENT2-NAME NE ' '
*S** SEPARATE WWPARNTD.#PARENT2-NAME INTO #HOLD-LAST #HOLD-FIRST
*S** IGNORE WITH DELIMITERS ','
*S** MOVE LEFT JUSTIFIED #HOLD-FIRST TO #HOLD-FIRST
*S** ASSIGN #TRANSLATE-CASE = 'U'
*S** MOVE #HOLD-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-NM-LAST NE #TRANSLATE-FIELD OR
*S** (WF25FEDL.WF-FE-P2-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P2-NM-FIRST NE ' ')
*S** IF WF25FEDL.WF-FE-P2-NM-LAST NE #TRANSLATE-FIELD
*S** IF ##CNVT-CASE
*S** ASSIGN #TRANSLATE-CASE = 'M'
*S** MOVE WF25FEDL.WF-FE-P2-NM-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO #HOLD-LAST
*S** ELSE
*S** MOVE WF25FEDL.WF-FE-P2-NM-LAST TO #HOLD-LAST
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P2-NM-FIRST NE ' '
*S** MOVE WF25FEDL.WF-FE-P2-NM-FIRST TO #HOLD-FIRST
*S** END-IF
*S** COMPRESS #HOLD-LAST ',' INTO #HOLD-LAST LEAVING NO
*S** COMPRESS #HOLD-LAST #HOLD-FIRST INTO WWPARNTD.#PARENT2-NAME
*S** WITH DELIMITER ' '
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-SSN NE ' '
*S** MOVE WF25FEDL.WF-FE-P2-SSN TO WWPARNTD.#PARENT2-SSN
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-DOB = MASK(YYYYMMDD)
*S** MOVE EDITED WF25FEDL.WF-FE-P2-DOB
*S** TO WWPARNTD.#PARENT2-DOB (EM=YYYYMMDD)
*S** END-IF
*S** END-IF
*S** ASSIGN ##PASS-ACTION = 'U'
*S** PERFORM PARENTS-SERVICE WWPARNTD
*S**END-SUBROUTINE /* UPDATE-PARENTS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-STUDENT
*S*************************************************************************
*S** /*
*S** /* Add or update Student information
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** ASSIGN WWSTDNTD.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWSTDNTD.WF-FAO = ##FAO-ID
*S** MOVE 'R' TO WWSTDNTD.WW-ST-ATTRIBUTES
*S** MOVE 'R' TO WWSTDNTD.WW-ST-ADDRESS1
*S** MOVE 'R' TO WWSTDNTD.WW-ST-ADDRESS2
*S** MOVE 'P' TO WWSTDNTD.WW-ST-AD1-TYPE
*S** MOVE 'L' TO WWSTDNTD.WW-ST-AD2-TYPE
*S** PERFORM CALL-OBJECT-STUDENT
*S** IF WWAOBJ.#EXISTS
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** ELSE
*S** ASSIGN WWAOBJ.#FUNCTION = 'STORE'
*S** END-IF
*S** /*
*S** /* If data stored in mixed case, set up translate variables
*S** IF ##CNVT-CASE
*S** ASSIGN #TRANSLATE-CASE = 'M'
*S** RESET #REMOVE-SPEC-CH
*S** END-IF
*S** /*
*S** /* Load data
*S** MOVE ##SID TO WWSTDNTD.WW-ST-SID
*S** IF WFADDDSD.WW-ST-SSN = MASK(999999999)
*S** ASSIGN WWSTDNTD.WW-ST-SSN = WFADDDSD.WW-ST-SSN
*S** ELSE
*S** IF WFADDDSD.WW-ST-SSN NE SPACE
*S** MOVE 'Stu-SSN: ' TO #ERR-FLD
*S** MOVE WFADDDSD.WW-ST-SSN TO #ERR-VAL
*S** PERFORM WRITE-ERROR-LINE
*S** END-IF
*S** END-IF
*S** MOVE WFADDDSD.WW-NAME-LAST TO WWSTDNTD.WW-NAME-LAST
*S** MOVE WFADDDSD.WW-NAME-FIRST TO WWSTDNTD.WW-NAME-FIRST
*S** MOVE WFADDDSD.WW-ST-NM-LAST TO WWSTDNTD.WW-ST-NM-LAST
*S** MOVE WFADDDSD.WW-ST-NM-FIRST TO WWSTDNTD.WW-ST-NM-FIRST
*S** MOVE WFADDDSD.WW-ST-NM-MI TO WWSTDNTD.WW-ST-NM-MI
*S** IF WFADDDSD.WW-ST-DOB NE INIT-DATE
*S** MOVE WFADDDSD.WW-ST-DOB TO WWSTDNTD.WW-ST-DOB
*S** END-IF
*S** IF WF25FEDL.WF-FE-EMAIL NE ' '
*S** MOVE WF25FEDL.WF-FE-EMAIL TO WWSTDNTD.WW-ST-EMAIL
*S** END-IF
*S** IF WF25FEDL.WF-FE-S-ALIEN NE ' '
*S** MOVE WF25FEDL.WF-FE-S-ALIEN TO WWSTDNTD.WW-ST-ALIEN
*S** END-IF
*S** IF ##CNVT-CASE
*S** MOVE WF25FEDL.WF-FE-AD-STRT TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO WF25FEDL.WF-FE-AD-STRT
*S** MOVE WF25FEDL.WF-FE-AD-CITY TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO WF25FEDL.WF-FE-AD-CITY
*S** END-IF
*S** IF WWSTDNTD.WW-ST-AD1-TYPE = 'P' OR /* Permanent address
*S** (WWSTDNTD.WW-ST-AD1-TYPE = ' ' AND
*S** WWSTDNTD.WW-ST-AD2-TYPE = ' ')
*S** MOVE 'P' TO WWSTDNTD.WW-ST-AD1-TYPE
*S** MOVE WF25FEDL.WF-FE-AD-STRT TO WWSTDNTD.WW-ST-AD1-STRT1
*S** MOVE WF25FEDL.WF-FE-AD-CITY TO WWSTDNTD.WW-ST-AD1-CITY
*S** MOVE WF25FEDL.WF-FE-AD-STATE TO WWSTDNTD.WW-ST-AD1-STATE
*S** MOVE WF25FEDL.WF-FE-AD-ZIP TO WWSTDNTD.WW-ST-AD1-ZIP
*S** IF WF25FEDL.WF-FE-AD-PHONE IS (N10)
*S** ASSIGN WWSTDNTD.WW-ST-AD1-PHONE = VAL(WF25FEDL.WF-FE-AD-PHONE)
*S** ELSE
*S** IF WF25FEDL.WF-FE-AD-PHONE NE SPACE
*S** MOVE 'Stu-Phone number: ' TO #ERR-FLD
*S** MOVE WF25FEDL.WF-FE-AD-PHONE TO #ERR-VAL
*S** PERFORM WRITE-ERROR-LINE
*S** END-IF
*S** END-IF
*S** ELSE
*S** IF WWSTDNTD.WW-ST-AD2-TYPE = 'P' OR = ' ' /* Permanent address
*S** MOVE 'P' TO WWSTDNTD.WW-ST-AD2-TYPE
*S** MOVE WF25FEDL.WF-FE-AD-STRT TO WWSTDNTD.WW-ST-AD2-STRT1
*S** MOVE WF25FEDL.WF-FE-AD-CITY TO WWSTDNTD.WW-ST-AD2-CITY
*S** MOVE WF25FEDL.WF-FE-AD-STATE TO WWSTDNTD.WW-ST-AD2-STATE
*S** MOVE WF25FEDL.WF-FE-AD-ZIP TO WWSTDNTD.WW-ST-AD2-ZIP
*S** IF WF25FEDL.WF-FE-AD-PHONE IS (N10)
*S** ASSIGN WWSTDNTD.WW-ST-AD2-PHONE = VAL(WF25FEDL.WF-FE-AD-PHONE)
*S** ELSE
*S** IF WF25FEDL.WF-FE-AD-PHONE NE SPACE
*S** MOVE 'Stu-Phone number: ' TO #ERR-FLD
*S** MOVE WF25FEDL.WF-FE-AD-PHONE TO #ERR-VAL
*S** PERFORM WRITE-ERROR-LINE
*S** END-IF
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** MOVE 'W' TO WWSTDNTD.WW-ST-ATTRIBUTES
*S** IF WWSTDNTD.WW-ST-AD1-TYPE = 'P'
*S** MOVE 'W' TO WWSTDNTD.WW-ST-ADDRESS1
*S** MOVE 'N' TO WWSTDNTD.WW-ST-ADDRESS2
*S** ELSE
*S** IF WWSTDNTD.WW-ST-AD2-TYPE = 'P'
*S** MOVE 'N' TO WWSTDNTD.WW-ST-ADDRESS1
*S** MOVE 'W' TO WWSTDNTD.WW-ST-ADDRESS2
*S** END-IF
*S** END-IF
*S** /*
*S** PERFORM UPDATE-PARENTS
*S** /*
*S** PERFORM CALL-OBJECT-STUDENT
*S**END-SUBROUTINE /* UPDATE-STUDENT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE WRITE-ERROR-LINE
*S*************************************************************************
*S** /*
*S** /* If processing batch, write out error line
*S** IF *DEVICE = 'BATCH'
*S** IF #ERR-SID NE ' '
*S** WRITE(2) ' '
*S** END-IF
*S** WRITE(2) #DATA-ERROR
*S** RESET #ERR-SID #ERR-NAM
*S** END-IF
*S**END-SUBROUTINE /* WRITE-ERROR-LINE
*S**END
*E
|
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
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
|
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Subprogram: WFFEL25N
*S*** System : FINANCIER
*S*** Title : 2024-25 Federal Load subprogram
*S*** Function : This subprogram loads Federal application data from
*S*** the ADD file into the WF-FEDERAL-2425 file.
*S***
*S*** Copyright 1995 - 2024 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S** PARAMETER USING WWPDA
*S** PARAMETER
*S** 01 #PARAMETER-FIELDS
*S** 02 #PGM-PARAMETERS
*S** 03 #EARLIER-REC(A1)
*S** 03 #FED-REJ-CASE(A1)
*S** 03 #OVRD-FED-REJ(A1)
*S** 03 #OVRD-C-PEND(A1)
*S** 03 #OVRD-C-XMIT(A1)
*S** 03 #OVRD-LOCKED(A1)
*S** 03 #OVRD-VERIFD(A1)
*S** 03 #OVRD-PACKAGE(A1)
*S** 02 #PASSED-PARAMETERS
*S** 03 #INPUT-COUNTER(P7)
*S** 03 #NEW-REJ-COUNTER(P7)
*S** 03 #RE-REJ-COUNTER(P7)
*S** 03 #BYPASS-COUNTER(P7)
*S** 03 #ADD-RECORD-COUNTER(P7)
*S** 03 #PROCESSED-RECORD(L)
*S** PARAMETER USING WFADDDSD
*S***
*S** LOCAL USING WFFED25D /* Passed to object subprogram
*S** LOCAL USING WFFED25R /* Passed to object subprogram
*S** LOCAL USING WWSTDNTD /* Passed to object subprogram
*S** LOCAL USING WWSTDNTR /* Passed to object subprogram
*S** LOCAL USING WFCPC25D /* Passed to object subprogram
*S** LOCAL USING WFCPC25R /* Passed to object subprogram
*S** LOCAL USING WWAOBJ /* Passed to object subprograms
*S***
*S*** LOCAL USING WWCONST /* Constants LDA
*S** LOCAL
*S** 01 SPACE (A1) INIT<' '>
*S** 01 EDE-TYPE (A1) INIT<'E'>
*S** 01 INIT-DATE (D)
*S***
*S** LOCAL USING WWVALLDA /* Value validation LDA
*S** LOCAL USING WF25FEDL /* Sequential LDA
*S***
*S** LOCAL
*S** 01 #LOGICALS
*S** 02 #ADD-FEDERAL(L)
*S** 02 #ADD-CPS(L)
*S** 02 #ARRAY-LOADED(L)
*S***
*S** 01 #SUB(P5)
*S** 01 #SUB2(P5)
*S***
*S** 01 #DATA-ERROR
*S** 02 #ERR-SID(A9)
*S** 02 #ERR-NAM(A30)
*S** 02 #ERR-SRC(A1)
*S** 02 #ERR-FLD(A25)
*S** 02 #ERR-VAL(A10)
*S***
*S** 01 #TRANSLATE-FIELD(A30)
*S** 01 #TRANSLATE-CASE(A1)
*S** 01 #REMOVE-SPEC-CH(L)
*S***
*S** 01 #N(N2)
*S** 01 #HOLD-FILE(A8)
*S** 01 #HOLD-SAR(A3)
*S** 01 #HOLD-EFC(A10)
*S** 01 #PASS-KEY(A30)
*S** 01 #PASS-TEMP(A30)
*S***
*S*** Variables utilized by Event History routine
*S** 01 #EVENT-TYPE(A5) CONST<'ADDLd'>
*S** 01 #EVENT-DESC(A40)
*S***
*S** 01 #BLANKS-ARRAY(A200)
*S** 01 REDEFINE #BLANKS-ARRAY
*S** 02 #BLANK(A1/200)
*S***
*S** 01 #EDIT-DATE-YYYYMMDD(A8)
*S** 01 REDEFINE #EDIT-DATE-YYYYMMDD
*S** 02 #EDIT-DATE-YYYYMM(A6)
*S** 02 #EDIT-DATE-DD(A2)
*S***
*S** 01 #HOLD-HOLD(N7)
*S** 01 #HOLD-CDATE(D)
*S** 01 #HOLD-MDATE(D)
*S** 01 #HOLD-LOCK(A1)
*S***
*S** 01 #CNVT-NEG(L)
*S** 01 #CNVT-BYTE(A1)
*S** 01 #SAVE-BYTE(A1)
*S***
*S** 01 #HOLD-LAST(A20)
*S** 01 #HOLD-FIRST(A20)
*S***
*S** 01 #PASS-FIELDS
*S** 02 #PASS-NM-LAST(A20)
*S** 02 #PASS-NM-FIRST(A20)
*S** 02 #PASS-NM-MI(A1)
*S** 02 #PASS-PID(A9)
*S***
*S** 01 #HOLD-LEU(N4.3)
*S** 01 #HOLD-LEU-FLAG(A1)
*S** 01 #DISP-LEU(A8)
*S** 01 #DISP-LEU-LIT(A12)
*S** 01 #hold-field(A50)
*S***
*S** LOCAL USING WWPARNTD
*S**END-DEFINE
*S***
*S*** Define printers, formats, headings
*S**FORMAT(2) LS=80 PS=60 ZP=ON IS=OFF ES=OFF SG=OFF
*S***
*S**FORMAT KD=ON PS=10
*S**SET KEY ALL
*S***
*S**AT TOP OF PAGE(2)
*S** WRITE(2) NOTITLE ##PGM-ID
*S** 27T '*** FINANCIER ADD LOAD ***'
*S** 71T 'Page' *PAGE-NUMBER(2)(EM=ZZ9)
*S** / *DATX(EM=LLL' 'DD', 'YYYY)
*S** 31T 'Field Value Errors'
*S** 71T *TIMX(EM=HH':'II' 'AP)
*S** // 31T 'Aid Year:' ##DISP-AY
*S** / 36T ##DISP-LIT ##DISP-FAO
*S** /// 'StudentID Name Src Error'
*S** SKIP(2) 1
*S**END-TOPPAGE
*S***
*S*** Populate WW-GDA from WW-PDA
*S** MOVE BY POSITION WW-PDA TO WW-GDA
*S***
*S***
*S**PROG.
*S** REPEAT
*S** /*
*S** RESET #PROCESSED-RECORD
*S** #FED-REJ-CASE
*S** #EARLIER-REC
*S** MOVE ##SID TO #ERR-SID
*S** MOVE ##COMP-NAME TO #ERR-NAM
*S** MOVE 'F' TO #ERR-SRC
*S** /*
*S** /* Load LDA from ADD record
*S** MOVE BY NAME WFADDDSD TO WF25FEDL
*S** /*
*S** /* Get Federal data record
*S** MOVE ##STUDENT-ID TO WFFED25D.WW-STUDENT-ID
*S** MOVE ##FAO-ID TO WFFED25D.WF-FAO
*S** /*
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-FEDERAL
*S** /*
*S** IF NOT WWAOBJ.#EXISTS
*S** ASSIGN #ADD-FEDERAL = TRUE
*S** END-IF
*S** /*
*S** /* Federal reject
*S** /* (only applicable for Automatic records)
*S** IF #OVRD-FED-REJ = 'Y' OR
*S** WFADDDSD.WF-AD-REJ-OVERRIDE = 'O'
*S** IGNORE /* Bypass Federal Reject edit
*S** ELSE
*S** IF WFADDDSD.WF-AD-SEND-RSN NE 'C'
*S** IF WF25FEDL.WF-FE-C-DEP-MODEL = 'X' OR ='Y' /* Federal rejects
*S** ASSIGN #FED-REJ-CASE = 'F'
*S** ESCAPE BOTTOM(PROG.)
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get CPS data record
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** ASSIGN WFCPC25D.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WFCPC25D.WF-FAO = ##FAO-ID
*S** PERFORM CALL-OBJECT-CPS
*S** IF NOT WWAOBJ.#EXISTS
*S** ASSIGN #ADD-CPS = TRUE
*S** END-IF
*S** /*
*S** /* Don't allow transactions older than current
*S** /* (only if processing batch, override if invoked online)
*S** IF ##PGM-ID = 'WFADDLDB'
*S** IF WF25FEDL.WF-FE-C-TRANS-NO < WFCPC25D.WF-CP-C-TRANS-NO
*S** ASSIGN #EARLIER-REC = 'Y'
*S** ESCAPE BOTTOM(PROG.)
*S** END-IF
*S** END-IF
*S** /*
*S** /* Check for rejects
*S** IF WFADDDSD.WF-AD-REJ-OVERRIDE NE 'O' AND
*S** (WFADDDSD.WF-AD-REJ1 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ2 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ3 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ4 NE SPACE OR
*S** WFADDDSD.WF-AD-REJ5 NE SPACE)
*S** ESCAPE BOTTOM(PROG.)
*S** END-IF
*S** /*
*S** PERFORM UPDATE-STUDENT
*S** PERFORM UPDATE-FEDERAL
*S** MOVE WF25FEDL.WF-ISIR1 to #hold-field
*S** MOVE WF25FEDL.WF-ISIR19 to #hold-field
*S** PERFORM LOAD-ISIR-2425 WF25FEDL.WF-ISIR
*S** WF25FEDL.WF-ISIRB
*S** PERFORM LOAD-NSLDS-2425 WF25FEDL.WF-NSLDS
*S** PERFORM UPDATE-CPS
*S** PERFORM LOAD-CORRECTIONS
*S** /*
*S** /* Add event
*S** PERFORM GET-NSLDS-LEU #HOLD-LEU #HOLD-LEU-FLAG
*S** MOVE EDITED #HOLD-LEU (EM=ZZZ9.999) TO #DISP-LEU
*S** MOVE LEFT JUSTIFIED #DISP-LEU TO #DISP-LEU-LIT
*S** COMPRESS '/LEU=' #DISP-LEU-LIT INTO #DISP-LEU-LIT LEAVING NO
*S** /*
*S** IF WF25FEDL.WF-FE-C-SAI = ' '
*S** COMPRESS 'FedTran #' WFCPC25D.WF-CP-C-TRANS-NO '/SAI blank'
*S** #DISP-LEU-LIT
*S** INTO #EVENT-DESC LEAVING NO
*S** ELSE
*S** MOVE EDITED WF-CP-A-SAI (EM=Z,ZZZ,ZZ9-) TO #HOLD-EFC
*S** MOVE LEFT JUSTIFIED #HOLD-EFC TO #HOLD-EFC
*S** COMPRESS 'FedTran #' WFCPC25D.WF-CP-C-TRANS-NO '/SAI $' #HOLD-EFC
*S** #DISP-LEU-LIT
*S** INTO #EVENT-DESC LEAVING NO
*S** END-IF
*S** PERFORM ADD-EVENT #EVENT-TYPE #EVENT-DESC
*S** /*
*S** ADD 1 TO #ADD-RECORD-COUNTER
*S** ASSIGN #PROCESSED-RECORD = TRUE
*S** ASSIGN ##PASS-ACTION = 'L' /* Confirm load on-line
*S** RESET ##PASS-KEY
*S** ESCAPE BOTTOM(PROG.)
*S** END-REPEAT
*S***
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-CPS
*S*************************************************************************
*S** /*
*S** /* Call the WF-CPS-xxyy object subprogram
*S** CALLNAT 'WFCPC25O' WW-GDA
*S** WFCPC25D
*S** WFCPC25D-ID
*S** WFCPC25R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-CPS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-FEDERAL
*S*************************************************************************
*S** /*
*S** /* Call the WF-FEDERAL-xxyy object subprogram
*S** CALLNAT 'WFFED25O' WW-GDA
*S** WFFED25D
*S** WFFED25D-ID
*S** WFFED25R
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-FEDERAL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-STUDENT
*S*************************************************************************
*S** /*
*S** /* Call the WW-STUDENT object subprogram
*S** CALLNAT 'WWSTDNTO' WW-GDA
*S** WWSTDNTD
*S** WWSTDNTD-ID
*S** WWSTDNTR
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-STUDENT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE LOAD-CORRECTIONS
*S*************************************************************************
*S** /*
*S** /* First, if Corrected ISIR, delete old corrections
*S** IF WFADDDSD.WF-AD-SEND-RSN = 'C'
*S** MOVE EDE-TYPE TO ##PASS-KEY
*S** MOVE 'X' TO ##PASS-TEMP
*S** PERFORM PURGE-ECAR
*S** END-IF
*S** /*
*S** /* If corrections were made to ADD file fields,
*S** /* create correction records now that student is in FINANCIER
*S** DECIDE FOR EVERY CONDITION
*S** WHEN WFADDDSD.WF-AD-C-SSN = 'S'
*S** /*
*S** /* SSN modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-SSN'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-SSN
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-DOB = 'B'
*S** /*
*S** /* DOB modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-DOB'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** MOVE EDITED WFADDDSD.WW-ST-DOB (EM=YYYYMMDD) TO #VALUE
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-NL = 'L'
*S** /*
*S** /* Last name modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-NM-LAST'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-NM-LAST
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-NF = 'F'
*S** /*
*S** /* First name modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-NM-FIRST'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-NM-FIRST
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN WFADDDSD.WF-AD-C-NM = 'M'
*S** /*
*S** /* Middle Initial modified
*S** ASSIGN #PASS-KEY = 'WWSTDNTD.WW-ST-NM-MI'
*S** RESET #PASS-TEMP
*S** PERFORM GET-SAR-NO #PASS-KEY #PASS-TEMP
*S** ASSIGN #HOLD-SAR = #PASS-TEMP
*S** ASSIGN #VALUE = WFADDDSD.WW-ST-NM-MI
*S** SEPARATE #PASS-KEY INTO #HOLD-FILE #PASS-KEY WITH
*S** DELIMITER '.'
*S** PERFORM LOAD-UTIL-ARRAY
*S** WHEN ANY
*S** CALLNAT 'WWDUTILN' WW-GDA WWVALLDA
*S** WHEN NONE
*S** IGNORE
*S** END-DECIDE
*S**END-SUBROUTINE /* LOAD-CORRECTIONS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE LOAD-UTIL-ARRAY
*S*************************************************************************
*S** /*
*S** /* Load utility array for correction record create
*S** RESET #ARRAY-LOADED
*S** ASSIGN #N = 1
*S** /*
*S** REPEAT WHILE NOT #ARRAY-LOADED
*S** IF (#FILE(#N) = #HOLD-FILE AND #FIELD(#N) = #PASS-KEY) OR
*S** (#FILE(#N) = ' ' AND #FIELD(#N) = ' ')
*S** ASSIGN #SAR-FLD-NO(#N) = #HOLD-SAR /* Found match OR
*S** ASSIGN #VALU(#N) = #VALUE /* not yet defined
*S** ASSIGN #VALU-SUB = #N
*S** ASSIGN #ARRAY-LOADED = TRUE
*S** IF #FILE(#N) = ' ' AND #FIELD(#N) = ' '
*S** ASSIGN #FILE(#N) = #HOLD-FILE
*S** ASSIGN #FIELD(#N) = #PASS-KEY
*S** END-IF
*S** END-IF
*S** ADD 1 TO #N
*S** END-REPEAT
*S**END-SUBROUTINE /* LOAD-UTIL-ARRAY
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE PERFORM-TRANSLATE-CASE
*S*************************************************************************
*S** /*
*S** /* Case translation routine
*S** PERFORM TRANSLATE-CASE #TRANSLATE-FIELD #TRANSLATE-CASE
*S** #REMOVE-SPEC-CH
*S**END-SUBROUTINE /* PERFORM-TRANSLATE-CASE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-FEDERAL
*S*************************************************************************
*S** /*
*S** /* Add or update Federal information
*S** IF #ADD-FEDERAL
*S** ASSIGN WWAOBJ.#FUNCTION = 'STORE'
*S** ELSE
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** END-IF
*S** /*
*S** CALLNAT 'WFFE225N' WW-GDA #LOGICALS #DATA-ERROR
*S** WF25FEDL WF25FEDL-ID
*S** WFFED25D WFFED25D-ID
*S** WFADDDSD WFADDDSD-ID
*S** WWVALLDA
*S** /*
*S** /* WFFE252N cannot do all FEDERAL updates - USIZE
*S** /*
*S** PERFORM CALL-OBJECT-FEDERAL
*S**END-SUBROUTINE /* UPDATE-FEDERAL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-CPS
*S*************************************************************************
*S** /*
*S** /* Due to size restrictions, CPS is updated in WFFE325N
*S** /*
*S** CALLNAT 'WFFE325N' WW-GDA WFADDDSD WFADDDSD-ID
*S** /*
*S** /* Reread new or updated CPS record to get info for event record
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-CPS
*S**END-SUBROUTINE /* UPDATE-CPS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-PARENTS
*S*************************************************************************
*S** /*
*S** /* Add or update Parent information
*S** /* and update Student record to reflect parent ids
*S** IF WF25FEDL.WF-FE-P1-SSN NE ' '
*S** /*
*S** /* Determine parent 1 Parent ID from the SSN, name and DOB on ISIR
*S** /* If parent 1 Parent ID is second one in Student record, switch
*S** /* the ones in the student's record
*S** /* If parent 1 Parent ID doesn't match first one in Student record,
*S** /* move it into first slot in Student record
*S** MOVE WF25FEDL.WF-FE-P1-NM-LAST TO #PASS-NM-LAST
*S** MOVE WF25FEDL.WF-FE-P1-NM-FIRST TO #PASS-NM-FIRST
*S** RESET #PASS-NM-MI
*S** PERFORM DETERMINE-PID WF25FEDL.WF-FE-P1-SSN
*S** #PASS-NM-LAST #PASS-NM-FIRST
*S** #PASS-NM-MI
*S** WF25FEDL.WF-FE-P1-DOB #PASS-PID
*S** IF #PASS-PID NE ' '
*S** IF #PASS-PID = WWSTDNTD.WW-ST-PARENT-ID2
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID2 = WWSTDNTD.WW-ST-PARENT-ID1
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID1 = #PASS-PID
*S** END-IF
*S** END-IF
*S** IF #PASS-PID NE ' ' AND
*S** #PASS-PID NE WWSTDNTD.WW-ST-PARENT-ID1
*S** MOVE #PASS-PID TO WWSTDNTD.WW-ST-PARENT-ID1
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-SSN NE ' '
*S** /*
*S** /* Determine parent 2 Parent ID from the SSN, name and DOB on ISIR
*S** /* If parent 2 Parent ID is second one in Student record, switch
*S** /* the ones in the student's record
*S** /* If parent 2 Parent ID doesn't match first one in Student record,
*S** /* move it into first slot in Student record
*S** MOVE WF25FEDL.WF-FE-P2-NM-LAST TO #PASS-NM-LAST
*S** MOVE WF25FEDL.WF-FE-P2-NM-FIRST TO #PASS-NM-FIRST
*S** RESET #PASS-NM-MI
*S** PERFORM DETERMINE-PID WF25FEDL.WF-FE-P2-SSN
*S** #PASS-NM-LAST #PASS-NM-FIRST
*S** #PASS-NM-MI
*S** WF25FEDL.WF-FE-P1-DOB #PASS-PID
*S** IF #PASS-PID NE ' '
*S** IF #PASS-PID = WWSTDNTD.WW-ST-PARENT-ID1
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID1 = WWSTDNTD.WW-ST-PARENT-ID2
*S** ASSIGN WWSTDNTD.WW-ST-PARENT-ID2 = #PASS-PID
*S** END-IF
*S** END-IF
*S** IF #PASS-PID NE ' ' AND
*S** #PASS-PID NE WWSTDNTD.WW-ST-PARENT-ID2
*S** MOVE #PASS-PID TO WWSTDNTD.WW-ST-PARENT-ID2
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get current information for both parents from External file
*S** ASSIGN ##PASS-ACTION = 'R'
*S** RESET WWPARNTD
*S** ASSIGN WWPARNTD.#PARENT1-ID = WWSTDNTD.WW-ST-PARENT-ID1
*S** ASSIGN WWPARNTD.#PARENT2-ID = WWSTDNTD.WW-ST-PARENT-ID2
*S** PERFORM PARENTS-SERVICE WWPARNTD
*S** /*
*S** /* Decide whether parent information needs to be updated
*S** RESET #HOLD-LAST #HOLD-FIRST
*S** IF WWPARNTD.#PARENT1-ID NE ' '
*S** IF WF25FEDL.WF-FE-P1-NM-LAST NE ' '
*S** IF WWPARNTD.#PARENT1-NAME NE ' '
*S** SEPARATE WWPARNTD.#PARENT1-NAME INTO #HOLD-LAST #HOLD-FIRST
*S** IGNORE WITH DELIMITERS ','
*S** MOVE LEFT JUSTIFIED #HOLD-FIRST TO #HOLD-FIRST
*S** ASSIGN #TRANSLATE-CASE = 'U'
*S** MOVE #HOLD-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-NM-LAST NE #TRANSLATE-FIELD OR
*S** (WF25FEDL.WF-FE-P1-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P1-NM-FIRST NE ' ')
*S** IF WF25FEDL.WF-FE-P1-NM-LAST NE #TRANSLATE-FIELD
*S** IF ##CNVT-CASE
*S** ASSIGN #TRANSLATE-CASE = 'M'
*S** MOVE WF25FEDL.WF-FE-P1-NM-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO #HOLD-LAST
*S** ELSE
*S** MOVE WF25FEDL.WF-FE-P1-NM-LAST TO #HOLD-LAST
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P1-NM-FIRST NE ' '
*S** MOVE WF25FEDL.WF-FE-P1-NM-FIRST TO #HOLD-FIRST
*S** END-IF
*S** COMPRESS #HOLD-LAST ',' INTO #HOLD-LAST LEAVING NO
*S** COMPRESS #HOLD-LAST #HOLD-FIRST INTO WWPARNTD.#PARENT1-NAME
*S** WITH DELIMITER ' '
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-SSN NE ' '
*S** MOVE WF25FEDL.WF-FE-P1-SSN TO WWPARNTD.#PARENT1-SSN
*S** END-IF
*S** IF WF25FEDL.WF-FE-P1-DOB = MASK(YYYYMMDD)
*S** MOVE EDITED WF25FEDL.WF-FE-P1-DOB
*S** TO WWPARNTD.#PARENT1-DOB (EM=YYYYMMDD)
*S** END-IF
*S** END-IF
*S** /*
*S** RESET #HOLD-LAST #HOLD-FIRST
*S** IF WWPARNTD.#PARENT2-ID NE ' '
*S** IF WF25FEDL.WF-FE-P2-NM-LAST NE ' '
*S** IF WWPARNTD.#PARENT2-NAME NE ' '
*S** SEPARATE WWPARNTD.#PARENT2-NAME INTO #HOLD-LAST #HOLD-FIRST
*S** IGNORE WITH DELIMITERS ','
*S** MOVE LEFT JUSTIFIED #HOLD-FIRST TO #HOLD-FIRST
*S** ASSIGN #TRANSLATE-CASE = 'U'
*S** MOVE #HOLD-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-NM-LAST NE #TRANSLATE-FIELD OR
*S** (WF25FEDL.WF-FE-P2-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P2-NM-FIRST NE ' ')
*S** IF WF25FEDL.WF-FE-P2-NM-LAST NE #TRANSLATE-FIELD
*S** IF ##CNVT-CASE
*S** ASSIGN #TRANSLATE-CASE = 'M'
*S** MOVE WF25FEDL.WF-FE-P2-NM-LAST TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO #HOLD-LAST
*S** ELSE
*S** MOVE WF25FEDL.WF-FE-P2-NM-LAST TO #HOLD-LAST
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-NM-FIRST NE SUBSTRING(#HOLD-FIRST,1,1) AND
*S** WF25FEDL.WF-FE-P2-NM-FIRST NE ' '
*S** MOVE WF25FEDL.WF-FE-P2-NM-FIRST TO #HOLD-FIRST
*S** END-IF
*S** COMPRESS #HOLD-LAST ',' INTO #HOLD-LAST LEAVING NO
*S** COMPRESS #HOLD-LAST #HOLD-FIRST INTO WWPARNTD.#PARENT2-NAME
*S** WITH DELIMITER ' '
*S** END-IF
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-SSN NE ' '
*S** MOVE WF25FEDL.WF-FE-P2-SSN TO WWPARNTD.#PARENT2-SSN
*S** END-IF
*S** IF WF25FEDL.WF-FE-P2-DOB = MASK(YYYYMMDD)
*S** MOVE EDITED WF25FEDL.WF-FE-P2-DOB
*S** TO WWPARNTD.#PARENT2-DOB (EM=YYYYMMDD)
*S** END-IF
*S** END-IF
*S** ASSIGN ##PASS-ACTION = 'U'
*S** PERFORM PARENTS-SERVICE WWPARNTD
*S**END-SUBROUTINE /* UPDATE-PARENTS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE UPDATE-STUDENT
*S*************************************************************************
*S** /*
*S** /* Add or update Student information
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** ASSIGN WWSTDNTD.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN WWSTDNTD.WF-FAO = ##FAO-ID
*S** MOVE 'R' TO WWSTDNTD.WW-ST-ATTRIBUTES
*S** MOVE 'R' TO WWSTDNTD.WW-ST-ADDRESS1
*S** MOVE 'R' TO WWSTDNTD.WW-ST-ADDRESS2
*S** MOVE 'P' TO WWSTDNTD.WW-ST-AD1-TYPE
*S** MOVE 'L' TO WWSTDNTD.WW-ST-AD2-TYPE
*S** PERFORM CALL-OBJECT-STUDENT
*S** IF WWAOBJ.#EXISTS
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** ELSE
*S** ASSIGN WWAOBJ.#FUNCTION = 'STORE'
*S** END-IF
*S** /*
*S** /* If data stored in mixed case, set up translate variables
*S** IF ##CNVT-CASE
*S** ASSIGN #TRANSLATE-CASE = 'M'
*S** RESET #REMOVE-SPEC-CH
*S** END-IF
*S** /*
*S** /* Load data
*S** MOVE ##SID TO WWSTDNTD.WW-ST-SID
*S** IF WFADDDSD.WW-ST-SSN = MASK(999999999)
*S** ASSIGN WWSTDNTD.WW-ST-SSN = WFADDDSD.WW-ST-SSN
*S** ELSE
*S** IF WFADDDSD.WW-ST-SSN NE SPACE
*S** MOVE 'Stu-SSN: ' TO #ERR-FLD
*S** MOVE WFADDDSD.WW-ST-SSN TO #ERR-VAL
*S** PERFORM WRITE-ERROR-LINE
*S** END-IF
*S** END-IF
*S** MOVE WFADDDSD.WW-NAME-LAST TO WWSTDNTD.WW-NAME-LAST
*S** MOVE WFADDDSD.WW-NAME-FIRST TO WWSTDNTD.WW-NAME-FIRST
*S** MOVE WFADDDSD.WW-ST-NM-LAST TO WWSTDNTD.WW-ST-NM-LAST
*S** MOVE WFADDDSD.WW-ST-NM-FIRST TO WWSTDNTD.WW-ST-NM-FIRST
*S** MOVE WFADDDSD.WW-ST-NM-MI TO WWSTDNTD.WW-ST-NM-MI
*S** IF WFADDDSD.WW-ST-DOB NE INIT-DATE
*S** MOVE WFADDDSD.WW-ST-DOB TO WWSTDNTD.WW-ST-DOB
*S** END-IF
*S** IF WF25FEDL.WF-FE-EMAIL NE ' '
*S** MOVE WF25FEDL.WF-FE-EMAIL TO WWSTDNTD.WW-ST-EMAIL
*S** END-IF
*S** IF WF25FEDL.WF-FE-S-ALIEN NE ' '
*S** MOVE WF25FEDL.WF-FE-S-ALIEN TO WWSTDNTD.WW-ST-ALIEN
*S** END-IF
*S** IF ##CNVT-CASE
*S** MOVE WF25FEDL.WF-FE-AD-STRT TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO WF25FEDL.WF-FE-AD-STRT
*S** MOVE WF25FEDL.WF-FE-AD-CITY TO #TRANSLATE-FIELD
*S** PERFORM PERFORM-TRANSLATE-CASE
*S** MOVE #TRANSLATE-FIELD TO WF25FEDL.WF-FE-AD-CITY
*S** END-IF
*S** IF WWSTDNTD.WW-ST-AD1-TYPE = 'P' OR /* Permanent address
*S** (WWSTDNTD.WW-ST-AD1-TYPE = ' ' AND
*S** WWSTDNTD.WW-ST-AD2-TYPE = ' ')
*S** MOVE 'P' TO WWSTDNTD.WW-ST-AD1-TYPE
*S** MOVE WF25FEDL.WF-FE-AD-STRT TO WWSTDNTD.WW-ST-AD1-STRT1
*S** MOVE WF25FEDL.WF-FE-AD-CITY TO WWSTDNTD.WW-ST-AD1-CITY
*S** MOVE WF25FEDL.WF-FE-AD-STATE TO WWSTDNTD.WW-ST-AD1-STATE
*S** MOVE WF25FEDL.WF-FE-AD-ZIP TO WWSTDNTD.WW-ST-AD1-ZIP
*S** IF WF25FEDL.WF-FE-AD-PHONE IS (N10)
*S** ASSIGN WWSTDNTD.WW-ST-AD1-PHONE = VAL(WF25FEDL.WF-FE-AD-PHONE)
*S** ELSE
*S** IF WF25FEDL.WF-FE-AD-PHONE NE SPACE
*S** MOVE 'Stu-Phone number: ' TO #ERR-FLD
*S** MOVE WF25FEDL.WF-FE-AD-PHONE TO #ERR-VAL
*S** PERFORM WRITE-ERROR-LINE
*S** END-IF
*S** END-IF
*S** ELSE
*S** IF WWSTDNTD.WW-ST-AD2-TYPE = 'P' OR = ' ' /* Permanent address
*S** MOVE 'P' TO WWSTDNTD.WW-ST-AD2-TYPE
*S** MOVE WF25FEDL.WF-FE-AD-STRT TO WWSTDNTD.WW-ST-AD2-STRT1
*S** MOVE WF25FEDL.WF-FE-AD-CITY TO WWSTDNTD.WW-ST-AD2-CITY
*S** MOVE WF25FEDL.WF-FE-AD-STATE TO WWSTDNTD.WW-ST-AD2-STATE
*S** MOVE WF25FEDL.WF-FE-AD-ZIP TO WWSTDNTD.WW-ST-AD2-ZIP
*S** IF WF25FEDL.WF-FE-AD-PHONE IS (N10)
*S** ASSIGN WWSTDNTD.WW-ST-AD2-PHONE = VAL(WF25FEDL.WF-FE-AD-PHONE)
*S** ELSE
*S** IF WF25FEDL.WF-FE-AD-PHONE NE SPACE
*S** MOVE 'Stu-Phone number: ' TO #ERR-FLD
*S** MOVE WF25FEDL.WF-FE-AD-PHONE TO #ERR-VAL
*S** PERFORM WRITE-ERROR-LINE
*S** END-IF
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** MOVE 'W' TO WWSTDNTD.WW-ST-ATTRIBUTES
*S** IF WWSTDNTD.WW-ST-AD1-TYPE = 'P'
*S** MOVE 'W' TO WWSTDNTD.WW-ST-ADDRESS1
*S** MOVE 'N' TO WWSTDNTD.WW-ST-ADDRESS2
*S** ELSE
*S** IF WWSTDNTD.WW-ST-AD2-TYPE = 'P'
*S** MOVE 'N' TO WWSTDNTD.WW-ST-ADDRESS1
*S** MOVE 'W' TO WWSTDNTD.WW-ST-ADDRESS2
*S** END-IF
*S** END-IF
*S** /*
*S** PERFORM UPDATE-PARENTS
*S** /*
*S** PERFORM CALL-OBJECT-STUDENT
*S**END-SUBROUTINE /* UPDATE-STUDENT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE WRITE-ERROR-LINE
*S*************************************************************************
*S** /*
*S** /* If processing batch, write out error line
*S** IF *DEVICE = 'BATCH'
*S** IF #ERR-SID NE ' '
*S** WRITE(2) ' '
*S** END-IF
*S** WRITE(2) #DATA-ERROR
*S** RESET #ERR-SID #ERR-NAM
*S** END-IF
*S**END-SUBROUTINE /* WRITE-ERROR-LINE
*S**END
*E
|