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
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
|
*S****SAG GENERATOR: WW-OBJECT-MAINT-DIALOG Version: 3.2.2
*S****SAG TITLE: Loan Dialog Program
*S****SAG SYSTEM: FINANCIER
*S****SAG GDA: WWGDA
*S****SAG DESCS(1): This program maintains the WF-LOANAPP
*S****SAG DESCS(2): and WF-LOANDSB files.
*S****SAG HEADER1: FINANCIER
*S****SAG DIRECT-COMMAND-PROCESS:
*S****SAG ACTIONS: 0101010100000000
*S****SAG OBJECT-NAME: WFLOAPPO
*S****SAG MAX-WINDOWS: 1
*S****SAG MAP-NAME(1): WFLNEDTM
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Program : WFLNEDTP
*S*** System : FINANCIER
*S*** Title : Loan Dialog Program
*S*** Generated: Jan 23,04 at 01:55 PM
*S*** Function : This program maintains the WF-LOANAPP
*S*** and WF-LOANDSB files.
*S***
*S***
*S***
*S*** Copyright 1995 - 2006 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S***
*S** LOCAL USING WFLOAPPD /* Passed to object subprogram
*S** LOCAL USING WFLOAPPR /* Passed to object subprogram
*S** LOCAL USING WFLOAPPS /* Shadow file
*S** LOCAL USING WWAOBJ /* Used by object subprograms
*S***
*S** LOCAL USING WWCONST /* Constants
*S** LOCAL USING WWDIALDA /* Common data for dialog objects.
*S** LOCAL USING WWENVIRA /* Used to capture/restore previous environment.
*S** LOCAL USING WWKEYLDA /* Used to set function keys and names.
*S** LOCAL USING WWVALLDA /* Used by valid values/edit mask routine
*S** LOCAL
*S****SAG DEFINE EXIT SECURITY-PGM
*S** /*
*S** /* Security program exit
*S** 01 #SECURITY-PROGRAM(A8) INIT<'WFLNSUMP'>
*S****SAG END-EXIT
*S****SAG DEFINE EXIT EVENT-HISTORY
*S** /*
*S** /* Variables utilized by Event History routine
*S** 01 #EVENT-TYPE(A5) CONST<' '>
*S** 01 #EVENT-DESC(A40) CONST<' '>
*S****SAG END-EXIT
*S****SAG DEFINE EXIT REQUIREMENTS
*S** /*
*S** /* Variables Requirement routine
*S** 01 #REQMNTS(3)
*S** 02 #REQMNT-TYPE(A1) /* (A/Application, D/Disbursement)
*S** INIT (1)<' '> (2)<' '> (3)<' '>
*S** 02 #REQMNT-DOC(A6) /* Document mnemonic
*S** INIT (1)<' '> (2)<' '> (3)<' '>
*S** 02 #REQMNT-PD(A2) /* (ST/Student, AY/Aid Year)
*S** INIT (1)<' '> (2)<' '> (3)<' '>
*S****SAG END-EXIT
*S***
*S*** Scalar Constants.
*S** 01 #SUB-PARM(A1)
*S***
*S*** Miscellaneous Variables.
*S** 01 #NEXT(L) /* Next processing selected
*S** 01 #DISPLAYED-KEY(A17) /* Last record found
*S** 01 #TYPE-POS(P3)
*S** 01 #KEY(A17) /* Key field copied from map.
*S** 01 #NEW-OBJECT(L) /* GET was done on different object
*S** 01 #BYPASS-OBJECT(L) /* I/O was done via subprogram
*S** 01 #BYPASS-INPUT(L) /* do not perform input statement
*S** 01 #NULL-KEY(A17)
*S****SAG DEFINE EXIT LOCAL-DATA
*S** 01 #DATES-LOCKED(L)
*S** 01 #DATES-LOCKED-LOAN(A25)
*S***
*S** 01 #FIRST-TIME(L) INIT<TRUE>
*S** 01 #RECORD-DELETED(L)
*S** 01 #TITLE(A40)
*S** 01 #PASS-KEY(A30)
*S** 01 #PASS-TEMP(A30)
*S** 01 #SUBPGM(A8)
*S** 01 #SUB(P3)
*S** 01 #DSUB(P3)
*S** 01 #ASUB1(P3)
*S** 01 #ASUB2(P3)
*S** 01 #ASUB3(P3)
*S** 01 #ORIG-PARENT(A9)
*S** 01 #ORIG-START-END(A1)
*S** 01 #ORIG-AMT1(P5.2)
*S** 01 #ORIG-PCT-FEE(P3.3)
*S** 01 #ORIG-PCT-REB(P3.3)
*S** 01 #ORIG-AMT2(P5.2)
*S** 01 #ORIG-AMT3(P5.2)
*S** 01 #ORIG-A-SNT-DATE(D)
*S** 01 #ORIG-A-ACT(A1)
*S** 01 #ORIG-C-ACT(A1)
*S** 01 #ORIG-P-ACT(A1)
*S** 01 #ORIG-D-ACT(A1/12)
*S** 01 #ORIG-D-SPLIT
*S** 02 #ORIG-D-DP(A1/12)
*S** 02 #ORIG-D-AMT1(P5.2/12)
*S** 02 #ORIG-D-AMT2(P5.2/12)
*S** 02 #ORIG-D-AMT3(P5.2/12)
*S** 01 #DISB-CHG(L)
*S** 01 #AWARD-ERROR(L)
*S***
*S** 01 #CERT-DATE(D)
*S** 01 #HOLD-A-ACT(A1)
*S** 01 #TOT-D1(P5.2)
*S***
*S** 01 #HOLD-EC-TYPE(A3)
*S** 01 #HOLD-LOAN(N2)
*S** 01 REDEFINE #HOLD-LOAN
*S** 02 #HOLD-LOAN-A(A2)
*S***
*S*** Map variables
*S** 01 #TAB-SNAP(A1)
*S** 01 #TAB-CORR(A1)
*S** 01 #LABEL-PARENT(A7)
*S** 01 #LABEL-PARENT-CV(C)
*S***
*S** 01 #WF-LOAN-DISBURSEMENT
*S** 02 #WF-LD-ARRAY(12)
*S** 03 #WF-LD-ACT(A1)
*S** 03 #WF-LD-ACT-RSN(A2)
*S** 03 #WF-LD-ACT-DATE(A10)
*S** 03 #WF-LD-AMT1(A9)
*S** 03 #WF-LD-DP(A1)
*S** 03 #WF-LD-DATE(A10)
*S** 03 #WF-LD-ACK(A1)
*S** 03 #WF-LD-ACK-DATE(A10)
*S** 03 #WF-LD-ENR(A1)
*S** /*
*S** 03 #WF-LD-ACT-F(L)
*S** 03 #WF-LD-ACT-RSN-F(L)
*S** 03 #WF-LD-AMT1-F(L)
*S** 03 #WF-LD-DP-F(L)
*S** 03 #WF-LD-DATE-F(L)
*S** 03 #WF-LD-ACK-F(L)
*S** 03 #WF-LD-ACK-DATE-F(L)
*S** 03 #WF-LD-ENR-F(L)
*S** /*
*S** 03 #WF-LD-ACT-CV(C)
*S** 03 #WF-LD-ACT-RSN-CV(C)
*S** 03 #WF-LD-AMT1-CV(C)
*S** 03 #WF-LD-DP-CV(C)
*S** 03 #WF-LD-DATE-CV(C)
*S** 03 #WF-LD-ACK-CV(C)
*S** 03 #WF-LD-ACK-DATE-CV(C)
*S** 03 #WF-LD-ENR-CV(C)
*S***
*S** 01 #TABLE-VALUE
*S** 02 #TABLE-FAO(A2)
*S** 02 #TABLE-TYPE(A1)
*S** 02 #TABLE-SUBTYPE(A1)
*S** 02 #TABLE-FILL(A6)
*S** 01 REDEFINE #TABLE-VALUE
*S** 02 #TABLE-VALUE-RED(A10)
*S** 01 #HOLD-TYPE-SUBTYPE(A2)
*S** 01 #HOLD-FUNCTION(A15)
*S** 01 #LNTYPE-REC-NF(L)
*S***
*S*** Loan processing data areas
*S** LOCAL USING WWLNTYPD /* Passed to object subprogram
*S** LOCAL USING WWLNTYPR /* Passed to object subprogram
*S** LOCAL USING WFLOANPD
*S** LOCAL USING WFLODSBL
*S** LOCAL USING WFLODSBV
*S****SAG END-EXIT
*S**END-DEFINE
*S***
*S***
*S*** Define Formats
*S**FORMAT PS=23 KD=ON LS=133 ZP=OFF
*S***
*S**PERFORM INITIALIZATIONS
*S***
*S*************************************************************************
*S***
*S**PROG.
*S**REPEAT /* until exit action
*S** /*
*S**NEW-SCREEN.
*S** REPEAT /* Escape this repeat with indexes set as desired.
*S** /*
*S** /* Security / Required fields
*S** /* Perform first time and/or new student (set via Selection)
*S** IF #DISPLAYED-KEY = #NULL-KEY
*S** MOVE 'WFLOAPPD' TO ##FILE-ID
*S** MOVE #SECURITY-PROGRAM TO ##PGM-ID
*S** PERFORM LOANAPP-SECURITY LOANAPP-CNTL-VARS
*S** RESET INITIAL LOANAPP-LOGICALS
*S****SAG DEFINE EXIT AFTER-SECURITY
*S** MOVE 'WFLODSBD' TO ##FILE-ID
*S** PERFORM LOANDSB-SECURITY LOANDSB-CNTL-VARS
*S** MOVE LD-DP-CV TO #WF-LD-ACT-CV(*)
*S** #WF-LD-ACT-RSN-CV(*)
*S** #WF-LD-AMT1-CV(*)
*S** #WF-LD-DP-CV(*)
*S** #WF-LD-DATE-CV(*)
*S** #WF-LD-ACK-CV(*)
*S** #WF-LD-ACK-DATE-CV(*)
*S** #WF-LD-ENR-CV(*)
*S****SAG END-EXIT
*S** /*
*S** PERFORM REQUIRED-FIELD-CHECK REQUIRED-FIELD(*)
*S** PERFORM SET-KEYS
*S** END-IF
*S** /*
*S** /* Load appropriate function
*S** IF #ADD-OBJECT
*S** ASSIGN #FUNCTION = 'STORE'
*S** RESET #ADD-OBJECT
*S** ELSE
*S** IF #DISPLAYED-KEY NE #KEY
*S** OR #KEY = #NULL-KEY
*S** ASSIGN #FUNCTION = 'GET'
*S** ELSE
*S** ASSIGN #FUNCTION = 'UPDATE'
*S** END-IF
*S** END-IF
*S****SAG DEFINE EXIT BEFORE-CALL-OBJECT
*S** /*
*S** /* Supply key info from GDA
*S** IF #FIRST-TIME
*S** RESET #FIRST-TIME
*S** ASSIGN WFLOAPPD-ID = ##PASS-KEY
*S** RESET ##PASS-KEY ##PASS-ACTION
*S** MOVE BY NAME WFLOAPPD-ID.STRUCTURE TO WFLOAPPD
*S** MOVE WFLOAPPD.WF-LOAN-ID TO #HOLD-LOAN
*S** COMPRESS 'P' #HOLD-LOAN-A INTO #HOLD-EC-TYPE LEAVING NO
*S** END-IF
*S** /*
*S****SAG END-EXIT
*S** /*
*S** /* Perform object I/O subprogram
*S** IF #BYPASS-OBJECT
*S** RESET #BYPASS-OBJECT
*S** ELSE
*S** PERFORM CALL-OBJECT
*S** END-IF
*S****SAG DEFINE EXIT AFTER-CALL-OBJECT
*S** IF #RECORD-DELETED OR
*S** #LNTYPE-REC-NF
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S** END-IF
*S** IF #DATES-LOCKED
*S** COMPRESS 'Academic Year dates not set, lock flag set on loan:'
*S** #DATES-LOCKED-LOAN INTO ##MSG
*S** RESET #DATES-LOCKED
*S** #DATES-LOCKED-LOAN
*S** END-IF
*S****SAG END-EXIT
*S** /*
*S** /* Load shadow file definitions for appropriate map
*S** IF NOT #CONFIRM-PURGE
*S** MOVE LOAD TO #SUB-PARM
*S** PERFORM CALL-EXT-SUB
*S****SAG DEFINE EXIT AFTER-CALL-LOAD
*S** PERFORM CALL-EXT-SUB-LOANDSB
*S****SAG END-EXIT
*S** END-IF
*S** /*
*S** /* Assign appropriate message
*S** IF ##MSG = SPACE
*S** DECIDE ON FIRST VALUE OF #FUNCTION
*S** VALUE 'GET'
*S** IF #ADD-OBJECT
*S** COMPRESS 'This information not currently stored for #TEMP,'
*S** 'ready to add' INTO ##MSG
*S** ELSE
*S** COMPRESS 'To modify the current #TEMP information,'
*S** 'make changes and press ENTER' INTO ##MSG
*S** END-IF
*S** VALUE 'NEXT'
*S** COMPRESS 'Next #TEMP information has been displayed'
*S** INTO ##MSG
*S** VALUE 'UPDATE'
*S** COMPRESS '#TEMP information has been modified'
*S** INTO ##MSG
*S** VALUE 'STORE'
*S** COMPRESS '#TEMP information has been added'
*S** INTO ##MSG
*S** VALUE 'DELETE'
*S** IF #CONFIRM-PURGE
*S** COMPRESS '#TEMP information has been purged'
*S** INTO ##MSG
*S** ELSE
*S** COMPRESS 'Press ENTER to confirm purge'
*S** INTO ##MSG
*S** END-IF
*S** ANY
*S** EXAMINE ##MSG FOR '#TEMP' AND REPLACE WITH ##SYSTEM-DATA-TYPE
*S** EXAMINE ##MSG FOR ##SYSTEM-DATA-TYPE GIVING POSITION #TYPE-POS
*S** IF #TYPE-POS = 1
*S** EXAMINE SUBSTRING(##MSG,1,1) AND TRANSLATE INTO UPPER CASE
*S** END-IF
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** END-IF
*S** SET CONTROL 'WB'
*S****SAG DEFINE EXIT DEFINE-WINDOW
*S** /*
*S** /* Define Window attributes
*S** DEFINE WINDOW LOANDET
*S** SIZE 18*79
*S** BASE 4 / 1
*S** TITLE #TITLE
*S** CONTROL SCREEN
*S** FRAMED ON (CD=NE)
*S** POSITION OFF
*S** IF WW-LO-APP = 'C' OR = 'N'
*S** MOVE 'WFLOAPPD.WF-LA-TYPE' TO #PASS-KEY
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #PASS-TEMP
*S** ELSE
*S** MOVE 'WFLOAPPD.WF-LA-R-TYPE' TO #PASS-KEY
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #PASS-TEMP
*S** END-IF
*S** PERFORM GET-VALUE-TRANSLATION #PASS-KEY #PASS-TEMP
*S** COMPRESS #PASS-TEMP '-' WFLOAPPD.WF-LA-ID INTO #TITLE
*S** WITH DELIMITER SPACE
*S** SET WINDOW 'LOANDET'
*S** ASSIGN ##COLOR = 'NE'
*S****SAG END-EXIT
*S** /*
*S** /* INPUT processing
*S****SAG DEFINE EXIT BEFORE-INPUT
*S** /*
*S** /* Protect fields depending on app type and transmit status
*S** IF WW-LO-APP = 'S' OR = 'N'
*S** MOVE PROTECTED-ATTR TO LA-R-TYPE-CV
*S** END-IF
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G'
*S** MOVE PROTECTED-YE-ATTR TO #LABEL-PARENT-CV
*S** MOVE 'Parent:' TO #LABEL-PARENT
*S** ELSE
*S** MOVE NON-DISPLAY-PROT-ATTR TO #LABEL-PARENT-CV PARENT-ID-CV
*S** END-IF
*S** /*
*S** /* Protect Academic year and/or Loan Period
*S** /* dates if lock flag is set
*S** DECIDE ON FIRST VALUE OF WFLOAPPD.WF-LA-DATES-LOCK
*S** VALUE 'A'
*S** MOVE PROTECTED-ATTR TO LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** MOVE NORMAL-ATTR TO LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** VALUE 'L'
*S** MOVE PROTECTED-ATTR TO LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** MOVE NORMAL-ATTR TO LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** VALUE 'B'
*S** MOVE PROTECTED-ATTR TO LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** NONE
*S** MOVE NORMAL-ATTR TO LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** END-DECIDE
*S** /*
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF WFLODSBL.WF-LD-SNT-DATE(WF-LD-SUB) NE INIT-DATE AND
*S** (WFLODSBL.WF-LD-ACK(WF-LD-SUB) NE 'S' OR
*S** WFLODSBL.WF-LD-ACT(WF-LD-SUB) = 'I')
*S** MOVE PROTECTED-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** #WF-LD-DATE-CV(WF-LD-SUB)
*S** ELSE
*S** MOVE NORMAL-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** #WF-LD-DATE-CV(WF-LD-SUB)
*S** END-IF
*S** END-FOR
*S****SAG END-EXIT
*S** /*
*S** /* Input Map
*S** IF NOT #BYPASS-INPUT
*S** INPUT WITH TEXT ##MSG,
*S** ##MSG-DATA(1),##MSG-DATA(2),##MSG-DATA(3)
*S** USING MAP 'WFLNEDTM'
*S** END-IF
*S** /*
*S** RESET ##MSG
*S****SAG DEFINE EXIT AFTER-INPUT
*S** /*
*S** /* If Expand key, present appropriate window
*S** IF *PF-KEY = WWKEYLDA.#EXPAND-KEY
*S** RESET INITIAL #FAIL-EDIT
*S** MOVE EDIT TO #SUB-PARM
*S** PERFORM CALL-EXT-SUB
*S** PERFORM CALL-EXT-SUB-LOANDSB
*S** IF *CURS-FIELD = POS(WFLOAPPD.WW-PARENT-ID)
*S** IF WFLOAPPD.WW-PARENT-ID = ' '
*S** ASSIGN PARENT-ID-F = TRUE
*S** MOVE HI-LITE-ATTR TO PARENT-ID-CV
*S** REINPUT FULL 'Parent ID required'
*S** MARK *WFLOAPPD.WW-PARENT-ID ALARM
*S** END-IF
*S** MOVE EXT-PARENT-TYPE TO ##EXTERNAL-TYPE
*S** MOVE WFLOAPPD.WW-PARENT-ID TO ##EXTERNAL-ID
*S** FETCH RETURN 'WWEXTPAP'
*S** ELSE
*S** RESET #SUBPGM
*S** IF *CURS-FIELD = POS(#TAB-SNAP)
*S** MOVE 'WFLNSNPN' TO #SUBPGM
*S** ELSE
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF *CURS-FIELD = POS(#WF-LD-ACT(WF-LD-SUB))
*S** MOVE 'WFLNDSBN' TO #SUBPGM
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-FOR
*S** END-IF
*S** IF #SUBPGM NE ' '
*S** CALLNAT #SUBPGM WW-GDA WFLOAPPD-ID #ADD-OBJECT
*S** WFLOAPPD WFLOAPPD-ID WFLOAPPR WFLOAPPS
*S** WWAOBJ
*S** /*
*S** /* If expanded to Snapshot window, re-check to
*S** /* protect Parent ID in case class level updated
*S** IF #SUBPGM = 'WFLNSNPN'
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G'
*S** MOVE PROTECTED-YE-ATTR TO #LABEL-PARENT-CV
*S** MOVE 'Parent:' TO #LABEL-PARENT
*S** ELSE
*S** MOVE NON-DISPLAY-PROT-ATTR TO #LABEL-PARENT-CV
*S** PARENT-ID-CV
*S** END-IF
*S** END-IF
*S** /*
*S** /* If expanded to Loan Disbursement window, re-retrieve
*S** /* loan disbursement info in case updates occurred
*S** IF #SUBPGM = 'WFLNDSBN'
*S** ASSIGN ##PASS-ACTION = 'R'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** END-IF
*S** ELSE
*S** IF *CURS-FIELD = POS(#TAB-CORR)
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S** FETCH RETURN 'WFLNCORP'
*S** ELSE
*S** REINPUT 'Not an expandable field' ALARM
*S** END-IF
*S** END-IF
*S** END-IF
*S** ASSIGN #BYPASS-OBJECT = TRUE
*S** COMPRESS 'Complete changes and press ENTER' INTO ##MSG
*S** ESCAPE TOP
*S** END-IF
*S****SAG END-EXIT
*S** /*
*S** /*
*S** /* Check standard PF-Keys
*S** INCLUDE WWSTDKEY
*S** /*
*S** /* Trap invalid PF-Keys.
*S** IF *PF-KEY = 'ENTR' OR = WWKEYLDA.#SELECT-KEY
*S****SAG DEFINE EXIT VALID-PFKEYS
*S** OR = WWKEYLDA.#EXPAND-KEY
*S** OR = WWKEYLDA.#PRINT-KEY
*S****SAG END-EXIT
*S** IGNORE
*S** ELSE
*S** REINPUT 'Invalid program function key' ALARM
*S** END-IF
*S** /*
*S** /* Perform edit routine
*S** RESET INITIAL #FAIL-EDIT
*S** MOVE EDIT TO #SUB-PARM
*S** PERFORM CALL-EXT-SUB
*S****SAG DEFINE EXIT CALL-EDIT
*S** PERFORM CALL-EXT-SUB-LOANDSB
*S****SAG END-EXIT
*S** IF #FAIL-EDIT
*S** REINPUT FULL 'Edit errors occurred'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S****SAG DEFINE EXIT AFTER-EDIT
*S** /*
*S** /* Processing to be performed immediately after the edit routine
*S** IF WFLODSBL.WF-LD-DP(*) = #ORIG-D-DP(*) AND
*S** WFLODSBL.WF-LD-AMT1(*) = #ORIG-D-AMT1(*)
*S** RESET #DISB-CHG
*S** ELSE
*S** ASSIGN #DISB-CHG = TRUE
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE INIT-DATE
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) = ' ' AND
*S** #ORIG-D-DP(WF-LD-SUB) NE ' '
*S** ASSIGN #WF-LD-DP-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement point required'
*S** MARK *#WF-LD-DP(WF-LD-SUB) ALARM
*S** ELSE
*S** IF (WFLODSBL.WF-LD-AMT1(WF-LD-SUB) NE
*S** #ORIG-D-AMT1(WF-LD-SUB)) AND
*S** WFLODSBL.WF-LD-AMT1(WF-LD-SUB) = 0
*S** ASSIGN WFLODSBL.WF-LD-DP(WF-LD-SUB) = 'X'
*S** IF WFLODSBL.WF-LD-SNT-DATE(WF-LD-SUB) = INIT-DATE
*S** RESET WFLODSBL.WF-LD-DATE(WF-LD-SUB)
*S** END-IF
*S** END-IF
*S** END-IF
*S** END-IF
*S** IF WFLODSBL.WF-LD-AMT1(WF-LD-SUB) > 0
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) = ' '
*S** ASSIGN #WF-LD-DP-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement point required'
*S** MARK *#WF-LD-DP(WF-LD-SUB) ALARM
*S** ELSE
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) = 'X'
*S** ASSIGN #WF-LD-DP-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement point can not be X'
*S** MARK *#WF-LD-DP(WF-LD-SUB) ALARM
*S** END-IF
*S** END-IF
*S** END-IF
*S** END-FOR
*S** END-IF
*S** IF WFLOAPPD.WF-LA-START-END = ' ' AND
*S** WFLOAPPD.WF-LA-A-SNT-DATE = INIT-DATE AND
*S** (WFLOAPPD.WF-LA-AMT1 NE #ORIG-AMT1 AND
*S** NOT #DISB-CHG)
*S** ASSIGN LA-START-END-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-START-END-CV
*S** REINPUT FULL 'Loan period needed for award processing'
*S** MARK *WFLOAPPD.WF-LA-START-END ALARM
*S** END-IF
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE INIT-DATE
*S** IF WFLOAPPD.WF-LA-C-ACT = 'X'
*S** ASSIGN LA-C-ACT-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-C-ACT-CV
*S** REINPUT FULL 'Loan may not be cancelled'
*S** MARK *WFLOAPPD.WF-LA-C-ACT ALARM
*S** END-IF
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF WFLODSBL.WF-LD-ACT(WF-LD-SUB) = 'X'
*S** ASSIGN #WF-LD-ACT-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-ACT-CV(WF-LD-SUB)
*S** REINPUT FULL 'Disbursement may not be cancelled'
*S** MARK *#WF-LD-ACT(WF-LD-SUB) ALARM
*S** END-IF
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) NE ' ' AND
*S** WFLODSBL.WF-LD-DP(WF-LD-SUB) NE 'X' AND
*S** WFLODSBL.WF-LD-DATE(WF-LD-SUB) = INIT-DATE
*S** ASSIGN #WF-LD-DATE-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DATE-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement date required'
*S** MARK *#WF-LD-DATE(WF-LD-SUB) ALARM
*S** END-IF
*S** END-FOR
*S** /*
*S** RESET #TOT-D1
*S** FOR WF-LD-SUB = 1 TO 12
*S** ADD WFLODSBL.WF-LD-AMT1(WF-LD-SUB) TO #TOT-D1
*S** END-FOR
*S** IF WFLOAPPD.WF-LA-AMT1 NE #TOT-D1
*S** ASSIGN LA-AMT1-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-AMT1-CV
*S** REINPUT FULL 'Eligibility not equal to disbursement total'
*S** MARK *WFLOAPPD.WF-LA-AMT1 ALARM
*S** END-IF
*S** END-IF
*S** /*
*S** IF WFLOAPPD.WF-LA-PROC NE 'E' AND
*S** WFLOAPPD.WF-LA-PROC NE 'A' AND
*S** WFLOAPPD.WF-LA-PROC NE 'D' AND
*S** WFLOAPPD.WF-LA-PROC NE 'M' AND
*S** WFLOAPPD.WF-LA-PROC NE ' '
*S** ASSIGN LA-PROC-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-PROC-CV
*S** REINPUT FULL 'Direct PLUS processing must be E, A, D or M'
*S** MARK *WFLOAPPD.WF-LA-PROC ALARM
*S** END-IF
*S** /*
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G' AND
*S** WFLOAPPD.WW-PARENT-ID = SPACE
*S** ASSIGN PARENT-ID-F = TRUE
*S** MOVE HI-LITE-ATTR TO PARENT-ID-CV
*S** REINPUT FULL 'Parent ID must be entered'
*S** MARK *WFLOAPPD.WW-PARENT-ID ALARM
*S** END-IF
*S** /*
*S** /*
*S****SAG END-EXIT
*S** /*
*S*************************************************************************
*S**DEFINE SUBROUTINE NEW-SCREEN
*S*************************************************************************
*S** /*
*S** /* Subroutine to allow escape from screen loop
*S** ESCAPE BOTTOM(NEW-SCREEN.) IMMEDIATE
*S**END-SUBROUTINE /* NEW-SCREEN
*S** /*
*S** END-REPEAT /* on NEW-SCREEN
*S**END-REPEAT /* on Repeat of Program.
*S***
*S**PERFORM FINAL-PROCESSING
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-EXT-SUB
*S*************************************************************************
*S** /*
*S** /* Call Map specific external subroutine
*S** PERFORM WFLNEDTM-MASK-EDITS #SUB-PARM WWVALLDA
*S** WFLOAPPD WFLOAPPD-ID WFLOAPPR WFLOAPPS
*S**END-SUBROUTINE /* CALL-EXT-SUB
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT
*S*************************************************************************
*S** /*
*S** /* Prior to processing object
*S** IF WWAOBJ.#FUNCTION = 'DELETE'
*S** RESET #CONFIRM-PURGE
*S** END-IF
*S****SAG DEFINE EXIT BEFORE-OBJECT-CALL
*S** /*
*S** /* Additional processing before calling the main object subprogram
*S** IF WWAOBJ.#FUNCTION = 'UPDATE'
*S** /*
*S** /* Fill in necessary subtype and fund information
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO WFLOAPPD.WF-LA-SUBTYPE1
*S** IF WFLOAPPD.WF-LA-FUND1 = ' '
*S** MOVE WW-LO-FUND1 TO WFLOAPPD.WF-LA-FUND1
*S** /* Grad PLUS uses second loan defined for LoanType instead
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) = 'G'
*S** MOVE WW-LO-FUND2 TO WFLOAPPD.WF-LA-FUND1
*S** END-IF
*S** END-IF
*S** /*
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE INIT-DATE AND
*S** WFLOAPPD.WF-LA-START-END NE #ORIG-START-END AND
*S** WFLOAPPD.WF-LA-START-END NE ' '
*S** MOVE 'DATE' TO #LO-ACTION
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #LO-TYPE
*S** IF WW-LO-APP = 'S'
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #LO-SUBTYPE
*S** END-IF
*S** MOVE WFLOAPPD.WF-LA-START-END TO #LO-START-END
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #LO-AMT1
*S** PERFORM GET-LOAN-DEFLT-INFO WFLOANPD
*S** MOVE #LO-START TO WFLOAPPD.WF-LA-START-DATE
*S** MOVE #LO-END TO WFLOAPPD.WF-LA-END-DATE
*S** END-IF
*S** /*
*S** /* If any action has changed, datestamp it (but hold
*S** /* application action changes to perform after award update)
*S** MOVE WFLOAPPD.WF-LA-A-ACT TO #HOLD-A-ACT
*S** /*
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE #ORIG-A-SNT-DATE
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE = INIT-DATE
*S** RESET WFLOAPPD.WF-LA-A-SNT-AMT1
*S** END-IF
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-ACT NE #ORIG-P-ACT
*S** IF WFLOAPPD.WF-LA-P-ACT = ' '
*S** RESET WFLOAPPD.WF-LA-P-ACT-RSN
*S** WFLOAPPD.WF-LA-P-ACT-DATE
*S** ELSE
*S** ASSIGN WFLOAPPD.WF-LA-P-ACT-DATE = *DATX
*S** END-IF
*S** END-IF
*S** PERFORM LOAN-ACTIONS WFLOAPPD WFLOAPPD-ID WFLODSBL
*S** WWVALLDA #ORIG-C-ACT #ORIG-D-ACT(*)
*S** IF WFLODSBL.WF-LD-AMT1(*) = #ORIG-D-AMT1(*)
*S** IGNORE
*S** ELSE
*S** ASSIGN #DISB-CHG = TRUE
*S** END-IF
*S** IF #DISB-CHG OR
*S** WFLOAPPD.WF-LA-PCT-FEE NE #ORIG-PCT-FEE OR
*S** WFLOAPPD.WF-LA-PCT-REB NE #ORIG-PCT-REB
*S** PERFORM COMPUTE-LOAN-FEES WFLOAPPD WFLOAPPD-ID WFLODSBL
*S** END-IF
*S** END-IF
*S****SAG END-EXIT
*S** /*
*S** /* Assign #KEY to equal the input fields
*S** MOVE BY NAME WFLOAPPD TO WFLOAPPD-ID.STRUCTURE
*S** ASSIGN #KEY = WFLOAPPD-ID
*S** /*
*S** /* Invoke subprogram to process object
*S** PERFORM CALL-OBJECT-IO
*S****SAG DEFINE EXIT AFTER-OBJECT-CALL
*S** IF WWAOBJ.#FUNCTION = 'GET'
*S** /*
*S** /* On retrieval of a loan record, find loan characteristics
*S** RESET WWLNTYPD #LNTYPE-REC-NF
*S** MOVE 'T' TO WWLNTYPD.WW-RECORD-TYPE
*S** MOVE 'LNTYP' TO WWLNTYPD.WW-TABLE-ID
*S** MOVE ##FAO-ID TO #TABLE-FAO
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #TABLE-TYPE
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #TABLE-SUBTYPE
*S** MOVE #TABLE-VALUE-RED TO WWLNTYPD.WW-TABLE-VALUE
*S** PERFORM CALL-OBJECT-LOANTYPE
*S** IF NOT WWAOBJ.#EXISTS
*S** COMPRESS WFLOAPPD.WF-LA-TYPE WFLOAPPD.WF-LA-R-TYPE
*S** INTO #HOLD-TYPE-SUBTYPE
*S** COMPRESS 'Loan type ' #HOLD-TYPE-SUBTYPE
*S** ' is not defined in loan type table' INTO ##MSG
*S** ASSIGN #LNTYPE-REC-NF = TRUE
*S** ESCAPE ROUTINE
*S** END-IF
*S** /*
*S** /* If certification action is blank, import snapshot data
*S** /* Import default loan values where blank
*S** IF WFLOAPPD.WF-LA-A-ACT = ' '
*S** RESET WFLOANPD
*S** MOVE 'ALL' TO #LO-ACTION
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #LO-TYPE
*S** IF WW-LO-APP = 'S'
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #LO-SUBTYPE
*S** END-IF
*S** MOVE WFLOAPPD.WF-LA-START-END TO #LO-START-END
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #LO-AMT1
*S** PERFORM GET-LOAN-DEFLT-INFO WFLOANPD
*S** IF WFLOAPPD.WF-LA-PROC = ' '
*S** MOVE #LO-PROC TO WFLOAPPD.WF-LA-PROC
*S** END-IF
*S** IF WFLOAPPD.WF-LA-PROC-REQ = ' '
*S** MOVE #LO-PROC-REQ TO WFLOAPPD.WF-LA-PROC-REQ
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-TYPE = ' '
*S** MOVE #LO-NOTE-TYPE TO WFLOAPPD.WF-LA-P-TYPE
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-MTYPE = ' '
*S** MOVE #LO-NOTE-MTYPE TO WFLOAPPD.WF-LA-P-MTYPE
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-DLV = ' '
*S** MOVE #LO-NOTE-DLV TO WFLOAPPD.WF-LA-P-DLV
*S** END-IF
*S** IF WFLOAPPD.WF-LA-R-DEF = ' '
*S** MOVE #LO-DEF TO WFLOAPPD.WF-LA-R-DEF
*S** END-IF
*S** IF WFLOAPPD.WF-LA-R-CAP = ' '
*S** MOVE #LO-CAP TO WFLOAPPD.WF-LA-R-CAP
*S** END-IF
*S** IF WFLOAPPD.WF-LA-R-EFT = ' '
*S** MOVE #LO-EFT TO WFLOAPPD.WF-LA-R-EFT
*S** END-IF
*S** MOVE #LO-DEFLT TO WFLOAPPD.WF-LA-S-DEFAULT
*S** MOVE #LO-CIT TO WFLOAPPD.WF-LA-S-CIT
*S** MOVE #LO-ENR TO WFLOAPPD.WF-LA-S-TIM
*S** MOVE #LO-GRAD-DATE TO WFLOAPPD.WF-LA-S-GRAD-DATE
*S** MOVE #LO-DEP TO WFLOAPPD.WF-LA-S-DEP
*S** MOVE #LO-BGT TO WFLOAPPD.WF-LA-S-BUDGET
*S** MOVE #LO-EFC TO WFLOAPPD.WF-LA-S-EFC
*S** MOVE #LO-AID TO WFLOAPPD.WF-LA-S-AID
*S** IF WFLOAPPD.WF-LA-R-TYPE NE 'P' OR
*S** WFLOAPPD.WF-LA-FUND1 = ' ' OR
*S** (SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) = 'G' AND
*S** SUBSTRING(#LO-YR-COL,1,1) = 'G') OR
*S** (SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G' AND
*S** SUBSTRING(#LO-YR-COL,1,1) NE 'G')
*S** MOVE #LO-YR-COL TO WFLOAPPD.WF-LA-S-CLASS
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get loan disbursements associated with this loan
*S** ASSIGN ##PASS-ACTION = 'R'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** END-IF
*S** /*
*S** IF WWAOBJ.#FUNCTION = 'UPDATE'
*S** /*
*S** /* Update loan disbursements as necessary
*S** ASSIGN ##PASS-ACTION = 'U'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** /*
*S** /* Update awards to reflect loan activity
*S** IF WFLOAPPD.WF-LA-AMT1 NE 0 OR #ORIG-AMT1 NE 0
*S** IF #AWARD-ERROR OR #DISB-CHG OR
*S** WFLOAPPD.WF-LA-START-END NE #ORIG-START-END OR
*S** WFLOAPPD.WF-LA-AMT1 NE #ORIG-AMT1 OR
*S** (WFLOAPPD.WF-LA-C-ACT NE #ORIG-C-ACT AND
*S** WFLOAPPD.WF-LA-C-ACT = 'X')
*S** ASSIGN ##PASS-TEMP = WFLOAPPD.WF-LA-TYPE
*S** IF WW-LO-APP = 'S'
*S** COMPRESS ##PASS-TEMP WFLOAPPD.WF-LA-R-TYPE
*S** INTO ##PASS-TEMP LEAVING NO
*S** END-IF
*S** RESET #AWARD-ERROR
*S** RESET ##RETURN-CODE
*S** CALLNAT 'WFLNAWDN' WW-GDA WFLOAPPD WFLOAPPD-ID WFLODSBL
*S** #ORIG-START-END
*S** #ORIG-AMT1 #ORIG-AMT2 #ORIG-AMT3
*S** #ORIG-D-SPLIT #DISB-CHG
*S** IF ##RETURN-CODE = 'A' OR = 'E'
*S** ASSIGN #AWARD-ERROR = TRUE
*S** COMPRESS 'Award error:' ##MSG INTO ##MSG
*S** REINPUT FULL WITH TEXT ##MSG
*S** END-IF
*S** ASSIGN ##PASS-TEMP = WFLOAPPD.WF-LA-TYPE
*S** IF WW-LO-APP = 'S'
*S** COMPRESS ##PASS-TEMP WFLOAPPD.WF-LA-R-TYPE
*S** INTO ##PASS-TEMP LEAVING NO
*S** END-IF
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) = 'G'
*S** COMPRESS ##PASS-TEMP 'G' INTO ##PASS-TEMP LEAVING NO
*S** END-IF
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE = INIT-DATE
*S** ASSIGN ##PASS-KEY = WFLOAPPD.WF-LA-START-END
*S** CALLNAT 'WFAWDLNN' WW-GDA
*S** END-IF
*S** /* \
*S** /* Set Acadmic Year dates for Direct Loans
*S** CALLNAT 'WFAWDLDN' WW-GDA
*S** IF ##PASS-KEY = 'LOAN-DATES-LOCKED'
*S** ASSIGN #DATES-LOCKED = TRUE
*S** ASSIGN #DATES-LOCKED-LOAN = ##MSG-DATA(1)
*S** RESET ##PASS-KEY
*S** ##MSG-DATA(1)
*S** END-IF
*S** /*
*S** /* Re-read loan information (may have been updated in WFAWDLNN)
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-IO
*S** IF WWAOBJ.#EXISTS
*S** ASSIGN ##PASS-ACTION = 'R'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** ELSE
*S** CALLNAT 'WWDUTILN' WW-GDA WWVALLDA
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S** ASSIGN ##PASS-TEMP = 'N'
*S** PERFORM PURGE-ECAR
*S** END TRANSACTION
*S** ASSIGN ##MSG = 'Loan deleted'
*S** ASSIGN #RECORD-DELETED = TRUE
*S** ESCAPE ROUTINE
*S** END-IF
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** END-IF
*S** END-IF
*S** /*
*S** /* If Certification action has changed, datestamp and
*S** /* call certification routine if appropriate
*S** IF #HOLD-A-ACT NE #ORIG-A-ACT
*S** MOVE #HOLD-A-ACT TO WFLOAPPD.WF-LA-A-ACT
*S** IF #HOLD-A-ACT = ' '
*S** RESET WFLOAPPD.WF-LA-A-ACT-RSN
*S** WFLOAPPD.WF-LA-A-ACT-DATE
*S** WFLOAPPD.WF-LA-A-AMT1
*S** ELSE
*S** ASSIGN WFLOAPPD.WF-LA-A-ACT-DATE = *DATX
*S** IF #ORIG-A-ACT = ' '
*S** MOVE *DATX TO #CERT-DATE
*S** PERFORM LOAN-CERTIFICATION WFLOAPPD WFLOAPPD-ID WFLOAPPR
*S** #CERT-DATE
*S** END-IF
*S** END-IF
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** PERFORM CALL-OBJECT-IO
*S** END-IF
*S** END-IF
*S** /*
*S** /* On each I/O, capture "original" values to use in later comparison
*S** MOVE WFLOAPPD.WW-PARENT-ID TO #ORIG-PARENT
*S** MOVE WFLOAPPD.WF-LA-START-END TO #ORIG-START-END
*S** MOVE WFLOAPPD.WF-LA-PCT-FEE TO #ORIG-PCT-FEE
*S** MOVE WFLOAPPD.WF-LA-PCT-REB TO #ORIG-PCT-REB
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #ORIG-AMT1
*S** MOVE WFLOAPPD.WF-LA-A-SNT-DATE TO #ORIG-A-SNT-DATE
*S** MOVE WFLOAPPD.WF-LA-A-ACT TO #ORIG-A-ACT
*S** MOVE WFLOAPPD.WF-LA-C-ACT TO #ORIG-C-ACT
*S** MOVE WFLOAPPD.WF-LA-P-ACT TO #ORIG-P-ACT
*S** MOVE WFLODSBL.WF-LD-ACT(*) TO #ORIG-D-ACT(*)
*S** MOVE WFLODSBL.WF-LD-DP(*) TO #ORIG-D-DP(*)
*S** MOVE WFLODSBL.WF-LD-AMT1(*) TO #ORIG-D-AMT1(*)
*S** /*
*S** /* Set up ##PASS-KEY for use in WWDUTILN
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S****SAG END-EXIT
*S** /*
*S** IF WWAOBJ.#FUNCTION = 'GET' AND
*S** NOT WWAOBJ.#EXISTS
*S** ASSIGN #ADD-OBJECT = TRUE
*S** END-IF
*S** /*
*S** ASSIGN #DISPLAYED-KEY = WFLOAPPD-ID
*S** /*
*S** /* Reset #KEY if next record displayed
*S** IF #FUNCTION = 'NEXT'
*S** ASSIGN #KEY = #DISPLAYED-KEY
*S** END-IF
*S** /*
*S** /* Set logical for update processing
*S** IF #FUNCTION = 'STORE'
*S** OR = 'UPDATE'
*S** ASSIGN #UPDATE-PERFORMED = TRUE
*S** END-IF
*S** /*
*S** /* Update performed
*S** IF #UPDATE-PERFORMED THEN
*S** CALLNAT 'WWDUTILN' WW-GDA WWVALLDA
*S** PERFORM ADD-EVENT #EVENT-TYPE #EVENT-DESC
*S****SAG DEFINE EXIT BEFORE-END-TRANSACTION
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S** PERFORM CHECK-LOAN-CHANGES WFLOAPPD WFLOAPPD-ID WFLOAPPR WFLODSBL
*S****SAG END-EXIT
*S** END TRANSACTION
*S** RESET #UPDATE-PERFORMED #ACTION #ADD-OBJECT #DATA-MODIFIED
*S** END-IF
*S**END-SUBROUTINE /* CALL-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-IO
*S*************************************************************************
*S***
*S** CALLNAT 'WFLOAPPO' WW-GDA
*S** WFLOAPPD
*S** WFLOAPPD-ID
*S** WFLOAPPR
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-IO
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE FINAL-PROCESSING
*S*************************************************************************
*S** /*
*S** INCLUDE WWEND /* Restore environment.
*S**END-SUBROUTINE /* FINAL-PROCESSING
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE INITIALIZATIONS
*S*************************************************************************
*S** /*
*S** INCLUDE WWBEGIN /* Capture environment
*S** SET CONTROL 'WBM' /* Set window size/base
*S** /*
*S** /* Specify which PF-KEYS are valid, start by resetting all keys,
*S** /* then assign desired keys using RESET INITIAL.
*S** INCLUDE WWPFSTD /* Standard PF-Keys.
*S****SAG DEFINE EXIT SET-PF-KEYS
*S** RESET WWKEYLDA.#SELECT-KEY /* Not available at detail
*S** RESET INITIAL WWKEYLDA.#NOTEPAD-KEY
*S** WWKEYLDA.#EXPAND-KEY
*S** WWKEYLDA.#PRINT-KEY
*S****SAG END-EXIT
*S**END-SUBROUTINE /* INITIALIZATIONS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE SET-KEYS
*S*************************************************************************
*S***
*S** INCLUDE WWSETKEY /* Set specified keys
*S** INCLUDE WWSETHLP /* Set Help keys
*S**END-SUBROUTINE /* SET-KEY
*S****SAG DEFINE EXIT MISCELLANEOUS-SUBROUTINES
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-EXT-SUB-LOANDSB
*S*************************************************************************
*S** /*
*S** /* Call Map specific external subroutine
*S** PERFORM WFLNEDTM-MASK-EDITS-LOANDSB #SUB-PARM WWVALLDA
*S** WFLODSBL #WF-LOAN-DISBURSEMENT
*S**END-SUBROUTINE /* CALL-EXT-SUB-LOANDSB
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-LOANTYPE
*S*************************************************************************
*S** /*
*S** MOVE WWAOBJ.#FUNCTION TO #HOLD-FUNCTION
*S** MOVE 'GET' TO WWAOBJ.#FUNCTION
*S** /*
*S** /* Call WW-LOANTYPE Object subprogram
*S** CALLNAT 'WWLNTYPO' WW-GDA
*S** WWLNTYPD
*S** WWLNTYPD-ID
*S** WWLNTYPR
*S** WWAOBJ
*S** /*
*S** MOVE #HOLD-FUNCTION TO WWAOBJ.#FUNCTION
*S**END-SUBROUTINE /* CALL-OBJECT-LOANTYPE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-SERVICE-LOANDSB
*S*************************************************************************
*S** /*
*S** /* Call standard routine to get or update WF-LOANDSB records
*S** ASSIGN ##PASS-KEY = WFLOAPPD-ID
*S** PERFORM LOANDSB-SERVICE WFLODSBL
*S** RESET ##MSG
*S**END-SUBROUTINE /* CALL-SERVICE-LOANDSB
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE PRINT-ROUTINE
*S*************************************************************************
*S** /*
*S** /* Perform Prom note print routine
*S** RESET ##PASS-TEMP
*S** ASSIGN ##PASS-KEY = WFLOAPPD.WF-LOAN-ID
*S** IF *DEVICE EQ 'PC' OR EQ 'VIDEO' OR EQ 'COLOR'
*S** FETCH RETURN 'WFDPMNTP'
*S** RESET #DISPLAYED-KEY
*S** ELSE
*S** REINPUT
*S** 'FINANCIER not set up to allow on-line printing'
*S** END-IF
*S** IF ##PASS-TEMP NE SPACE
*S** MOVE ##PASS-TEMP TO ##MSG
*S** RESET ##PASS-TEMP
*S** END-IF
*S** RESET ##PASS-KEY
*S**END-SUBROUTINE /* PRINT-ROUTINE
*S****SAG END-EXIT
*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
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
|
*S****SAG GENERATOR: WW-OBJECT-MAINT-DIALOG Version: 3.2.2
*S****SAG TITLE: Loan Dialog Program
*S****SAG SYSTEM: FINANCIER
*S****SAG GDA: WWGDA
*S****SAG DESCS(1): This program maintains the WF-LOANAPP
*S****SAG DESCS(2): and WF-LOANDSB files.
*S****SAG HEADER1: FINANCIER
*S****SAG DIRECT-COMMAND-PROCESS:
*S****SAG ACTIONS: 0101010100000000
*S****SAG OBJECT-NAME: WFLOAPPO
*S****SAG MAX-WINDOWS: 1
*S****SAG MAP-NAME(1): WFLNEDTM
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Program : WFLNEDTP
*S*** System : FINANCIER
*S*** Title : Loan Dialog Program
*S*** Generated: Jan 23,04 at 01:55 PM
*S*** Function : This program maintains the WF-LOANAPP
*S*** and WF-LOANDSB files.
*S***
*S***
*S***
*S*** Copyright 1995 - 2006 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S***
*S** LOCAL USING WFLOAPPD /* Passed to object subprogram
*S** LOCAL USING WFLOAPPR /* Passed to object subprogram
*S** LOCAL USING WFLOAPPS /* Shadow file
*S** LOCAL USING WWAOBJ /* Used by object subprograms
*S***
*S** LOCAL USING WWCONST /* Constants
*S** LOCAL USING WWDIALDA /* Common data for dialog objects.
*S** LOCAL USING WWENVIRA /* Used to capture/restore previous environment.
*S** LOCAL USING WWKEYLDA /* Used to set function keys and names.
*S** LOCAL USING WWVALLDA /* Used by valid values/edit mask routine
*S** LOCAL
*S****SAG DEFINE EXIT SECURITY-PGM
*S** /*
*S** /* Security program exit
*S** 01 #SECURITY-PROGRAM(A8) INIT<'WFLNSUMP'>
*S****SAG END-EXIT
*S****SAG DEFINE EXIT EVENT-HISTORY
*S** /*
*S** /* Variables utilized by Event History routine
*S** 01 #EVENT-TYPE(A5) CONST<' '>
*S** 01 #EVENT-DESC(A40) CONST<' '>
*S****SAG END-EXIT
*S****SAG DEFINE EXIT REQUIREMENTS
*S** /*
*S** /* Variables Requirement routine
*S** 01 #REQMNTS(3)
*S** 02 #REQMNT-TYPE(A1) /* (A/Application, D/Disbursement)
*S** INIT (1)<' '> (2)<' '> (3)<' '>
*S** 02 #REQMNT-DOC(A6) /* Document mnemonic
*S** INIT (1)<' '> (2)<' '> (3)<' '>
*S** 02 #REQMNT-PD(A2) /* (ST/Student, AY/Aid Year)
*S** INIT (1)<' '> (2)<' '> (3)<' '>
*S****SAG END-EXIT
*S***
*S*** Scalar Constants.
*S** 01 #SUB-PARM(A1)
*S***
*S*** Miscellaneous Variables.
*S** 01 #NEXT(L) /* Next processing selected
*S** 01 #DISPLAYED-KEY(A17) /* Last record found
*S** 01 #TYPE-POS(P3)
*S** 01 #KEY(A17) /* Key field copied from map.
*S** 01 #NEW-OBJECT(L) /* GET was done on different object
*S** 01 #BYPASS-OBJECT(L) /* I/O was done via subprogram
*S** 01 #BYPASS-INPUT(L) /* do not perform input statement
*S** 01 #NULL-KEY(A17)
*S****SAG DEFINE EXIT LOCAL-DATA
*S** 01 #DATES-LOCKED(L)
*S** 01 #DATES-LOCKED-LOAN(A25)
*S***
*S** 01 #FIRST-TIME(L) INIT<TRUE>
*S** 01 #RECORD-DELETED(L)
*S** 01 #TITLE(A40)
*S** 01 #PASS-KEY(A30)
*S** 01 #PASS-TEMP(A30)
*S** 01 #SUBPGM(A8)
*S** 01 #SUB(P3)
*S** 01 #DSUB(P3)
*S** 01 #ASUB1(P3)
*S** 01 #ASUB2(P3)
*S** 01 #ASUB3(P3)
*S** 01 #ORIG-PARENT(A9)
*S** 01 #ORIG-START-END(A1)
*S** 01 #ORIG-AMT1(P5.2)
*S** 01 #ORIG-PCT-FEE(P3.3)
*S** 01 #ORIG-PCT-REB(P3.3)
*S** 01 #ORIG-AMT2(P5.2)
*S** 01 #ORIG-AMT3(P5.2)
*S** 01 #ORIG-A-SNT-DATE(D)
*S** 01 #ORIG-A-ACT(A1)
*S** 01 #ORIG-C-ACT(A1)
*S** 01 #ORIG-P-ACT(A1)
*S** 01 #ORIG-D-ACT(A1/12)
*S** 01 #ORIG-D-SPLIT
*S** 02 #ORIG-D-DP(A1/12)
*S** 02 #ORIG-D-AMT1(P5.2/12)
*S** 02 #ORIG-D-AMT2(P5.2/12)
*S** 02 #ORIG-D-AMT3(P5.2/12)
*S** 01 #DISB-CHG(L)
*S** 01 #AWARD-ERROR(L)
*S***
*S** 01 #CERT-DATE(D)
*S** 01 #HOLD-A-ACT(A1)
*S** 01 #TOT-D1(P5.2)
*S***
*S** 01 #HOLD-EC-TYPE(A3)
*S** 01 #HOLD-LOAN(N2)
*S** 01 REDEFINE #HOLD-LOAN
*S** 02 #HOLD-LOAN-A(A2)
*S***
*S*** Map variables
*S** 01 #TAB-SNAP(A1)
*S** 01 #TAB-CORR(A1)
*S** 01 #LABEL-PARENT(A7)
*S** 01 #LABEL-PARENT-CV(C)
*S***
*S** 01 #WF-LOAN-DISBURSEMENT
*S** 02 #WF-LD-ARRAY(12)
*S** 03 #WF-LD-ACT(A1)
*S** 03 #WF-LD-ACT-RSN(A2)
*S** 03 #WF-LD-ACT-DATE(A10)
*S** 03 #WF-LD-AMT1(A9)
*S** 03 #WF-LD-DP(A1)
*S** 03 #WF-LD-DATE(A10)
*S** 03 #WF-LD-ACK(A1)
*S** 03 #WF-LD-ACK-DATE(A10)
*S** 03 #WF-LD-ENR(A1)
*S** /*
*S** 03 #WF-LD-ACT-F(L)
*S** 03 #WF-LD-ACT-RSN-F(L)
*S** 03 #WF-LD-AMT1-F(L)
*S** 03 #WF-LD-DP-F(L)
*S** 03 #WF-LD-DATE-F(L)
*S** 03 #WF-LD-ACK-F(L)
*S** 03 #WF-LD-ACK-DATE-F(L)
*S** 03 #WF-LD-ENR-F(L)
*S** /*
*S** 03 #WF-LD-ACT-CV(C)
*S** 03 #WF-LD-ACT-RSN-CV(C)
*S** 03 #WF-LD-AMT1-CV(C)
*S** 03 #WF-LD-DP-CV(C)
*S** 03 #WF-LD-DATE-CV(C)
*S** 03 #WF-LD-ACK-CV(C)
*S** 03 #WF-LD-ACK-DATE-CV(C)
*S** 03 #WF-LD-ENR-CV(C)
*S***
*S** 01 #TABLE-VALUE
*S** 02 #TABLE-FAO(A2)
*S** 02 #TABLE-TYPE(A1)
*S** 02 #TABLE-SUBTYPE(A1)
*S** 02 #TABLE-FILL(A6)
*S** 01 REDEFINE #TABLE-VALUE
*S** 02 #TABLE-VALUE-RED(A10)
*S** 01 #HOLD-TYPE-SUBTYPE(A2)
*S** 01 #HOLD-FUNCTION(A15)
*S** 01 #LNTYPE-REC-NF(L)
*S***
*S*** Loan processing data areas
*S** LOCAL USING WWLNTYPD /* Passed to object subprogram
*S** LOCAL USING WWLNTYPR /* Passed to object subprogram
*S** LOCAL USING WFLOANPD
*S** LOCAL USING WFLODSBL
*S** LOCAL USING WFLODSBV
*S****SAG END-EXIT
*S**END-DEFINE
*S***
*S***
*S*** Define Formats
*S**FORMAT PS=23 KD=ON LS=133 ZP=OFF
*S***
*S**PERFORM INITIALIZATIONS
*S***
*S*************************************************************************
*S***
*S**PROG.
*S**REPEAT /* until exit action
*S** /*
*S**NEW-SCREEN.
*S** REPEAT /* Escape this repeat with indexes set as desired.
*S** /*
*S** /* Security / Required fields
*S** /* Perform first time and/or new student (set via Selection)
*S** IF #DISPLAYED-KEY = #NULL-KEY
*S** MOVE 'WFLOAPPD' TO ##FILE-ID
*S** MOVE #SECURITY-PROGRAM TO ##PGM-ID
*S** PERFORM LOANAPP-SECURITY LOANAPP-CNTL-VARS
*S** RESET INITIAL LOANAPP-LOGICALS
*S****SAG DEFINE EXIT AFTER-SECURITY
*S** MOVE 'WFLODSBD' TO ##FILE-ID
*S** PERFORM LOANDSB-SECURITY LOANDSB-CNTL-VARS
*S** MOVE LD-DP-CV TO #WF-LD-ACT-CV(*)
*S** #WF-LD-ACT-RSN-CV(*)
*S** #WF-LD-AMT1-CV(*)
*S** #WF-LD-DP-CV(*)
*S** #WF-LD-DATE-CV(*)
*S** #WF-LD-ACK-CV(*)
*S** #WF-LD-ACK-DATE-CV(*)
*S** #WF-LD-ENR-CV(*)
*S****SAG END-EXIT
*S** /*
*S** PERFORM REQUIRED-FIELD-CHECK REQUIRED-FIELD(*)
*S** PERFORM SET-KEYS
*S** END-IF
*S** /*
*S** /* Load appropriate function
*S** IF #ADD-OBJECT
*S** ASSIGN #FUNCTION = 'STORE'
*S** RESET #ADD-OBJECT
*S** ELSE
*S** IF #DISPLAYED-KEY NE #KEY
*S** OR #KEY = #NULL-KEY
*S** ASSIGN #FUNCTION = 'GET'
*S** ELSE
*S** ASSIGN #FUNCTION = 'UPDATE'
*S** END-IF
*S** END-IF
*S****SAG DEFINE EXIT BEFORE-CALL-OBJECT
*S** /*
*S** /* Supply key info from GDA
*S** IF #FIRST-TIME
*S** RESET #FIRST-TIME
*S** ASSIGN WFLOAPPD-ID = ##PASS-KEY
*S** RESET ##PASS-KEY ##PASS-ACTION
*S** MOVE BY NAME WFLOAPPD-ID.STRUCTURE TO WFLOAPPD
*S** MOVE WFLOAPPD.WF-LOAN-ID TO #HOLD-LOAN
*S** COMPRESS 'P' #HOLD-LOAN-A INTO #HOLD-EC-TYPE LEAVING NO
*S** END-IF
*S** /*
*S****SAG END-EXIT
*S** /*
*S** /* Perform object I/O subprogram
*S** IF #BYPASS-OBJECT
*S** RESET #BYPASS-OBJECT
*S** ELSE
*S** PERFORM CALL-OBJECT
*S** END-IF
*S****SAG DEFINE EXIT AFTER-CALL-OBJECT
*S** IF #RECORD-DELETED OR
*S** #LNTYPE-REC-NF
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S** END-IF
*S** IF #DATES-LOCKED
*S** COMPRESS 'Academic Year dates not set, lock flag set on loan:'
*S** #DATES-LOCKED-LOAN INTO ##MSG
*S** RESET #DATES-LOCKED
*S** #DATES-LOCKED-LOAN
*S** END-IF
*S****SAG END-EXIT
*S** /*
*S** /* Load shadow file definitions for appropriate map
*S** IF NOT #CONFIRM-PURGE
*S** MOVE LOAD TO #SUB-PARM
*S** PERFORM CALL-EXT-SUB
*S****SAG DEFINE EXIT AFTER-CALL-LOAD
*S** PERFORM CALL-EXT-SUB-LOANDSB
*S****SAG END-EXIT
*S** END-IF
*S** /*
*S** /* Assign appropriate message
*S** IF ##MSG = SPACE
*S** DECIDE ON FIRST VALUE OF #FUNCTION
*S** VALUE 'GET'
*S** IF #ADD-OBJECT
*S** COMPRESS 'This information not currently stored for #TEMP,'
*S** 'ready to add' INTO ##MSG
*S** ELSE
*S** COMPRESS 'To modify the current #TEMP information,'
*S** 'make changes and press ENTER' INTO ##MSG
*S** END-IF
*S** VALUE 'NEXT'
*S** COMPRESS 'Next #TEMP information has been displayed'
*S** INTO ##MSG
*S** VALUE 'UPDATE'
*S** COMPRESS '#TEMP information has been modified'
*S** INTO ##MSG
*S** VALUE 'STORE'
*S** COMPRESS '#TEMP information has been added'
*S** INTO ##MSG
*S** VALUE 'DELETE'
*S** IF #CONFIRM-PURGE
*S** COMPRESS '#TEMP information has been purged'
*S** INTO ##MSG
*S** ELSE
*S** COMPRESS 'Press ENTER to confirm purge'
*S** INTO ##MSG
*S** END-IF
*S** ANY
*S** EXAMINE ##MSG FOR '#TEMP' AND REPLACE WITH ##SYSTEM-DATA-TYPE
*S** EXAMINE ##MSG FOR ##SYSTEM-DATA-TYPE GIVING POSITION #TYPE-POS
*S** IF #TYPE-POS = 1
*S** EXAMINE SUBSTRING(##MSG,1,1) AND TRANSLATE INTO UPPER CASE
*S** END-IF
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** END-IF
*S** SET CONTROL 'WB'
*S****SAG DEFINE EXIT DEFINE-WINDOW
*S** /*
*S** /* Define Window attributes
*S** DEFINE WINDOW LOANDET
*S** SIZE 18*79
*S** BASE 4 / 1
*S** TITLE #TITLE
*S** CONTROL SCREEN
*S** FRAMED ON (CD=NE)
*S** POSITION OFF
*S** IF WW-LO-APP = 'C' OR = 'N'
*S** MOVE 'WFLOAPPD.WF-LA-TYPE' TO #PASS-KEY
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #PASS-TEMP
*S** ELSE
*S** MOVE 'WFLOAPPD.WF-LA-R-TYPE' TO #PASS-KEY
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #PASS-TEMP
*S** END-IF
*S** PERFORM GET-VALUE-TRANSLATION #PASS-KEY #PASS-TEMP
*S** COMPRESS #PASS-TEMP '-' WFLOAPPD.WF-LA-ID INTO #TITLE
*S** WITH DELIMITER SPACE
*S** SET WINDOW 'LOANDET'
*S** ASSIGN ##COLOR = 'NE'
*S****SAG END-EXIT
*S** /*
*S** /* INPUT processing
*S****SAG DEFINE EXIT BEFORE-INPUT
*S** /*
*S** /* Protect fields depending on app type and transmit status
*S** IF WW-LO-APP = 'S' OR = 'N'
*S** MOVE PROTECTED-ATTR TO LA-R-TYPE-CV
*S** END-IF
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G'
*S** MOVE PROTECTED-YE-ATTR TO #LABEL-PARENT-CV
*S** MOVE 'Parent:' TO #LABEL-PARENT
*S** ELSE
*S** MOVE NON-DISPLAY-PROT-ATTR TO #LABEL-PARENT-CV PARENT-ID-CV
*S** END-IF
*S** /*
*S** /* Protect Academic year and/or Loan Period
*S** /* dates if lock flag is set
*S** DECIDE ON FIRST VALUE OF WFLOAPPD.WF-LA-DATES-LOCK
*S** VALUE 'A'
*S** MOVE PROTECTED-ATTR TO LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** MOVE NORMAL-ATTR TO LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** VALUE 'L'
*S** MOVE PROTECTED-ATTR TO LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** MOVE NORMAL-ATTR TO LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** VALUE 'B'
*S** MOVE PROTECTED-ATTR TO LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** NONE
*S** MOVE NORMAL-ATTR TO LA-ACD-START-DATE-CV
*S** LA-ACD-END-DATE-CV
*S** LA-START-DATE-CV
*S** LA-END-DATE-CV
*S** END-DECIDE
*S** /*
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF WFLODSBL.WF-LD-SNT-DATE(WF-LD-SUB) NE INIT-DATE AND
*S** (WFLODSBL.WF-LD-ACK(WF-LD-SUB) NE 'S' OR
*S** WFLODSBL.WF-LD-ACT(WF-LD-SUB) = 'I')
*S** MOVE PROTECTED-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** #WF-LD-DATE-CV(WF-LD-SUB)
*S** ELSE
*S** MOVE NORMAL-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** #WF-LD-DATE-CV(WF-LD-SUB)
*S** END-IF
*S** END-FOR
*S****SAG END-EXIT
*S** /*
*S** /* Input Map
*S** IF NOT #BYPASS-INPUT
*S** INPUT WITH TEXT ##MSG,
*S** ##MSG-DATA(1),##MSG-DATA(2),##MSG-DATA(3)
*S** USING MAP 'WFLNEDTM'
*S** END-IF
*S** /*
*S** RESET ##MSG
*S****SAG DEFINE EXIT AFTER-INPUT
*S** /*
*S** /* If Expand key, present appropriate window
*S** IF *PF-KEY = WWKEYLDA.#EXPAND-KEY
*S** RESET INITIAL #FAIL-EDIT
*S** MOVE EDIT TO #SUB-PARM
*S** PERFORM CALL-EXT-SUB
*S** PERFORM CALL-EXT-SUB-LOANDSB
*S** IF *CURS-FIELD = POS(WFLOAPPD.WW-PARENT-ID)
*S** IF WFLOAPPD.WW-PARENT-ID = ' '
*S** ASSIGN PARENT-ID-F = TRUE
*S** MOVE HI-LITE-ATTR TO PARENT-ID-CV
*S** REINPUT FULL 'Parent ID required'
*S** MARK *WFLOAPPD.WW-PARENT-ID ALARM
*S** END-IF
*S** MOVE EXT-PARENT-TYPE TO ##EXTERNAL-TYPE
*S** MOVE WFLOAPPD.WW-PARENT-ID TO ##EXTERNAL-ID
*S** FETCH RETURN 'WWEXTPAP'
*S** ELSE
*S** RESET #SUBPGM
*S** IF *CURS-FIELD = POS(#TAB-SNAP)
*S** MOVE 'WFLNSNPN' TO #SUBPGM
*S** ELSE
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF *CURS-FIELD = POS(#WF-LD-ACT(WF-LD-SUB))
*S** MOVE 'WFLNDSBN' TO #SUBPGM
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-FOR
*S** END-IF
*S** IF #SUBPGM NE ' '
*S** CALLNAT #SUBPGM WW-GDA WFLOAPPD-ID #ADD-OBJECT
*S** WFLOAPPD WFLOAPPD-ID WFLOAPPR WFLOAPPS
*S** WWAOBJ
*S** /*
*S** /* If expanded to Snapshot window, re-check to
*S** /* protect Parent ID in case class level updated
*S** IF #SUBPGM = 'WFLNSNPN'
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G'
*S** MOVE PROTECTED-YE-ATTR TO #LABEL-PARENT-CV
*S** MOVE 'Parent:' TO #LABEL-PARENT
*S** ELSE
*S** MOVE NON-DISPLAY-PROT-ATTR TO #LABEL-PARENT-CV
*S** PARENT-ID-CV
*S** END-IF
*S** END-IF
*S** /*
*S** /* If expanded to Loan Disbursement window, re-retrieve
*S** /* loan disbursement info in case updates occurred
*S** IF #SUBPGM = 'WFLNDSBN'
*S** ASSIGN ##PASS-ACTION = 'R'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** END-IF
*S** ELSE
*S** IF *CURS-FIELD = POS(#TAB-CORR)
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S** FETCH RETURN 'WFLNCORP'
*S** ELSE
*S** REINPUT 'Not an expandable field' ALARM
*S** END-IF
*S** END-IF
*S** END-IF
*S** ASSIGN #BYPASS-OBJECT = TRUE
*S** COMPRESS 'Complete changes and press ENTER' INTO ##MSG
*S** ESCAPE TOP
*S** END-IF
*S****SAG END-EXIT
*S** /*
*S** /*
*S** /* Check standard PF-Keys
*S** INCLUDE WWSTDKEY
*S** /*
*S** /* Trap invalid PF-Keys.
*S** IF *PF-KEY = 'ENTR' OR = WWKEYLDA.#SELECT-KEY
*S****SAG DEFINE EXIT VALID-PFKEYS
*S** OR = WWKEYLDA.#EXPAND-KEY
*S** OR = WWKEYLDA.#PRINT-KEY
*S****SAG END-EXIT
*S** IGNORE
*S** ELSE
*S** REINPUT 'Invalid program function key' ALARM
*S** END-IF
*S** /*
*S** /* Perform edit routine
*S** RESET INITIAL #FAIL-EDIT
*S** MOVE EDIT TO #SUB-PARM
*S** PERFORM CALL-EXT-SUB
*S****SAG DEFINE EXIT CALL-EDIT
*S** PERFORM CALL-EXT-SUB-LOANDSB
*S****SAG END-EXIT
*S** IF #FAIL-EDIT
*S** REINPUT FULL 'Edit errors occurred'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S****SAG DEFINE EXIT AFTER-EDIT
*S** /*
*S** /* Processing to be performed immediately after the edit routine
*S** IF WFLODSBL.WF-LD-DP(*) = #ORIG-D-DP(*) AND
*S** WFLODSBL.WF-LD-AMT1(*) = #ORIG-D-AMT1(*)
*S** RESET #DISB-CHG
*S** ELSE
*S** ASSIGN #DISB-CHG = TRUE
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE INIT-DATE
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) = ' ' AND
*S** #ORIG-D-DP(WF-LD-SUB) NE ' '
*S** ASSIGN #WF-LD-DP-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement point required'
*S** MARK *#WF-LD-DP(WF-LD-SUB) ALARM
*S** ELSE
*S** IF (WFLODSBL.WF-LD-AMT1(WF-LD-SUB) NE
*S** #ORIG-D-AMT1(WF-LD-SUB)) AND
*S** WFLODSBL.WF-LD-AMT1(WF-LD-SUB) = 0
*S** ASSIGN WFLODSBL.WF-LD-DP(WF-LD-SUB) = 'X'
*S** IF WFLODSBL.WF-LD-SNT-DATE(WF-LD-SUB) = INIT-DATE
*S** RESET WFLODSBL.WF-LD-DATE(WF-LD-SUB)
*S** END-IF
*S** END-IF
*S** END-IF
*S** END-IF
*S** IF WFLODSBL.WF-LD-AMT1(WF-LD-SUB) > 0
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) = ' '
*S** ASSIGN #WF-LD-DP-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement point required'
*S** MARK *#WF-LD-DP(WF-LD-SUB) ALARM
*S** ELSE
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) = 'X'
*S** ASSIGN #WF-LD-DP-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DP-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement point can not be X'
*S** MARK *#WF-LD-DP(WF-LD-SUB) ALARM
*S** END-IF
*S** END-IF
*S** END-IF
*S** END-FOR
*S** END-IF
*S** IF WFLOAPPD.WF-LA-START-END = ' ' AND
*S** WFLOAPPD.WF-LA-A-SNT-DATE = INIT-DATE AND
*S** (WFLOAPPD.WF-LA-AMT1 NE #ORIG-AMT1 AND
*S** NOT #DISB-CHG)
*S** ASSIGN LA-START-END-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-START-END-CV
*S** REINPUT FULL 'Loan period needed for award processing'
*S** MARK *WFLOAPPD.WF-LA-START-END ALARM
*S** END-IF
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE INIT-DATE
*S** IF WFLOAPPD.WF-LA-C-ACT = 'X'
*S** ASSIGN LA-C-ACT-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-C-ACT-CV
*S** REINPUT FULL 'Loan may not be cancelled'
*S** MARK *WFLOAPPD.WF-LA-C-ACT ALARM
*S** END-IF
*S** FOR WF-LD-SUB = 1 TO 12
*S** IF WFLODSBL.WF-LD-ACT(WF-LD-SUB) = 'X'
*S** ASSIGN #WF-LD-ACT-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-ACT-CV(WF-LD-SUB)
*S** REINPUT FULL 'Disbursement may not be cancelled'
*S** MARK *#WF-LD-ACT(WF-LD-SUB) ALARM
*S** END-IF
*S** IF WFLODSBL.WF-LD-DP(WF-LD-SUB) NE ' ' AND
*S** WFLODSBL.WF-LD-DP(WF-LD-SUB) NE 'X' AND
*S** WFLODSBL.WF-LD-DATE(WF-LD-SUB) = INIT-DATE
*S** ASSIGN #WF-LD-DATE-F(WF-LD-SUB) = TRUE
*S** MOVE HI-LITE-ATTR TO #WF-LD-DATE-CV(WF-LD-SUB)
*S** REINPUT FULL 'Loan disbursement date required'
*S** MARK *#WF-LD-DATE(WF-LD-SUB) ALARM
*S** END-IF
*S** END-FOR
*S** /*
*S** RESET #TOT-D1
*S** FOR WF-LD-SUB = 1 TO 12
*S** ADD WFLODSBL.WF-LD-AMT1(WF-LD-SUB) TO #TOT-D1
*S** END-FOR
*S** IF WFLOAPPD.WF-LA-AMT1 NE #TOT-D1
*S** ASSIGN LA-AMT1-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-AMT1-CV
*S** REINPUT FULL 'Eligibility not equal to disbursement total'
*S** MARK *WFLOAPPD.WF-LA-AMT1 ALARM
*S** END-IF
*S** IF #DISB-CHG = TRUE
*S** MOVE 'DATE' TO #LO-ACTION
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #LO-TYPE
*S** IF WW-LO-APP = 'S'
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #LO-SUBTYPE
*S** END-IF
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #LO-AMT1
*S** MOVE WFLODSBL.WF-LD-DP(*) TO #LO-D-DP(*)
*S** MOVE WFLODSBL.WF-LD-AMT1(*) TO #LO-D-AMT1(*)
*S** PERFORM GET-LOAN-DEFLT-INFO WFLOANPD
*S** MOVE #LO-START TO WFLOAPPD.WF-LA-START-DATE
*S** MOVE #LO-END TO WFLOAPPD.WF-LA-END-DATE
*S** MOVE #LO-START-END TO WFLOAPPD.WF-LA-START-END
*S** END-IF
*S** END-IF
*S** /*
*S** IF WFLOAPPD.WF-LA-PROC NE 'E' AND
*S** WFLOAPPD.WF-LA-PROC NE 'A' AND
*S** WFLOAPPD.WF-LA-PROC NE 'D' AND
*S** WFLOAPPD.WF-LA-PROC NE 'M' AND
*S** WFLOAPPD.WF-LA-PROC NE ' '
*S** ASSIGN LA-PROC-F = TRUE
*S** MOVE HI-LITE-ATTR TO LA-PROC-CV
*S** REINPUT FULL 'Direct PLUS processing must be E, A, D or M'
*S** MARK *WFLOAPPD.WF-LA-PROC ALARM
*S** END-IF
*S** /*
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G' AND
*S** WFLOAPPD.WW-PARENT-ID = SPACE
*S** ASSIGN PARENT-ID-F = TRUE
*S** MOVE HI-LITE-ATTR TO PARENT-ID-CV
*S** REINPUT FULL 'Parent ID must be entered'
*S** MARK *WFLOAPPD.WW-PARENT-ID ALARM
*S** END-IF
*S** /*
*S** /*
*S****SAG END-EXIT
*S** /*
*S*************************************************************************
*S**DEFINE SUBROUTINE NEW-SCREEN
*S*************************************************************************
*S** /*
*S** /* Subroutine to allow escape from screen loop
*S** ESCAPE BOTTOM(NEW-SCREEN.) IMMEDIATE
*S**END-SUBROUTINE /* NEW-SCREEN
*S** /*
*S** END-REPEAT /* on NEW-SCREEN
*S**END-REPEAT /* on Repeat of Program.
*S***
*S**PERFORM FINAL-PROCESSING
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-EXT-SUB
*S*************************************************************************
*S** /*
*S** /* Call Map specific external subroutine
*S** PERFORM WFLNEDTM-MASK-EDITS #SUB-PARM WWVALLDA
*S** WFLOAPPD WFLOAPPD-ID WFLOAPPR WFLOAPPS
*S**END-SUBROUTINE /* CALL-EXT-SUB
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT
*S*************************************************************************
*S** /*
*S** /* Prior to processing object
*S** IF WWAOBJ.#FUNCTION = 'DELETE'
*S** RESET #CONFIRM-PURGE
*S** END-IF
*S****SAG DEFINE EXIT BEFORE-OBJECT-CALL
*S** /*
*S** /* Additional processing before calling the main object subprogram
*S** IF WWAOBJ.#FUNCTION = 'UPDATE'
*S** /*
*S** /* Fill in necessary subtype and fund information
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO WFLOAPPD.WF-LA-SUBTYPE1
*S** IF WFLOAPPD.WF-LA-FUND1 = ' '
*S** MOVE WW-LO-FUND1 TO WFLOAPPD.WF-LA-FUND1
*S** /* Grad PLUS uses second loan defined for LoanType instead
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) = 'G'
*S** MOVE WW-LO-FUND2 TO WFLOAPPD.WF-LA-FUND1
*S** END-IF
*S** END-IF
*S** /*
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE INIT-DATE AND
*S** WFLOAPPD.WF-LA-START-END NE #ORIG-START-END AND
*S** WFLOAPPD.WF-LA-START-END NE ' '
*S** MOVE 'DATE' TO #LO-ACTION
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #LO-TYPE
*S** IF WW-LO-APP = 'S'
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #LO-SUBTYPE
*S** END-IF
*S** MOVE WFLOAPPD.WF-LA-START-END TO #LO-START-END
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #LO-AMT1
*S** PERFORM GET-LOAN-DEFLT-INFO WFLOANPD
*S** MOVE #LO-START TO WFLOAPPD.WF-LA-START-DATE
*S** MOVE #LO-END TO WFLOAPPD.WF-LA-END-DATE
*S** END-IF
*S** /*
*S** /* If any action has changed, datestamp it (but hold
*S** /* application action changes to perform after award update)
*S** MOVE WFLOAPPD.WF-LA-A-ACT TO #HOLD-A-ACT
*S** /*
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE NE #ORIG-A-SNT-DATE
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE = INIT-DATE
*S** RESET WFLOAPPD.WF-LA-A-SNT-AMT1
*S** END-IF
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-ACT NE #ORIG-P-ACT
*S** IF WFLOAPPD.WF-LA-P-ACT = ' '
*S** RESET WFLOAPPD.WF-LA-P-ACT-RSN
*S** WFLOAPPD.WF-LA-P-ACT-DATE
*S** ELSE
*S** ASSIGN WFLOAPPD.WF-LA-P-ACT-DATE = *DATX
*S** END-IF
*S** END-IF
*S** PERFORM LOAN-ACTIONS WFLOAPPD WFLOAPPD-ID WFLODSBL
*S** WWVALLDA #ORIG-C-ACT #ORIG-D-ACT(*)
*S** IF WFLODSBL.WF-LD-AMT1(*) = #ORIG-D-AMT1(*)
*S** IGNORE
*S** ELSE
*S** ASSIGN #DISB-CHG = TRUE
*S** END-IF
*S** IF #DISB-CHG OR
*S** WFLOAPPD.WF-LA-PCT-FEE NE #ORIG-PCT-FEE OR
*S** WFLOAPPD.WF-LA-PCT-REB NE #ORIG-PCT-REB
*S** PERFORM COMPUTE-LOAN-FEES WFLOAPPD WFLOAPPD-ID WFLODSBL
*S** END-IF
*S** END-IF
*S****SAG END-EXIT
*S** /*
*S** /* Assign #KEY to equal the input fields
*S** MOVE BY NAME WFLOAPPD TO WFLOAPPD-ID.STRUCTURE
*S** ASSIGN #KEY = WFLOAPPD-ID
*S** /*
*S** /* Invoke subprogram to process object
*S** PERFORM CALL-OBJECT-IO
*S****SAG DEFINE EXIT AFTER-OBJECT-CALL
*S** IF WWAOBJ.#FUNCTION = 'GET'
*S** /*
*S** /* On retrieval of a loan record, find loan characteristics
*S** RESET WWLNTYPD #LNTYPE-REC-NF
*S** MOVE 'T' TO WWLNTYPD.WW-RECORD-TYPE
*S** MOVE 'LNTYP' TO WWLNTYPD.WW-TABLE-ID
*S** MOVE ##FAO-ID TO #TABLE-FAO
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #TABLE-TYPE
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #TABLE-SUBTYPE
*S** MOVE #TABLE-VALUE-RED TO WWLNTYPD.WW-TABLE-VALUE
*S** PERFORM CALL-OBJECT-LOANTYPE
*S** IF NOT WWAOBJ.#EXISTS
*S** COMPRESS WFLOAPPD.WF-LA-TYPE WFLOAPPD.WF-LA-R-TYPE
*S** INTO #HOLD-TYPE-SUBTYPE
*S** COMPRESS 'Loan type ' #HOLD-TYPE-SUBTYPE
*S** ' is not defined in loan type table' INTO ##MSG
*S** ASSIGN #LNTYPE-REC-NF = TRUE
*S** ESCAPE ROUTINE
*S** END-IF
*S** /*
*S** /* If certification action is blank, import snapshot data
*S** /* Import default loan values where blank
*S** IF WFLOAPPD.WF-LA-A-ACT = ' '
*S** RESET WFLOANPD
*S** MOVE 'ALL' TO #LO-ACTION
*S** MOVE WFLOAPPD.WF-LA-TYPE TO #LO-TYPE
*S** IF WW-LO-APP = 'S'
*S** MOVE WFLOAPPD.WF-LA-R-TYPE TO #LO-SUBTYPE
*S** END-IF
*S** MOVE WFLOAPPD.WF-LA-START-END TO #LO-START-END
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #LO-AMT1
*S** PERFORM GET-LOAN-DEFLT-INFO WFLOANPD
*S** IF WFLOAPPD.WF-LA-PROC = ' '
*S** MOVE #LO-PROC TO WFLOAPPD.WF-LA-PROC
*S** END-IF
*S** IF WFLOAPPD.WF-LA-PROC-REQ = ' '
*S** MOVE #LO-PROC-REQ TO WFLOAPPD.WF-LA-PROC-REQ
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-TYPE = ' '
*S** MOVE #LO-NOTE-TYPE TO WFLOAPPD.WF-LA-P-TYPE
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-MTYPE = ' '
*S** MOVE #LO-NOTE-MTYPE TO WFLOAPPD.WF-LA-P-MTYPE
*S** END-IF
*S** IF WFLOAPPD.WF-LA-P-DLV = ' '
*S** MOVE #LO-NOTE-DLV TO WFLOAPPD.WF-LA-P-DLV
*S** END-IF
*S** IF WFLOAPPD.WF-LA-R-DEF = ' '
*S** MOVE #LO-DEF TO WFLOAPPD.WF-LA-R-DEF
*S** END-IF
*S** IF WFLOAPPD.WF-LA-R-CAP = ' '
*S** MOVE #LO-CAP TO WFLOAPPD.WF-LA-R-CAP
*S** END-IF
*S** IF WFLOAPPD.WF-LA-R-EFT = ' '
*S** MOVE #LO-EFT TO WFLOAPPD.WF-LA-R-EFT
*S** END-IF
*S** MOVE #LO-DEFLT TO WFLOAPPD.WF-LA-S-DEFAULT
*S** MOVE #LO-CIT TO WFLOAPPD.WF-LA-S-CIT
*S** MOVE #LO-ENR TO WFLOAPPD.WF-LA-S-TIM
*S** MOVE #LO-GRAD-DATE TO WFLOAPPD.WF-LA-S-GRAD-DATE
*S** MOVE #LO-DEP TO WFLOAPPD.WF-LA-S-DEP
*S** MOVE #LO-BGT TO WFLOAPPD.WF-LA-S-BUDGET
*S** MOVE #LO-EFC TO WFLOAPPD.WF-LA-S-EFC
*S** MOVE #LO-AID TO WFLOAPPD.WF-LA-S-AID
*S** IF WFLOAPPD.WF-LA-R-TYPE NE 'P' OR
*S** WFLOAPPD.WF-LA-FUND1 = ' ' OR
*S** (SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) = 'G' AND
*S** SUBSTRING(#LO-YR-COL,1,1) = 'G') OR
*S** (SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) NE 'G' AND
*S** SUBSTRING(#LO-YR-COL,1,1) NE 'G')
*S** MOVE #LO-YR-COL TO WFLOAPPD.WF-LA-S-CLASS
*S** END-IF
*S** END-IF
*S** /*
*S** /* Get loan disbursements associated with this loan
*S** ASSIGN ##PASS-ACTION = 'R'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** END-IF
*S** /*
*S** IF WWAOBJ.#FUNCTION = 'UPDATE'
*S** /*
*S** /* Update loan disbursements as necessary
*S** ASSIGN ##PASS-ACTION = 'U'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** /*
*S** /* Update awards to reflect loan activity
*S** IF WFLOAPPD.WF-LA-AMT1 NE 0 OR #ORIG-AMT1 NE 0
*S** IF #AWARD-ERROR OR #DISB-CHG OR
*S** WFLOAPPD.WF-LA-START-END NE #ORIG-START-END OR
*S** WFLOAPPD.WF-LA-AMT1 NE #ORIG-AMT1 OR
*S** (WFLOAPPD.WF-LA-C-ACT NE #ORIG-C-ACT AND
*S** WFLOAPPD.WF-LA-C-ACT = 'X')
*S** ASSIGN ##PASS-TEMP = WFLOAPPD.WF-LA-TYPE
*S** IF WW-LO-APP = 'S'
*S** COMPRESS ##PASS-TEMP WFLOAPPD.WF-LA-R-TYPE
*S** INTO ##PASS-TEMP LEAVING NO
*S** END-IF
*S** RESET #AWARD-ERROR
*S** RESET ##RETURN-CODE
*S** CALLNAT 'WFLNAWDN' WW-GDA WFLOAPPD WFLOAPPD-ID WFLODSBL
*S** #ORIG-START-END
*S** #ORIG-AMT1 #ORIG-AMT2 #ORIG-AMT3
*S** #ORIG-D-SPLIT #DISB-CHG
*S** IF ##RETURN-CODE = 'A' OR = 'E'
*S** ASSIGN #AWARD-ERROR = TRUE
*S** COMPRESS 'Award error:' ##MSG INTO ##MSG
*S** REINPUT FULL WITH TEXT ##MSG
*S** END-IF
*S** ASSIGN ##PASS-TEMP = WFLOAPPD.WF-LA-TYPE
*S** IF WW-LO-APP = 'S'
*S** COMPRESS ##PASS-TEMP WFLOAPPD.WF-LA-R-TYPE
*S** INTO ##PASS-TEMP LEAVING NO
*S** END-IF
*S** IF SUBSTRING(WFLOAPPD.WF-LA-S-CLASS,1,1) = 'G'
*S** COMPRESS ##PASS-TEMP 'G' INTO ##PASS-TEMP LEAVING NO
*S** END-IF
*S** IF WFLOAPPD.WF-LA-A-SNT-DATE = INIT-DATE
*S** ASSIGN ##PASS-KEY = WFLOAPPD.WF-LA-START-END
*S** CALLNAT 'WFAWDLNN' WW-GDA
*S** END-IF
*S** /* \
*S** /* Set Acadmic Year dates for Direct Loans
*S** CALLNAT 'WFAWDLDN' WW-GDA
*S** IF ##PASS-KEY = 'LOAN-DATES-LOCKED'
*S** ASSIGN #DATES-LOCKED = TRUE
*S** ASSIGN #DATES-LOCKED-LOAN = ##MSG-DATA(1)
*S** RESET ##PASS-KEY
*S** ##MSG-DATA(1)
*S** END-IF
*S** /*
*S** /* Re-read loan information (may have been updated in WFAWDLNN)
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM CALL-OBJECT-IO
*S** IF WWAOBJ.#EXISTS
*S** ASSIGN ##PASS-ACTION = 'R'
*S** PERFORM CALL-SERVICE-LOANDSB
*S** ELSE
*S** CALLNAT 'WWDUTILN' WW-GDA WWVALLDA
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S** ASSIGN ##PASS-TEMP = 'N'
*S** PERFORM PURGE-ECAR
*S** END TRANSACTION
*S** ASSIGN ##MSG = 'Loan deleted'
*S** ASSIGN #RECORD-DELETED = TRUE
*S** ESCAPE ROUTINE
*S** END-IF
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** END-IF
*S** END-IF
*S** /*
*S** /* If Certification action has changed, datestamp and
*S** /* call certification routine if appropriate
*S** IF #HOLD-A-ACT NE #ORIG-A-ACT
*S** MOVE #HOLD-A-ACT TO WFLOAPPD.WF-LA-A-ACT
*S** IF #HOLD-A-ACT = ' '
*S** RESET WFLOAPPD.WF-LA-A-ACT-RSN
*S** WFLOAPPD.WF-LA-A-ACT-DATE
*S** WFLOAPPD.WF-LA-A-AMT1
*S** ELSE
*S** ASSIGN WFLOAPPD.WF-LA-A-ACT-DATE = *DATX
*S** IF #ORIG-A-ACT = ' '
*S** MOVE *DATX TO #CERT-DATE
*S** PERFORM LOAN-CERTIFICATION WFLOAPPD WFLOAPPD-ID WFLOAPPR
*S** #CERT-DATE
*S** END-IF
*S** END-IF
*S** ASSIGN WWAOBJ.#FUNCTION = 'UPDATE'
*S** PERFORM CALL-OBJECT-IO
*S** END-IF
*S** END-IF
*S** /*
*S** /* On each I/O, capture "original" values to use in later comparison
*S** MOVE WFLOAPPD.WW-PARENT-ID TO #ORIG-PARENT
*S** MOVE WFLOAPPD.WF-LA-START-END TO #ORIG-START-END
*S** MOVE WFLOAPPD.WF-LA-PCT-FEE TO #ORIG-PCT-FEE
*S** MOVE WFLOAPPD.WF-LA-PCT-REB TO #ORIG-PCT-REB
*S** MOVE WFLOAPPD.WF-LA-AMT1 TO #ORIG-AMT1
*S** MOVE WFLOAPPD.WF-LA-A-SNT-DATE TO #ORIG-A-SNT-DATE
*S** MOVE WFLOAPPD.WF-LA-A-ACT TO #ORIG-A-ACT
*S** MOVE WFLOAPPD.WF-LA-C-ACT TO #ORIG-C-ACT
*S** MOVE WFLOAPPD.WF-LA-P-ACT TO #ORIG-P-ACT
*S** MOVE WFLODSBL.WF-LD-ACT(*) TO #ORIG-D-ACT(*)
*S** MOVE WFLODSBL.WF-LD-DP(*) TO #ORIG-D-DP(*)
*S** MOVE WFLODSBL.WF-LD-AMT1(*) TO #ORIG-D-AMT1(*)
*S** /*
*S** /* Set up ##PASS-KEY for use in WWDUTILN
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S****SAG END-EXIT
*S** /*
*S** IF WWAOBJ.#FUNCTION = 'GET' AND
*S** NOT WWAOBJ.#EXISTS
*S** ASSIGN #ADD-OBJECT = TRUE
*S** END-IF
*S** /*
*S** ASSIGN #DISPLAYED-KEY = WFLOAPPD-ID
*S** /*
*S** /* Reset #KEY if next record displayed
*S** IF #FUNCTION = 'NEXT'
*S** ASSIGN #KEY = #DISPLAYED-KEY
*S** END-IF
*S** /*
*S** /* Set logical for update processing
*S** IF #FUNCTION = 'STORE'
*S** OR = 'UPDATE'
*S** ASSIGN #UPDATE-PERFORMED = TRUE
*S** END-IF
*S** /*
*S** /* Update performed
*S** IF #UPDATE-PERFORMED THEN
*S** CALLNAT 'WWDUTILN' WW-GDA WWVALLDA
*S** PERFORM ADD-EVENT #EVENT-TYPE #EVENT-DESC
*S****SAG DEFINE EXIT BEFORE-END-TRANSACTION
*S** ASSIGN ##PASS-KEY = #HOLD-EC-TYPE
*S** PERFORM CHECK-LOAN-CHANGES WFLOAPPD WFLOAPPD-ID WFLOAPPR WFLODSBL
*S****SAG END-EXIT
*S** END TRANSACTION
*S** RESET #UPDATE-PERFORMED #ACTION #ADD-OBJECT #DATA-MODIFIED
*S** END-IF
*S**END-SUBROUTINE /* CALL-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-IO
*S*************************************************************************
*S***
*S** CALLNAT 'WFLOAPPO' WW-GDA
*S** WFLOAPPD
*S** WFLOAPPD-ID
*S** WFLOAPPR
*S** WWAOBJ
*S**END-SUBROUTINE /* CALL-OBJECT-IO
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE FINAL-PROCESSING
*S*************************************************************************
*S** /*
*S** INCLUDE WWEND /* Restore environment.
*S**END-SUBROUTINE /* FINAL-PROCESSING
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE INITIALIZATIONS
*S*************************************************************************
*S** /*
*S** INCLUDE WWBEGIN /* Capture environment
*S** SET CONTROL 'WBM' /* Set window size/base
*S** /*
*S** /* Specify which PF-KEYS are valid, start by resetting all keys,
*S** /* then assign desired keys using RESET INITIAL.
*S** INCLUDE WWPFSTD /* Standard PF-Keys.
*S****SAG DEFINE EXIT SET-PF-KEYS
*S** RESET WWKEYLDA.#SELECT-KEY /* Not available at detail
*S** RESET INITIAL WWKEYLDA.#NOTEPAD-KEY
*S** WWKEYLDA.#EXPAND-KEY
*S** WWKEYLDA.#PRINT-KEY
*S****SAG END-EXIT
*S**END-SUBROUTINE /* INITIALIZATIONS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE SET-KEYS
*S*************************************************************************
*S***
*S** INCLUDE WWSETKEY /* Set specified keys
*S** INCLUDE WWSETHLP /* Set Help keys
*S**END-SUBROUTINE /* SET-KEY
*S****SAG DEFINE EXIT MISCELLANEOUS-SUBROUTINES
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-EXT-SUB-LOANDSB
*S*************************************************************************
*S** /*
*S** /* Call Map specific external subroutine
*S** PERFORM WFLNEDTM-MASK-EDITS-LOANDSB #SUB-PARM WWVALLDA
*S** WFLODSBL #WF-LOAN-DISBURSEMENT
*S**END-SUBROUTINE /* CALL-EXT-SUB-LOANDSB
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT-LOANTYPE
*S*************************************************************************
*S** /*
*S** MOVE WWAOBJ.#FUNCTION TO #HOLD-FUNCTION
*S** MOVE 'GET' TO WWAOBJ.#FUNCTION
*S** /*
*S** /* Call WW-LOANTYPE Object subprogram
*S** CALLNAT 'WWLNTYPO' WW-GDA
*S** WWLNTYPD
*S** WWLNTYPD-ID
*S** WWLNTYPR
*S** WWAOBJ
*S** /*
*S** MOVE #HOLD-FUNCTION TO WWAOBJ.#FUNCTION
*S**END-SUBROUTINE /* CALL-OBJECT-LOANTYPE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-SERVICE-LOANDSB
*S*************************************************************************
*S** /*
*S** /* Call standard routine to get or update WF-LOANDSB records
*S** ASSIGN ##PASS-KEY = WFLOAPPD-ID
*S** PERFORM LOANDSB-SERVICE WFLODSBL
*S** RESET ##MSG
*S**END-SUBROUTINE /* CALL-SERVICE-LOANDSB
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE PRINT-ROUTINE
*S*************************************************************************
*S** /*
*S** /* Perform Prom note print routine
*S** RESET ##PASS-TEMP
*S** ASSIGN ##PASS-KEY = WFLOAPPD.WF-LOAN-ID
*S** IF *DEVICE EQ 'PC' OR EQ 'VIDEO' OR EQ 'COLOR'
*S** FETCH RETURN 'WFDPMNTP'
*S** RESET #DISPLAYED-KEY
*S** ELSE
*S** REINPUT
*S** 'FINANCIER not set up to allow on-line printing'
*S** END-IF
*S** IF ##PASS-TEMP NE SPACE
*S** MOVE ##PASS-TEMP TO ##MSG
*S** RESET ##PASS-TEMP
*S** END-IF
*S** RESET ##PASS-KEY
*S**END-SUBROUTINE /* PRINT-ROUTINE
*S****SAG END-EXIT
*S**END
*E
|