C:\Documents and Settings\Dan\My Documents\share\FINANCIER\releases\Natural\1210-99\old\wfawidtn.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
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
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Subprogram: WFAWIDTN
*S*** System : FINANCIER
*S*** Title : Award Disbursement Distribution detail display program
*S*** Function : This program displays award detail information.
*S***
*S*** Copyright 1995 - 2003 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S** PARAMETER USING WWPDA
*S** PARAMETER
*S** 01 #SCROLL-TBL(1:10)
*S** 02 #KY(A24)
*S** 02 REDEFINE #KY
*S** 03 WF-AID-YEAR(A4)
*S** 03 WF-FAO(A2)
*S** 03 WW-STUDENT-ID(A9)
*S** 03 WF-FUND-ID(A9)
*S** 01 #PANEL(P3) /* Panel number.
*S***
*S** LOCAL USING WFAWARDD /* Passed to Object Subprogram
*S** LOCAL USING WFAWARDR /* Passed to Object Subprogram
*S** LOCAL USING WFAWARDS /* Shadow file PDA
*S** LOCAL USING WWAOBJ /* Passed to Object Subprograms
*S***
*S** LOCAL USING WWCONST /* Constants LDA
*S** LOCAL USING WWDIALDA /* Local data for dialog objects.
*S** LOCAL USING WWENVIRA /* Used to capture/restore previous environment.
*S** LOCAL USING WWKEYLDA /* Used to set function keys + their alias.
*S** LOCAL USING WWVALLDA /* Valid value LDA
*S** LOCAL
*S***
*S*** Constants.
*S** 01 #MAX-PAGES(P3) CONST<10> /* Maximum scroll pages.
*S** 01 #MAX-ARRAY-ENTR(P3) CONST<12> /* Maximum array entries.
*S** 01 #MAX-DP-ENTR(P3) CONST<3> /* Maximum disbursement pt entries.
*S** 01 #MAX-DP-PAGES(P3) CONST<4> /* Maximum disbursement pt pages.
*S***
*S*** Miscellaneous variables.
*S** 01 #TITLE(A40) INIT<'Distribution -'>
*S** 01 #FIRST-TIME(L) INIT<TRUE>
*S** 01 #TYPE-POS(P3)
*S** 01 #PGM-ID(A8)
*S** 01 #CURS-LINE(P5) /* Cursor select line.
*S** 01 #END-OF-DATA(L) /* End of logical read.
*S** 01 #END-OF-PAGE-LINE(P5) /* Line number where EOP starts.
*S** 01 #FIRST
*S** 02 #KY(A24) /* 1st KEY when looking for match.
*S** 01 #FIRST-INPUT(L) INIT<TRUE> /* Trigger End of Page.
*S** 01 #FIRST-KEY-FOUND(L) /* First unique value found.
*S** 01 #FIRST-TIME-REV(L) /* First reverse.
*S** 01 #FORWARD(L) INIT<TRUE> /* Not backwards left or right.
*S** 01 #BYPASS-READ(L) /* No paging
*S** 01 #SCROLLING(L) /* Paging
*S** 01 #SUB(P3)
*S** 01 #CNT(P3)
*S** 01 #CURS-COL(P3)
*S** 01 #AWARD-PROCESSED(L)
*S** 01 #ADD-AIDSTAT(L)
*S** 01 #FUND-EXPAND(L)
*S** 01 #SUB-PARM(A1)
*S** 01 #AWD-STAT(A1)
*S** 01 #NEXT(L)
*S** 01 #PASS-KEY(A30)
*S** 01 #PASS-TEMP(A30)
*S** 01 #SAVE-MSG(A79)
*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** /*
*S** /* Define input fields.
*S** 01 #INPUT /* Input key value.
*S** 02 #KY
*S** 03 WF-AID-YEAR(A4)
*S** 03 WF-FAO(A2)
*S** 03 WW-STUDENT-ID(A9)
*S** 03 WF-FUND-ID(A9)
*S** 02 REDEFINE #KY
*S** 03 #KY-RED(A24)
*S** 01 #END-KEY /* End of search key
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-FUND-ID(A9)
*S** 01 REDEFINE #END-KEY
*S** 02 #END-KEY-RED(A24)
*S** 01 #BEGIN-KEY /* Beginning of search key
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-FUND-ID(A9)
*S** 01 REDEFINE #BEGIN-KEY
*S** 02 #BEGIN-KEY-RED(A24)
*S***
*S** 01 #INSIDE-READ-LOOP(L) /* Executing statement inside read.
*S***
*S*** Value of the scroll key on current record
*S** 01 #KEY(A24) /* Key field of record.
*S** 01 #MATCH-FOUND(L) /* Matched Unique Id from table.
*S** 01 #NULL-KEY(A24) /* Empty key value.
*S** 01 #DP-INDX(P3) INIT<1> /* Disbursement index
*S** 01 #DP-SUB(P3) /* Disbursement subscript
*S** 01 #DP-START-PT(4) /* Disbursement starting point
*S** 02 #DP-START(P3) INIT<1,4,7,10> /* array
*S***
*S** 01 #SEL-INDX(P5) /* Select table index.
*S** 01 #SEL-TBL(1:#MAX-ARRAY-ENTR)
*S** 02 #KY(A24)
*S** 02 REDEFINE #KY
*S** 03 WF-AID-YEAR(A4)
*S** 03 WF-FAO(A2)
*S** 03 WW-STUDENT-ID(A9)
*S** 03 WF-FUND-ID(A9)
*S** 01 #SEL-KEY
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-FUND-ID(A9)
*S** 01 REDEFINE #SEL-KEY
*S** 02 #SELECTED-KEY(A24) /* Key of selected record.
*S** /*
*S** /* Key value for starting position of read.
*S** 01 #START
*S** 02 #KY(A24)
*S** 01 #STD-KEY-PRESSED(L) /* Quit, Return, Flip, Main.
*S** 01 #TOP-OF-PAGE(L) /* Top of Page was triggered.
*S** 01 #END-DATA(L)
*S** /*
*S** 01 #DISPLAYED-KEY(A1) /* Used by WWSTDKEY LDA
*S** /*
*S** 01 #LOW-KY(A24)
*S** 01 #HIGH-KY(A24)
*S** /*
*S** 01 #EXPAND-LOGICALS
*S** 02 #OFF-EXPAND(L)
*S** 02 #ACC-EXPAND(L)
*S** 02 #DISB-EXPAND(L)
*S** /*
*S** 01 AWARD-ARRAY
*S** 02 WF-AWARD-DISB
*S** 03 WF-AW-D01-OFF (P5.2)
*S** 03 WF-AW-D01-ACC (P5.2)
*S** 03 WF-AW-D01-DIS (P5.2)
*S** 03 WF-AW-D02-OFF (P5.2)
*S** 03 WF-AW-D02-ACC (P5.2)
*S** 03 WF-AW-D02-DIS (P5.2)
*S** 03 WF-AW-D03-OFF (P5.2)
*S** 03 WF-AW-D03-ACC (P5.2)
*S** 03 WF-AW-D03-DIS (P5.2)
*S** 03 WF-AW-D04-OFF (P5.2)
*S** 03 WF-AW-D04-ACC (P5.2)
*S** 03 WF-AW-D04-DIS (P5.2)
*S** 03 WF-AW-D05-OFF (P5.2)
*S** 03 WF-AW-D05-ACC (P5.2)
*S** 03 WF-AW-D05-DIS (P5.2)
*S** 03 WF-AW-D06-OFF (P5.2)
*S** 03 WF-AW-D06-ACC (P5.2)
*S** 03 WF-AW-D06-DIS (P5.2)
*S** 03 WF-AW-D07-OFF (P5.2)
*S** 03 WF-AW-D07-ACC (P5.2)
*S** 03 WF-AW-D07-DIS (P5.2)
*S** 03 WF-AW-D08-OFF (P5.2)
*S** 03 WF-AW-D08-ACC (P5.2)
*S** 03 WF-AW-D08-DIS (P5.2)
*S** 03 WF-AW-D09-OFF (P5.2)
*S** 03 WF-AW-D09-ACC (P5.2)
*S** 03 WF-AW-D09-DIS (P5.2)
*S** 03 WF-AW-D10-OFF (P5.2)
*S** 03 WF-AW-D10-ACC (P5.2)
*S** 03 WF-AW-D10-DIS (P5.2)
*S** 03 WF-AW-D11-OFF (P5.2)
*S** 03 WF-AW-D11-ACC (P5.2)
*S** 03 WF-AW-D11-DIS (P5.2)
*S** 03 WF-AW-D12-OFF (P5.2)
*S** 03 WF-AW-D12-ACC (P5.2)
*S** 03 WF-AW-D12-DIS (P5.2)
*S** 02 REDEFINE WF-AWARD-DISB
*S** 03 WF-AW-DISBS(12)
*S** 04 WF-OFF (P5.2)
*S** 04 WF-ACC (P5.2)
*S** 04 WF-DIS (P5.2)
*S** /*
*S** 01 #ARRAYS /* Array of multiple records
*S** 02 #ARRAY-DATA
*S** 03 #AW-FUND(A9/1:#MAX-ARRAY-ENTR)
*S** 03 #AW-TITLE(A30/1:#MAX-ARRAY-ENTR)
*S** 03 #AW-DP(A9/1:#MAX-ARRAY-ENTR,1:#MAX-DP-ENTR)
*S** 03 #DP-TITLE(A10/1:#MAX-DP-ENTR)
*S** 02 #DETAIL-DATA
*S** 03 #AW-OFF(A9/1:12)
*S** 03 #AW-ACC(A9/1:12)
*S** 03 #AW-DIS(A9/1:12)
*S** 02 #ARRAY-CV
*S** 03 #AW-FUND-CV(C/1:#MAX-ARRAY-ENTR)
*S** 01 #HOLD-FIELDS
*S** 02 #STUDENT-ID(A9)
*S** 02 #STUDENT-ID-CV(C)
*S** 02 #REJ-ONLY(A1)
*S** 02 #REJ-ONLY-CV(C)
*S** 02 #OVERAWARD(A20)
*S** 02 #AW-ALL(A2)
*S** 02 #AW-ALL-CV(C)
*S** 02 #AW-ALL-F(L)
*S** 01 #SECURITY
*S** 02 #PROGRAM-MATCH(L)
*S** 02 #FILE-MATCH(L)
*S** 02 #TMP-PRIV(A1)
*S** 02 #CNTL-VAR(C)
*S** 01 #BYPASS-INPUT (L) /* Bypass
*S***
*S** 01 #ALL-AMOUNT(A9) /* Used by #AW-ALL processing
*S** 01 #ALL-DTL(A9/12) /* dummy fields for award call
*S***
*S**END-DEFINE
*S***
*S**FORMAT ES=ON /* ES suppresses (WRITE ' ') output,
*S** /* needed for newpage processing
*S**PERFORM INITIALIZATIONS
*S***
*S**DECIDE ON FIRST VALUE OF ##PASS-TEMP
*S** VALUE 'O'
*S** COMPRESS #TITLE 'Offered' INTO #TITLE
*S** VALUE 'A'
*S** COMPRESS #TITLE 'Accepted' INTO #TITLE
*S** VALUE 'D'
*S** COMPRESS #TITLE 'Disbursed' INTO #TITLE
*S** NONE
*S** IGNORE
*S**END-DECIDE
*S***
*S**DEFINE WINDOW AWARDTDT
*S** SIZE 17*79
*S** BASE 5 / 1
*S** TITLE #TITLE
*S** CONTROL SCREEN
*S** FRAMED(CD=NE)
*S** POSITION OFF
*S**ASSIGN ##COLOR = 'NE'
*S***
*S*************************************************************************
*S***
*S**PROG.
*S**REPEAT /* Repeat loop to allow escape of program from within subroutine.
*S** SET WINDOW 'AWARDTDT'
*S** IF #PANEL = 1 OR #FIRST-TIME
*S** RESET INITIAL #END-DATA
*S** RESET INITIAL #BEGIN-KEY
*S** MOVE BY NAME #BEGIN-KEY TO #INPUT.#KY
*S** ASSIGN #INPUT.WF-FUND-ID = ' '
*S** ASSIGN #INPUT.WF-AID-YEAR = ##AID-YEAR
*S** ASSIGN #INPUT.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN #INPUT.WF-FAO = ##FAO-ID
*S** MOVE BY NAME #INPUT TO #END-KEY
*S** MOVE BY NAME #INPUT TO #BEGIN-KEY
*S** MOVE ALL H'FF' TO #END-KEY.WF-FUND-ID
*S** ASSIGN #FORWARD = TRUE
*S** ASSIGN #FIRST-INPUT = TRUE
*S** RESET #FIRST-TIME
*S** /*
*S** /* Security
*S** MOVE 'WFAWARDD' TO ##FILE-ID
*S** MOVE 'WFAWSUMP' TO ##PGM-ID
*S** PERFORM AWARD-SECURITY AWARD-CNTL-VARS
*S** MOVE FUND-ID-CV TO #AW-FUND-CV(*)
*S** ASSIGN #INSIDE-READ-LOOP = FALSE
*S** END-IF
*S***
*S**NEW-READ.
*S** REPEAT /* Escape this repeat if no end of data processing.
*S** /*
*S** IF #PANEL = 1
*S** ASSIGN #START.#KY = #INPUT.#KY-RED
*S** ASSIGN #MATCH-FOUND = TRUE
*S** /*
*S** /* Very first time trigger a new page to input starting value.
*S** RESET #ARRAY-DATA #SEL-TBL(*)
*S** ##MSG ##MSG-DATA(*) ##RETURN-CODE
*S** /*
*S** /* Set first SEL-TBL key up as default
*S** ASSIGN #SEL-TBL.#KY(1) = #BEGIN-KEY-RED
*S** /*
*S** ASSIGN #SEL-INDX = 1
*S** RESET #END-DATA
*S** ASSIGN WFAWARDD-ID = #START.#KY
*S** IF #BYPASS-READ
*S** RESET #BYPASS-READ
*S** END-IF
*S** MOVE BY NAME WFAWARDD-ID.STRUCTURE TO WFAWARDD
*S** ASSIGN WWAOBJ.#FUNCTION = 'NEXT'
*S** ELSE
*S** ASSIGN #START.#KY = #SCROLL-TBL.#KY(#PANEL)
*S** ASSIGN WFAWARDD-ID = #START.#KY
*S** MOVE BY NAME WFAWARDD-ID.STRUCTURE TO WFAWARDD
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** ASSIGN #SEL-INDX = 1
*S** RESET #END-DATA
*S** END-IF
*S** /*
*S**READ-FILE. /* Escape this label if end of data processing is needed.
*S** REPEAT
*S** /*
*S** PERFORM CALL-OBJECT
*S** IF WFAWARDD-ID > #END-KEY-RED OR
*S** NOT WWAOBJ.#EXISTS
*S** ASSIGN #END-DATA = TRUE
*S** END-IF
*S** ASSIGN #INSIDE-READ-LOOP = TRUE
*S** IF #FIRST-INPUT
*S** RESET #FIRST-INPUT
*S** END-IF
*S** /*
*S** /* Assign #KEY to equal the descriptor utilized.
*S** ASSIGN #KEY = WFAWARDD-ID
*S** /*
*S** IF #SEL-INDX > #MAX-ARRAY-ENTR OR
*S** #END-DATA
*S** WRITE NOTITLE ' '
*S** NEWPAGE
*S** END-IF
*S** /*
*S** IF #SEL-INDX = 1
*S** RESET #ARRAY-DATA #SEL-TBL(*) ##MSG ##MSG-DATA(*) ##RETURN-CODE
*S** MOVE FUND-ID-CV TO #STUDENT-ID-CV
*S** MOVE #DP-START(#DP-INDX) TO #DP-SUB
*S** FOR #SUB = 1 TO 3
*S** MOVE ##SCHED-DP-TITLE(#DP-SUB) TO
*S** #DP-TITLE(#SUB)
*S** ADD 1 TO #DP-SUB
*S** END-FOR
*S** IF #SCROLLING
*S** RESET #SCROLLING
*S** IF #FORWARD
*S** ASSIGN WWAOBJ.#FUNCTION = 'NEXT'
*S** IF #END-DATA
*S** ESCAPE TOP
*S** END-IF
*S** ELSE
*S** /*
*S** /* 'Page-up' reset start key and process
*S** /* forward from there
*S** ASSIGN #START.#KY = #SCROLL-TBL.#KY(#PANEL)
*S** ASSIGN WFAWARDD-ID = #START.#KY
*S** MOVE BY NAME WFAWARDD-ID.STRUCTURE TO WFAWARDD
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** /* Fill arrays
*S** MOVE WFAWARDD.WF-FUND-ID TO #AW-FUND(#SEL-INDX)
*S** MOVE 'WFAWARDD.WF-FUND-ID' TO #PASS-KEY
*S** MOVE WFAWARDD.WF-FUND-ID TO #PASS-TEMP
*S** PERFORM GET-VALUE-TRANSLATION #PASS-KEY #PASS-TEMP
*S** MOVE #PASS-TEMP TO #AW-TITLE(#SEL-INDX)
*S** MOVE PROTECTED-YE-ATTR TO #AW-FUND-CV(#SEL-INDX)
*S** /*
*S** /* Load hold arrays
*S** RESET #DETAIL-DATA
*S** MOVE BY NAME WFAWARDD TO AWARD-ARRAY
*S** FOR #SUB = 1 TO 12
*S** DECIDE FOR EVERY CONDITION
*S** WHEN WF-OFF(#SUB) NE 0
*S** MOVE EDITED WF-OFF(#SUB)(EM=ZZ,ZZZ.99) TO #AW-OFF(#SUB)
*S** WHEN WF-ACC(#SUB) NE 0
*S** MOVE EDITED WF-ACC(#SUB)(EM=ZZ,ZZZ.99) TO #AW-ACC(#SUB)
*S** WHEN WF-DIS(#SUB) NE 0
*S** MOVE EDITED WF-DIS(#SUB)(EM=ZZ,ZZZ.99) TO #AW-DIS(#SUB)
*S** WHEN NONE
*S** IGNORE
*S** END-DECIDE
*S** END-FOR
*S** /*
*S** /* Load disbursement point array
*S** MOVE #DP-START(#DP-INDX) TO #DP-SUB
*S** FOR #SUB = 1 TO 3
*S** DECIDE ON FIRST VALUE OF ##PASS-TEMP
*S** VALUE 'O'
*S** IF #DP-TITLE(#SUB) NE SPACE
*S** MOVE #AW-OFF(#DP-SUB) TO
*S** #AW-DP(#SEL-INDX,#SUB)
*S** END-IF
*S** VALUE 'A'
*S** IF #DP-TITLE(#SUB) NE SPACE
*S** MOVE #AW-ACC(#DP-SUB) TO
*S** #AW-DP(#SEL-INDX,#SUB)
*S** END-IF
*S** VALUE 'D'
*S** IF #DP-TITLE(#SUB) NE SPACE
*S** MOVE #AW-DIS(#DP-SUB) TO
*S** #AW-DP(#SEL-INDX,#SUB)
*S** END-IF
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** ADD 1 TO #DP-SUB
*S** END-FOR
*S** ASSIGN #SEL-TBL.#KY(#SEL-INDX) = #KEY
*S** ADD 1 TO #SEL-INDX
*S** /*
*S** /* Display headings and load the scrolling table with key and
*S** /* Unique record identifier for backward/sideways scrolling.
*S** AT TOP OF PAGE
*S** ASSIGN #TOP-OF-PAGE = TRUE
*S** ASSIGN #SEL-INDX = 1
*S** /*
*S** END-TOPPAGE
*S** /*
*S** /* Input the screen and check users PF keys.
*S** AT END OF PAGE
*S** /*
*S** IF #SAVE-MSG NE SPACE
*S** MOVE #SAVE-MSG TO ##MSG
*S** RESET #SAVE-MSG
*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** /*
*S** /*
*S** INPUT WITH TEXT ##MSG,
*S** ##MSG-DATA(1),##MSG-DATA(2),##MSG-DATA(3)
*S** USING MAP 'WFAWIDTM'
*S** /*
*S** INCLUDE WWSTDCHK /* Check standard pf-keys or '.' if first pos.
*S** IF *PF-KEY = WWKEYLDA.#SELECT-KEY
*S** ASSIGN #PANEL = 1
*S** ASSIGN #STD-KEY-PRESSED = TRUE
*S** END-IF
*S** /*
*S** /* Increment Scroll table if Retrn key pressed.
*S** /* (allows paging to be passed back to award term
*S** /* overview program)
*S** IF *PF-KEY = WWKEYLDA.#RETURN-KEY
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** END-IF
*S** IF #STD-KEY-PRESSED THEN
*S** ASSIGN #FORWARD = FALSE
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** /*
*S** IF *PF-KEY = 'ENTR'
*S** ESCAPE TOP
*S** END-IF
*S** /* Check scroll keys.
*S** IF NOT(*PF-KEY = 'ENTR' OR
*S** = WWKEYLDA.#FORWARD-KEY OR
*S** = WWKEYLDA.#BACKWARD-KEY OR
*S** = WWKEYLDA.#NOTEPAD-KEY OR
*S** = WWKEYLDA.#EXPAND-KEY OR
*S** = WWKEYLDA.#CALC-KEY OR
*S** = WWKEYLDA.#PRINT-KEY OR
*S** = WWKEYLDA.#SELECT-KEY) THEN
*S** REINPUT FULL 'Invalid program function key' ALARM
*S** END-IF
*S** ASSIGN #FORWARD = TRUE
*S** /*
*S** /* Process Keys
*S** /*
*S** /* Paging keys
*S** IF *PF-KEY = WWKEYLDA.#FORWARD-KEY
*S** IF #SEL-TBL.#KY(#MAX-ARRAY-ENTR) = SPACE
*S** REINPUT FULL 'Page not full, paging not required'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S** IF #PANEL + 1 > #MAX-PAGES
*S** REINPUT FULL 'Paging max reached'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** COMPUTE #PANEL = #PANEL + 1
*S** END-IF
*S** ASSIGN #SCROLLING = TRUE
*S** END-IF
*S** IF *PF-KEY = WWKEYLDA.#BACKWARD-KEY
*S** IF #PANEL - 1 = 0
*S** REINPUT FULL 'First page, cannot page backward'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** COMPUTE #PANEL = #PANEL - 1
*S** END-IF
*S** ASSIGN #SCROLLING = TRUE
*S** RESET #FORWARD
*S** #END-DATA
*S** END-IF
*S** IF *PF-KEY = WWKEYLDA.#CALC-KEY
*S** IF #DP-INDX - 1 = 0
*S** REINPUT FULL 'First disbursement page, cannot page left'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** COMPUTE #DP-INDX = #DP-INDX - 1
*S** END-IF
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** RESET #FORWARD
*S** #END-DATA
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** IF *PF-KEY = WWKEYLDA.#PRINT-KEY
*S** IF #DP-TITLE(#MAX-DP-ENTR) = SPACE
*S** REINPUT FULL 'Page not full, paging not required'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S** IF ##SCHED-DP-TITLE(#DP-SUB) = SPACE
*S** REINPUT FULL 'End of disbursement points, paging not required'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S** IF #DP-INDX + 1 > #MAX-DP-PAGES
*S** REINPUT FULL 'Paging max reached'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** COMPUTE #DP-INDX = #DP-INDX + 1
*S** END-IF
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** RESET #FORWARD
*S** #END-DATA
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** /*
*S** END-ENDPAGE /* AT END OF PAGE
*S**END-REPEAT /* Find of file prime file.
*S** /*
*S** ASSIGN #INSIDE-READ-LOOP = FALSE
*S** ASSIGN #END-OF-DATA = TRUE
*S** /*
*S** WRITE NOTITLE ' '
*S** NEWPAGE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE EXIT-READ-LOOP
*S*************************************************************************
*S***
*S** ESCAPE BOTTOM(NEW-READ.) IMMEDIATE
*S**END-SUBROUTINE /* EXIT-READ-LOOP
*S***
*S** END-REPEAT /* NEW-READ.
*S** IF #STD-KEY-PRESSED THEN
*S** RESET #STD-KEY-PRESSED
*S** IF *PF-KEY = WWKEYLDA.#FLIP-KEY
*S** ASSIGN #FORWARD = TRUE
*S** ASSIGN #BYPASS-READ = TRUE
*S** END-IF
*S** INCLUDE WWSTDKEY /* Check standard pf-keys or '.' if first pos.
*S** END-IF
*S** /*
*S** /* If a record was selected process the record and reposition.
*S** IF #SELECTED-KEY NE #NULL-KEY THEN
*S** /*
*S** /* Processing to be performed after a record has been selected.
*S** IF *PF-KEY = WWKEYLDA.#EXPAND-KEY
*S** /*
*S** IGNORE
*S** ELSE
*S** IGNORE
*S** END-IF
*S** RESET #SELECTED-KEY
*S** END-IF
*S**END-REPEAT /* PROG.
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT
*S*************************************************************************
*S***
*S*** Call WF-AWARD Object subprogram
*S** CALLNAT 'WFAWARDO' WW-GDA
*S** WFAWARDD
*S** WFAWARDD-ID
*S** WFAWARDR
*S** WWAOBJ
*S** ASSIGN WWAOBJ.#FUNCTION = 'NEXT'
*S**END-SUBROUTINE /* CALL-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE FINAL-PROCESSING
*S*************************************************************************
*S***
*S*** Populate WW-PDA from WW-GDA
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S***
*S** INCLUDE WWEND /* Restore environment.
*S***
*S*** Return to the calling object.
*S** IF *PF-KEY = WWKEYLDA.#RETURN-KEY THEN
*S** SET CONTROL 'K0'
*S** END-IF
*S**END-SUBROUTINE /* FINAL-PROCESSING
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE INITIALIZATIONS
*S*************************************************************************
*S***
*S*** Populate WW-GDA from WW-PDA
*S** MOVE BY POSITION WW-PDA TO WW-GDA
*S***
*S** INCLUDE WWBEGIN /* Capture environment.
*S** SET CONTROL 'WBM'
*S***
*S** MOVE NORMAL-ATTR TO #STUDENT-ID-CV
*S***
*S*** Required Fields
*S** MOVE '##SID' TO REQUIRED-FIELD(1)
*S** MOVE '##FAO-ID' TO REQUIRED-FIELD(2)
*S** MOVE '##AID-YEAR' TO REQUIRED-FIELD(3)
*S** MOVE '##TERM' TO REQUIRED-FIELD(4)
*S** PERFORM REQUIRED-FIELD-CHECK REQUIRED-FIELD(*)
*S***
*S*** Specify which PF-KEYS are valid by using RESET INITIAL.
*S** INCLUDE WWPFSTD /* Standard PF-Keys
*S** INCLUDE WWPFUD /* Standard paging keys
*S** RESET WWKEYLDA.#SELECT-KEY
*S** RESET INITIAL WWKEYLDA.#NOTEPAD-KEY
*S** /*
*S** /* Calc and Print keys (PF5 and PF6) used
*S** /* for left and right paging
*S** WWKEYLDA.#CALC-KEY
*S** WWKEYLDA.#PRINT-KEY
*S** PERFORM SET-KEYS
*S**END-SUBROUTINE /* INITIALIZATIONS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE SET-KEYS
*S*************************************************************************
*S***
*S** INCLUDE WWSETKEY /* Set specified keys.
*S** INCLUDE WWSETHLP /* Set PFN=Help
*S** SET KEY PF5 NAMED 'Pg-Le'
*S** SET KEY PF6 NAMED 'Pg-Ri'
*S**END-SUBROUTINE /* SET-KEYS
*S***
*S**PERFORM FINAL-PROCESSING
*S**END
C:\Documents and Settings\Dan\My Documents\share\FINANCIER\releases\Natural\1210-99\new\wfawidtn.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
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
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Subprogram: WFAWIDTN
*S*** System : FINANCIER
*S*** Title : Award Disbursement Distribution detail display program
*S*** Function : This program displays award detail information.
*S***
*S*** Copyright 1995 - 2011 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S** PARAMETER USING WWPDA
*S** PARAMETER
*S** 01 #SCROLL-TBL(1:10)
*S** 02 #KY(A24)
*S** 02 REDEFINE #KY
*S** 03 WF-AID-YEAR(A4)
*S** 03 WF-FAO(A2)
*S** 03 WW-STUDENT-ID(A9)
*S** 03 WF-FUND-ID(A9)
*S** 01 #PANEL(P3) /* Panel number.
*S***
*S** LOCAL USING WFAWARDD /* Passed to Object Subprogram
*S** LOCAL USING WFAWARDR /* Passed to Object Subprogram
*S** LOCAL USING WFAWARDS /* Shadow file PDA
*S** LOCAL USING WWAOBJ /* Passed to Object Subprograms
*S***
*S** LOCAL USING WWCONST /* Constants LDA
*S** LOCAL USING WWDIALDA /* Local data for dialog objects.
*S** LOCAL USING WWENVIRA /* Used to capture/restore previous environment.
*S** LOCAL USING WWKEYLDA /* Used to set function keys + their alias.
*S** LOCAL USING WWVALLDA /* Valid value LDA
*S** LOCAL
*S***
*S*** Constants.
*S** 01 #MAX-PAGES(P3) CONST<10> /* Maximum scroll pages.
*S** 01 #MAX-ARRAY-ENTR(P3) CONST<12> /* Maximum array entries.
*S** 01 #MAX-DP-ENTR(P3) CONST<3> /* Maximum disbursement pt entries.
*S** 01 #MAX-DP-PAGES(P3) CONST<4> /* Maximum disbursement pt pages.
*S***
*S*** Miscellaneous variables.
*S** 01 #TITLE(A40) INIT<'Distribution -'>
*S** 01 #FIRST-TIME(L) INIT<TRUE>
*S** 01 #TYPE-POS(P3)
*S** 01 #PGM-ID(A8)
*S** 01 #CURS-LINE(P5) /* Cursor select line.
*S** 01 #END-OF-DATA(L) /* End of logical read.
*S** 01 #END-OF-PAGE-LINE(P5) /* Line number where EOP starts.
*S** 01 #FIRST
*S** 02 #KY(A24) /* 1st KEY when looking for match.
*S** 01 #FIRST-INPUT(L) INIT<TRUE> /* Trigger End of Page.
*S** 01 #FIRST-KEY-FOUND(L) /* First unique value found.
*S** 01 #FIRST-TIME-REV(L) /* First reverse.
*S** 01 #FORWARD(L) INIT<TRUE> /* Not backwards left or right.
*S** 01 #BYPASS-READ(L) /* No paging
*S** 01 #SCROLLING(L) /* Paging
*S** 01 #SUB(P3)
*S** 01 #CNT(P3)
*S** 01 #CURS-COL(P3)
*S** 01 #AWARD-PROCESSED(L)
*S** 01 #ADD-AIDSTAT(L)
*S** 01 #FUND-EXPAND(L)
*S** 01 #SUB-PARM(A1)
*S** 01 #AWD-STAT(A1)
*S** 01 #NEXT(L)
*S** 01 #PASS-KEY(A30)
*S** 01 #PASS-TEMP(A30)
*S** 01 #SAVE-MSG(A79)
*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** /*
*S** /* Define input fields.
*S** 01 #INPUT /* Input key value.
*S** 02 #KY
*S** 03 WF-AID-YEAR(A4)
*S** 03 WF-FAO(A2)
*S** 03 WW-STUDENT-ID(A9)
*S** 03 WF-FUND-ID(A9)
*S** 02 REDEFINE #KY
*S** 03 #KY-RED(A24)
*S** 01 #END-KEY /* End of search key
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-FUND-ID(A9)
*S** 01 REDEFINE #END-KEY
*S** 02 #END-KEY-RED(A24)
*S** 01 #BEGIN-KEY /* Beginning of search key
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-FUND-ID(A9)
*S** 01 REDEFINE #BEGIN-KEY
*S** 02 #BEGIN-KEY-RED(A24)
*S***
*S** 01 #INSIDE-READ-LOOP(L) /* Executing statement inside read.
*S***
*S*** Value of the scroll key on current record
*S** 01 #KEY(A24) /* Key field of record.
*S** 01 #MATCH-FOUND(L) /* Matched Unique Id from table.
*S** 01 #NULL-KEY(A24) /* Empty key value.
*S** 01 #DP-INDX(P3) INIT<1> /* Disbursement index
*S** 01 #DP-SUB(P3) /* Disbursement subscript
*S** 01 #DP-START-PT(4) /* Disbursement starting point
*S** 02 #DP-START(P3) INIT<1,4,7,10> /* array
*S***
*S** 01 #SEL-INDX(P5) /* Select table index.
*S** 01 #SEL-TBL(1:#MAX-ARRAY-ENTR)
*S** 02 #KY(A24)
*S** 02 REDEFINE #KY
*S** 03 WF-AID-YEAR(A4)
*S** 03 WF-FAO(A2)
*S** 03 WW-STUDENT-ID(A9)
*S** 03 WF-FUND-ID(A9)
*S** 01 #SEL-KEY
*S** 02 WF-AID-YEAR(A4)
*S** 02 WF-FAO(A2)
*S** 02 WW-STUDENT-ID(A9)
*S** 02 WF-FUND-ID(A9)
*S** 01 REDEFINE #SEL-KEY
*S** 02 #SELECTED-KEY(A24) /* Key of selected record.
*S** /*
*S** /* Key value for starting position of read.
*S** 01 #START
*S** 02 #KY(A24)
*S** 01 #STD-KEY-PRESSED(L) /* Quit, Return, Flip, Main.
*S** 01 #TOP-OF-PAGE(L) /* Top of Page was triggered.
*S** 01 #END-DATA(L)
*S** /*
*S** 01 #DISPLAYED-KEY(A1) /* Used by WWSTDKEY LDA
*S** /*
*S** 01 #LOW-KY(A24)
*S** 01 #HIGH-KY(A24)
*S** /*
*S** 01 #EXPAND-LOGICALS
*S** 02 #OFF-EXPAND(L)
*S** 02 #ACC-EXPAND(L)
*S** 02 #DISB-EXPAND(L)
*S** /*
*S** 01 AWARD-ARRAY
*S** 02 WF-AWARD-DISB
*S** 03 WF-AW-D01-OFF (P5.2)
*S** 03 WF-AW-D01-ACC (P5.2)
*S** 03 WF-AW-D01-DIS (P5.2)
*S** 03 WF-AW-D02-OFF (P5.2)
*S** 03 WF-AW-D02-ACC (P5.2)
*S** 03 WF-AW-D02-DIS (P5.2)
*S** 03 WF-AW-D03-OFF (P5.2)
*S** 03 WF-AW-D03-ACC (P5.2)
*S** 03 WF-AW-D03-DIS (P5.2)
*S** 03 WF-AW-D04-OFF (P5.2)
*S** 03 WF-AW-D04-ACC (P5.2)
*S** 03 WF-AW-D04-DIS (P5.2)
*S** 03 WF-AW-D05-OFF (P5.2)
*S** 03 WF-AW-D05-ACC (P5.2)
*S** 03 WF-AW-D05-DIS (P5.2)
*S** 03 WF-AW-D06-OFF (P5.2)
*S** 03 WF-AW-D06-ACC (P5.2)
*S** 03 WF-AW-D06-DIS (P5.2)
*S** 03 WF-AW-D07-OFF (P5.2)
*S** 03 WF-AW-D07-ACC (P5.2)
*S** 03 WF-AW-D07-DIS (P5.2)
*S** 03 WF-AW-D08-OFF (P5.2)
*S** 03 WF-AW-D08-ACC (P5.2)
*S** 03 WF-AW-D08-DIS (P5.2)
*S** 03 WF-AW-D09-OFF (P5.2)
*S** 03 WF-AW-D09-ACC (P5.2)
*S** 03 WF-AW-D09-DIS (P5.2)
*S** 03 WF-AW-D10-OFF (P5.2)
*S** 03 WF-AW-D10-ACC (P5.2)
*S** 03 WF-AW-D10-DIS (P5.2)
*S** 03 WF-AW-D11-OFF (P5.2)
*S** 03 WF-AW-D11-ACC (P5.2)
*S** 03 WF-AW-D11-DIS (P5.2)
*S** 03 WF-AW-D12-OFF (P5.2)
*S** 03 WF-AW-D12-ACC (P5.2)
*S** 03 WF-AW-D12-DIS (P5.2)
*S** 02 REDEFINE WF-AWARD-DISB
*S** 03 WF-AW-DISBS(12)
*S** 04 WF-OFF (P5.2)
*S** 04 WF-ACC (P5.2)
*S** 04 WF-DIS (P5.2)
*S** /*
*S** 01 #ARRAYS /* Array of multiple records
*S** 02 #ARRAY-DATA
*S** 03 #AW-FUND(A9/1:#MAX-ARRAY-ENTR)
*S** 03 #AW-TITLE(A30/1:#MAX-ARRAY-ENTR)
*S** 03 #AW-DP(A9/1:#MAX-ARRAY-ENTR,1:#MAX-DP-ENTR)
*S** 03 #DP-TITLE(A10/1:#MAX-DP-ENTR)
*S** 02 #DETAIL-DATA
*S** 03 #AW-OFF(A9/1:12)
*S** 03 #AW-ACC(A9/1:12)
*S** 03 #AW-DIS(A9/1:12)
*S** 02 #ARRAY-CV
*S** 03 #AW-FUND-CV(C/1:#MAX-ARRAY-ENTR)
*S** 01 #HOLD-FIELDS
*S** 02 #STUDENT-ID(A9)
*S** 02 #STUDENT-ID-CV(C)
*S** 02 #REJ-ONLY(A1)
*S** 02 #REJ-ONLY-CV(C)
*S** 02 #OVERAWARD(A20)
*S** 02 #AW-ALL(A2)
*S** 02 #AW-ALL-CV(C)
*S** 02 #AW-ALL-F(L)
*S** 01 #SECURITY
*S** 02 #PROGRAM-MATCH(L)
*S** 02 #FILE-MATCH(L)
*S** 02 #TMP-PRIV(A1)
*S** 02 #CNTL-VAR(C)
*S** 01 #BYPASS-INPUT (L) /* Bypass
*S***
*S** 01 #ALL-AMOUNT(A9) /* Used by #AW-ALL processing
*S** 01 #ALL-DTL(A9/12) /* dummy fields for award call
*S***
*S**END-DEFINE
*S***
*S**FORMAT ES=ON /* ES suppresses (WRITE ' ') output,
*S** /* needed for newpage processing
*S**PERFORM INITIALIZATIONS
*S***
*S**DECIDE ON FIRST VALUE OF ##PASS-TEMP
*S** VALUE 'O'
*S** COMPRESS #TITLE 'Offered' INTO #TITLE
*S** VALUE 'A'
*S** COMPRESS #TITLE 'Accepted' INTO #TITLE
*S** VALUE 'D'
*S** COMPRESS #TITLE 'Disbursed' INTO #TITLE
*S** NONE
*S** IGNORE
*S**END-DECIDE
*S***
*S**DEFINE WINDOW AWARDTDT
*S** SIZE 17*79
*S** BASE 5 / 1
*S** TITLE #TITLE
*S** CONTROL SCREEN
*S** FRAMED(CD=NE)
*S** POSITION OFF
*S**ASSIGN ##COLOR = 'NE'
*S***
*S*************************************************************************
*S***
*S**PROG.
*S**REPEAT /* Repeat loop to allow escape of program from within subroutine.
*S** SET WINDOW 'AWARDTDT'
*S** IF #PANEL = 1 OR #FIRST-TIME
*S** RESET INITIAL #END-DATA
*S** RESET INITIAL #BEGIN-KEY
*S** MOVE BY NAME #BEGIN-KEY TO #INPUT.#KY
*S** ASSIGN #INPUT.WF-FUND-ID = ' '
*S** ASSIGN #INPUT.WF-AID-YEAR = ##AID-YEAR
*S** ASSIGN #INPUT.WW-STUDENT-ID = ##STUDENT-ID
*S** ASSIGN #INPUT.WF-FAO = ##FAO-ID
*S** MOVE BY NAME #INPUT TO #END-KEY
*S** MOVE BY NAME #INPUT TO #BEGIN-KEY
*S** MOVE ALL H'FF' TO #END-KEY.WF-FUND-ID
*S** ASSIGN #FORWARD = TRUE
*S** ASSIGN #FIRST-INPUT = TRUE
*S** RESET #FIRST-TIME
*S** /*
*S** /* Security
*S** MOVE 'WFAWARDD' TO ##FILE-ID
*S** MOVE 'WFAWSUMP' TO ##PGM-ID
*S** PERFORM AWARD-SECURITY AWARD-CNTL-VARS
*S** MOVE FUND-ID-CV TO #AW-FUND-CV(*)
*S** ASSIGN #INSIDE-READ-LOOP = FALSE
*S** END-IF
*S***
*S**NEW-READ.
*S** REPEAT /* Escape this repeat if no end of data processing.
*S** /*
*S** IF #PANEL = 1
*S** ASSIGN #START.#KY = #INPUT.#KY-RED
*S** ASSIGN #MATCH-FOUND = TRUE
*S** /*
*S** /* Very first time trigger a new page to input starting value.
*S** RESET #ARRAY-DATA #SEL-TBL(*)
*S** ##MSG ##MSG-DATA(*) ##RETURN-CODE
*S** /*
*S** /* Set first SEL-TBL key up as default
*S** ASSIGN #SEL-TBL.#KY(1) = #BEGIN-KEY-RED
*S** /*
*S** ASSIGN #SEL-INDX = 1
*S** RESET #END-DATA
*S** ASSIGN WFAWARDD-ID = #START.#KY
*S** IF #BYPASS-READ
*S** RESET #BYPASS-READ
*S** END-IF
*S** MOVE BY NAME WFAWARDD-ID.STRUCTURE TO WFAWARDD
*S** ASSIGN WWAOBJ.#FUNCTION = 'NEXT'
*S** ELSE
*S** ASSIGN #START.#KY = #SCROLL-TBL.#KY(#PANEL)
*S** ASSIGN WFAWARDD-ID = #START.#KY
*S** MOVE BY NAME WFAWARDD-ID.STRUCTURE TO WFAWARDD
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** ASSIGN #SEL-INDX = 1
*S** RESET #END-DATA
*S** END-IF
*S** /*
*S**READ-FILE. /* Escape this label if end of data processing is needed.
*S** REPEAT
*S** /*
*S** PERFORM CALL-OBJECT
*S** IF WFAWARDD-ID > #END-KEY-RED OR
*S** NOT WWAOBJ.#EXISTS
*S** ASSIGN #END-DATA = TRUE
*S** END-IF
*S** ASSIGN #INSIDE-READ-LOOP = TRUE
*S** IF #FIRST-INPUT
*S** RESET #FIRST-INPUT
*S** END-IF
*S** /*
*S** /* Assign #KEY to equal the descriptor utilized.
*S** ASSIGN #KEY = WFAWARDD-ID
*S** /*
*S** IF #SEL-INDX > #MAX-ARRAY-ENTR OR
*S** #END-DATA
*S** NEWPAGE EVEN IF TOP OF PAGE
*S** END-IF
*S** /*
*S** IF #SEL-INDX = 1
*S** RESET #ARRAY-DATA #SEL-TBL(*) ##MSG ##MSG-DATA(*) ##RETURN-CODE
*S** MOVE FUND-ID-CV TO #STUDENT-ID-CV
*S** MOVE #DP-START(#DP-INDX) TO #DP-SUB
*S** FOR #SUB = 1 TO 3
*S** MOVE ##SCHED-DP-TITLE(#DP-SUB) TO
*S** #DP-TITLE(#SUB)
*S** ADD 1 TO #DP-SUB
*S** END-FOR
*S** IF #SCROLLING
*S** RESET #SCROLLING
*S** IF #FORWARD
*S** ASSIGN WWAOBJ.#FUNCTION = 'NEXT'
*S** IF #END-DATA
*S** ESCAPE TOP
*S** END-IF
*S** ELSE
*S** /*
*S** /* 'Page-up' reset start key and process
*S** /* forward from there
*S** ASSIGN #START.#KY = #SCROLL-TBL.#KY(#PANEL)
*S** ASSIGN WFAWARDD-ID = #START.#KY
*S** MOVE BY NAME WFAWARDD-ID.STRUCTURE TO WFAWARDD
*S** ASSIGN WWAOBJ.#FUNCTION = 'GET'
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** END-IF
*S** END-IF
*S** /*
*S** /* Fill arrays
*S** MOVE WFAWARDD.WF-FUND-ID TO #AW-FUND(#SEL-INDX)
*S** MOVE 'WFAWARDD.WF-FUND-ID' TO #PASS-KEY
*S** MOVE WFAWARDD.WF-FUND-ID TO #PASS-TEMP
*S** PERFORM GET-VALUE-TRANSLATION #PASS-KEY #PASS-TEMP
*S** MOVE #PASS-TEMP TO #AW-TITLE(#SEL-INDX)
*S** MOVE PROTECTED-YE-ATTR TO #AW-FUND-CV(#SEL-INDX)
*S** /*
*S** /* Load hold arrays
*S** RESET #DETAIL-DATA
*S** MOVE BY NAME WFAWARDD TO AWARD-ARRAY
*S** FOR #SUB = 1 TO 12
*S** DECIDE FOR EVERY CONDITION
*S** WHEN WF-OFF(#SUB) NE 0
*S** MOVE EDITED WF-OFF(#SUB)(EM=ZZ,ZZZ.99) TO #AW-OFF(#SUB)
*S** WHEN WF-ACC(#SUB) NE 0
*S** MOVE EDITED WF-ACC(#SUB)(EM=ZZ,ZZZ.99) TO #AW-ACC(#SUB)
*S** WHEN WF-DIS(#SUB) NE 0
*S** MOVE EDITED WF-DIS(#SUB)(EM=ZZ,ZZZ.99) TO #AW-DIS(#SUB)
*S** WHEN NONE
*S** IGNORE
*S** END-DECIDE
*S** END-FOR
*S** /*
*S** /* Load disbursement point array
*S** MOVE #DP-START(#DP-INDX) TO #DP-SUB
*S** FOR #SUB = 1 TO 3
*S** DECIDE ON FIRST VALUE OF ##PASS-TEMP
*S** VALUE 'O'
*S** IF #DP-TITLE(#SUB) NE SPACE
*S** MOVE #AW-OFF(#DP-SUB) TO
*S** #AW-DP(#SEL-INDX,#SUB)
*S** END-IF
*S** VALUE 'A'
*S** IF #DP-TITLE(#SUB) NE SPACE
*S** MOVE #AW-ACC(#DP-SUB) TO
*S** #AW-DP(#SEL-INDX,#SUB)
*S** END-IF
*S** VALUE 'D'
*S** IF #DP-TITLE(#SUB) NE SPACE
*S** MOVE #AW-DIS(#DP-SUB) TO
*S** #AW-DP(#SEL-INDX,#SUB)
*S** END-IF
*S** NONE
*S** IGNORE
*S** END-DECIDE
*S** ADD 1 TO #DP-SUB
*S** END-FOR
*S** ASSIGN #SEL-TBL.#KY(#SEL-INDX) = #KEY
*S** ADD 1 TO #SEL-INDX
*S** /*
*S** /* Display headings and load the scrolling table with key and
*S** /* Unique record identifier for backward/sideways scrolling.
*S** AT TOP OF PAGE
*S** ASSIGN #TOP-OF-PAGE = TRUE
*S** ASSIGN #SEL-INDX = 1
*S** /*
*S** END-TOPPAGE
*S** /*
*S** /* Input the screen and check users PF keys.
*S** AT END OF PAGE
*S** /*
*S** IF #SAVE-MSG NE SPACE
*S** MOVE #SAVE-MSG TO ##MSG
*S** RESET #SAVE-MSG
*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** /*
*S** /*
*S** INPUT WITH TEXT ##MSG,
*S** ##MSG-DATA(1),##MSG-DATA(2),##MSG-DATA(3)
*S** USING MAP 'WFAWIDTM'
*S** /*
*S** INCLUDE WWSTDCHK /* Check standard pf-keys or '.' if first pos.
*S** IF *PF-KEY = WWKEYLDA.#SELECT-KEY
*S** ASSIGN #PANEL = 1
*S** ASSIGN #STD-KEY-PRESSED = TRUE
*S** END-IF
*S** /*
*S** /* Increment Scroll table if Retrn key pressed.
*S** /* (allows paging to be passed back to award term
*S** /* overview program)
*S** IF *PF-KEY = WWKEYLDA.#RETURN-KEY
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** END-IF
*S** IF #STD-KEY-PRESSED THEN
*S** ASSIGN #FORWARD = FALSE
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** /*
*S** IF *PF-KEY = 'ENTR'
*S** ESCAPE TOP
*S** END-IF
*S** /* Check scroll keys.
*S** IF NOT(*PF-KEY = 'ENTR' OR
*S** = WWKEYLDA.#FORWARD-KEY OR
*S** = WWKEYLDA.#BACKWARD-KEY OR
*S** = WWKEYLDA.#NOTEPAD-KEY OR
*S** = WWKEYLDA.#EXPAND-KEY OR
*S** = WWKEYLDA.#CALC-KEY OR
*S** = WWKEYLDA.#PRINT-KEY OR
*S** = WWKEYLDA.#SELECT-KEY) THEN
*S** REINPUT FULL 'Invalid program function key' ALARM
*S** END-IF
*S** ASSIGN #FORWARD = TRUE
*S** /*
*S** /* Process Keys
*S** /*
*S** /* Paging keys
*S** IF *PF-KEY = WWKEYLDA.#FORWARD-KEY
*S** IF #SEL-TBL.#KY(#MAX-ARRAY-ENTR) = SPACE
*S** REINPUT FULL 'Page not full, paging not required'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S** IF #PANEL + 1 > #MAX-PAGES
*S** REINPUT FULL 'Paging max reached'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** COMPUTE #PANEL = #PANEL + 1
*S** END-IF
*S** ASSIGN #SCROLLING = TRUE
*S** END-IF
*S** IF *PF-KEY = WWKEYLDA.#BACKWARD-KEY
*S** IF #PANEL - 1 = 0
*S** REINPUT FULL 'First page, cannot page backward'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** COMPUTE #PANEL = #PANEL - 1
*S** END-IF
*S** ASSIGN #SCROLLING = TRUE
*S** RESET #FORWARD
*S** #END-DATA
*S** END-IF
*S** IF *PF-KEY = WWKEYLDA.#CALC-KEY
*S** IF #DP-INDX - 1 = 0
*S** REINPUT FULL 'First disbursement page, cannot page left'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** COMPUTE #DP-INDX = #DP-INDX - 1
*S** END-IF
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** RESET #FORWARD
*S** #END-DATA
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** IF *PF-KEY = WWKEYLDA.#PRINT-KEY
*S** IF #DP-TITLE(#MAX-DP-ENTR) = SPACE
*S** REINPUT FULL 'Page not full, paging not required'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S** IF #DP-INDX + 1 > #MAX-DP-PAGES
*S** REINPUT FULL 'Paging max reached'
*S** MARK #MARK-FIELD ALARM
*S** ELSE
*S** COMPUTE #DP-INDX = #DP-INDX + 1
*S** END-IF
*S** IF ##SCHED-DP-TITLE(#DP-SUB) = SPACE
*S** REINPUT FULL 'End of disbursement points, paging not required'
*S** MARK #MARK-FIELD ALARM
*S** END-IF
*S** ASSIGN #SCROLL-TBL.#KY(#PANEL) = #SEL-TBL.#KY(1)
*S** RESET #FORWARD
*S** #END-DATA
*S** PERFORM EXIT-READ-LOOP
*S** END-IF
*S** /*
*S** END-ENDPAGE /* AT END OF PAGE
*S**END-REPEAT /* Find of file prime file.
*S** /*
*S** ASSIGN #INSIDE-READ-LOOP = FALSE
*S** ASSIGN #END-OF-DATA = TRUE
*S** /*
*S** IF #TOP-OF-PAGE
*S** NEWPAGE EVEN IF TOP OF PAGE
*S** ELSE
*S** WRITE NOTITLE ' '
*S** NEWPAGE
*S** END-IF
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE EXIT-READ-LOOP
*S*************************************************************************
*S***
*S** ESCAPE BOTTOM(NEW-READ.) IMMEDIATE
*S**END-SUBROUTINE /* EXIT-READ-LOOP
*S***
*S** END-REPEAT /* NEW-READ.
*S** IF #STD-KEY-PRESSED THEN
*S** RESET #STD-KEY-PRESSED
*S** IF *PF-KEY = WWKEYLDA.#FLIP-KEY
*S** ASSIGN #FORWARD = TRUE
*S** ASSIGN #BYPASS-READ = TRUE
*S** END-IF
*S** INCLUDE WWSTDKEY /* Check standard pf-keys or '.' if first pos.
*S** END-IF
*S** /*
*S** /* If a record was selected process the record and reposition.
*S** IF #SELECTED-KEY NE #NULL-KEY THEN
*S** /*
*S** /* Processing to be performed after a record has been selected.
*S** IF *PF-KEY = WWKEYLDA.#EXPAND-KEY
*S** /*
*S** IGNORE
*S** ELSE
*S** IGNORE
*S** END-IF
*S** RESET #SELECTED-KEY
*S** END-IF
*S**END-REPEAT /* PROG.
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CALL-OBJECT
*S*************************************************************************
*S***
*S*** Call WF-AWARD Object subprogram
*S** CALLNAT 'WFAWARDO' WW-GDA
*S** WFAWARDD
*S** WFAWARDD-ID
*S** WFAWARDR
*S** WWAOBJ
*S** ASSIGN WWAOBJ.#FUNCTION = 'NEXT'
*S**END-SUBROUTINE /* CALL-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE FINAL-PROCESSING
*S*************************************************************************
*S***
*S*** Populate WW-PDA from WW-GDA
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S***
*S** INCLUDE WWEND /* Restore environment.
*S***
*S*** Return to the calling object.
*S** IF *PF-KEY = WWKEYLDA.#RETURN-KEY THEN
*S** SET CONTROL 'K0'
*S** END-IF
*S**END-SUBROUTINE /* FINAL-PROCESSING
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE INITIALIZATIONS
*S*************************************************************************
*S***
*S*** Populate WW-GDA from WW-PDA
*S** MOVE BY POSITION WW-PDA TO WW-GDA
*S***
*S** INCLUDE WWBEGIN /* Capture environment.
*S** SET CONTROL 'WBM'
*S***
*S** MOVE NORMAL-ATTR TO #STUDENT-ID-CV
*S***
*S*** Required Fields
*S** MOVE '##SID' TO REQUIRED-FIELD(1)
*S** MOVE '##FAO-ID' TO REQUIRED-FIELD(2)
*S** MOVE '##AID-YEAR' TO REQUIRED-FIELD(3)
*S** MOVE '##TERM' TO REQUIRED-FIELD(4)
*S** PERFORM REQUIRED-FIELD-CHECK REQUIRED-FIELD(*)
*S***
*S*** Specify which PF-KEYS are valid by using RESET INITIAL.
*S** INCLUDE WWPFSTD /* Standard PF-Keys
*S** INCLUDE WWPFUD /* Standard paging keys
*S** RESET WWKEYLDA.#SELECT-KEY
*S** RESET INITIAL WWKEYLDA.#NOTEPAD-KEY
*S** /*
*S** /* Calc and Print keys (PF5 and PF6) used
*S** /* for left and right paging
*S** WWKEYLDA.#CALC-KEY
*S** WWKEYLDA.#PRINT-KEY
*S** PERFORM SET-KEYS
*S**END-SUBROUTINE /* INITIALIZATIONS
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE SET-KEYS
*S*************************************************************************
*S***
*S** INCLUDE WWSETKEY /* Set specified keys.
*S** INCLUDE WWSETHLP /* Set PFN=Help
*S** SET KEY PF5 NAMED 'Pg-Le'
*S** SET KEY PF6 NAMED 'Pg-Ri'
*S**END-SUBROUTINE /* SET-KEYS
*S***
*S**PERFORM FINAL-PROCESSING
*S**END
Number of differences: 6
Added(8,1)
Deleted(4,1)
Changed(3)
Changed in changed(2)
Ignored