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
|
*S****SAG GENERATOR: WW-OBJECT-SUBP Version: 3.2.2
*S****SAG TITLE: WFVER15O
*S****SAG SYSTEM: FINANCIER
*S****SAG OBJECT-DESC: record
*S****SAG PRIME-FILE: WF-VERIFY-1415
*S****SAG PRIME-KEY: WF-VERIFY-KEY
*S****SAG HOLD-FIELD: WW-HOLD
*S****SAG OBJECT-PDA: WFVER15D
*S****SAG RESTRICTED-PDA: WFVER15R
*S****SAG DESCS(1): This subprogram performs I/O functions for the
*S****SAG DESCS(2): WF-VERIFY-1415 userview/file using the
*S****SAG DESCS(3): WF-VERIFY-KEY primary superdescriptor.
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Subprogram: WFVER15O
*S*** System : FINANCIER
*S*** Title : WFVER15O
*S*** Function : This subprogram performs I/O functions for the
*S*** WF-VERIFY-1415 userview/file using the
*S*** WF-VERIFY-KEY primary superdescriptor.
*S***
*S***
*S*** Copyright 1995 - 2013 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S** PARAMETER USING WWPDA
*S***
*S** PARAMETER USING WFVER15D
*S** PARAMETER USING WFVER15R
*S** PARAMETER USING WWAOBJ
*S***
*S** LOCAL
*S***
*S*** Miscellaneous local variables.
*S** 01 #CURRENT-FIELD(A32) /* Current field name being proccessed
*S** 01 #DB-CALL(A1) /* D=Delete, U=Update, S=Store
*S** 01 #D1(P3) /* Temporary indices for MU and PE
*S** 01 #D2(P3)
*S** 01 #OBJECT(A20) INIT<'record'>
*S** 01 #OLD-REC(L) /* Record existed before.
*S** 01 #SAVE-REC(L) /* True if record is non-null.
*S** 01 #DISP-BACKOUT(L) INIT<TRUE> /* Display message on BACKOUT TRANS
*S** 01 #SAVE-MSG(A79) /* Save previously defined messages
*S***
*S*** Views used to build object.
*S***
*S*** View for histogram on NEXT action.
*S** 01 NEXT-VIEW VIEW OF WF-VERIFY-1415
*S** 02 WF-VERIFY-KEY
*S***
*S*** Primary object entity.
*S** 01 WF-VERIFY-1415 VIEW OF WF-VERIFY-1415
*S** 02 WW-STUDENT-ID
*S** 02 WF-FAO
*S** 02 WW-SYSTEM
*S** 03 WW-HOLD
*S** 03 WW-CDATE
*S** 03 WW-MDATE
*S** 02 WF-VERIFY-CONTROL
*S** 03 WF-VE-VER-INS
*S** 03 WF-VE-VER
*S** 03 WF-VE-VER-FED
*S** 03 WF-VE-VER-DATE
*S** 03 WF-VE-VER-TRAN
*S** 03 WF-VE-VER-REVER
*S** 03 WF-VE-INS-REQD
*S** 03 WF-VE-INS-STAT
*S** 03 WF-VE-INS-DATE
*S** 03 WF-VE-VET-REQD
*S** 03 WF-VE-VET-STAT
*S** 03 WF-VE-VET-DATE
*S** 02 WF-VERIFY-STU-ATT
*S** 03 WF-VE-S-CIT
*S** 03 WF-VE-S-RES
*S** 03 WF-VE-S-MAR
*S** 03 WF-VE-S-FAM-SIZE
*S** 03 WF-VE-S-FAM-COL
*S** 03 WF-VE-S-DLW
*S** 03 WF-VE-S-MT-SSI
*S** 03 WF-VE-S-MT-SNAP
*S** 03 WF-VE-S-MT-LUNCH
*S** 03 WF-VE-S-MT-TANF
*S** 03 WF-VE-S-MT-WIC
*S** 03 WF-VE-S-TEST-DOB
*S** 03 WF-VE-S-TEST-GRAD
*S** 03 WF-VE-S-TEST-MAR
*S** 03 WF-VE-S-TEST-CHL
*S** 03 WF-VE-S-TEST-DEP
*S** 03 WF-VE-S-TEST-ORPH
*S** 03 WF-VE-S-TEST-VET
*S** 03 WF-VE-S-TEST-ACTV
*S** 03 WF-VE-S-TEST-EMAN
*S** 03 WF-VE-S-TEST-GUAR
*S** 03 WF-VE-S-TEST-UYSD
*S** 03 WF-VE-S-TEST-UYHU
*S** 03 WF-VE-S-TEST-HMLS
*S** 03 WF-VE-S-HS-COMP
*S** 03 WF-VE-S-SEP
*S** 02 WF-VERIFY-STU-INC
*S** 03 WF-VE-S-FILER
*S** 03 WF-VE-S-FORM
*S** 03 WF-VE-S-FILE-STAT
*S** 03 WF-VE-S-SFORM
*S** 03 WF-VE-S-TAX-EXEM
*S** 03 WF-VE-S-AGI
*S** 03 WF-VE-S-FED-TAX
*S** 03 WF-VE-S-ST-INC
*S** 03 WF-VE-S-SP-INC
*S** 03 WF-VE-S-A-EDCR
*S** 03 WF-VE-S-A-CSPD
*S** 03 WF-VE-S-A-WORK
*S** 03 WF-VE-S-A-GRNT
*S** 03 WF-VE-S-A-CPAY
*S** 03 WF-VE-S-A-COOP
*S** 03 WF-VE-S-U-PEN
*S** 03 WF-VE-S-U-IRA
*S** 03 WF-VE-S-U-CSUP
*S** 03 WF-VE-S-U-INT
*S** 03 WF-VE-S-U-DIST
*S** 03 WF-VE-S-U-PENS
*S** 03 WF-VE-S-U-LIV
*S** 03 WF-VE-S-U-VET
*S** 03 WF-VE-S-U-OTHER
*S** 03 WF-VE-S-U-MONEY
*S** 03 WF-VE-S-UNTAXED
*S** 02 WF-VERIFY-STU-AST
*S** 03 WF-VE-S-CASH
*S** 03 WF-VE-S-INV
*S** 03 WF-VE-S-BUS-FRM
*S** 02 WF-VERIFY-PAR-ATT
*S** 03 WF-VE-P-RES
*S** 03 WF-VE-P-MAR
*S** 03 WF-VE-P-FAM-SIZE
*S** 03 WF-VE-P-FAM-COL
*S** 03 WF-VE-P-DLW
*S** 03 WF-VE-P-MT-SSI
*S** 03 WF-VE-P-MT-SNAP
*S** 03 WF-VE-P-MT-LUNCH
*S** 03 WF-VE-P-MT-TANF
*S** 03 WF-VE-P-MT-WIC
*S** 02 WF-VERIFY-PAR-INC
*S** 03 WF-VE-P-FILER
*S** 03 WF-VE-P-FORM
*S** 03 WF-VE-P-FILE-STAT
*S** 03 WF-VE-P-SFORM
*S** 03 WF-VE-P-TAX-EXEM
*S** 03 WF-VE-P-AGI
*S** 03 WF-VE-P-FED-TAX
*S** 03 WF-VE-P-P1-INC
*S** 03 WF-VE-P-P2-INC
*S** 03 WF-VE-P-A-EDCR
*S** 03 WF-VE-P-A-CSPD
*S** 03 WF-VE-P-A-WORK
*S** 03 WF-VE-P-A-GRNT
*S** 03 WF-VE-P-A-CPAY
*S** 03 WF-VE-P-A-COOP
*S** 03 WF-VE-P-U-PEN
*S** 03 WF-VE-P-U-IRA
*S** 03 WF-VE-P-U-CSUP
*S** 03 WF-VE-P-U-INT
*S** 03 WF-VE-P-U-DIST
*S** 03 WF-VE-P-U-PENS
*S** 03 WF-VE-P-U-LIV
*S** 03 WF-VE-P-U-VET
*S** 03 WF-VE-P-U-OTHER
*S** 03 WF-VE-P-UNTAXED
*S** 02 WF-VERIFY-PAR-AST
*S** 03 WF-VE-P-CASH
*S** 03 WF-VE-P-INV
*S** 03 WF-VE-P-BUS-FRM
*S**END-DEFINE
*S***
*S***
*S*** Populate WW-GDA from WW-PDA
*S**MOVE BY POSITION WW-PDA TO WW-GDA
*S***
*S***
*S*** Initialize output fields.
*S**ASSIGN #SAVE-MSG = ##MSG
*S**RESET WWAOBJ.OUTPUTS ##MSG ##MSG-DATA(*) ##RETURN-CODE
*S***
*S*** Build up prime key of the object.
*S**MOVE BY NAME WFVER15D TO WFVER15D-ID.STRUCTURE
*S***
*S*************************************************************************
*S***
*S*** Set up repeat to allow escape from within a subroutine.
*S**PROG.
*S**REPEAT
*S***
*S*** Decide what to do based on function supplied.
*S** DECIDE ON FIRST VALUE WWAOBJ.#FUNCTION
*S** VALUE 'GET' /* Read the object
*S** /*
*S** /* Object exists, get object
*S** PERFORM GET-OBJECT
*S** PERFORM SET-OBJECT-ID
*S** VALUE 'NEXT' /* Read the next higher object
*S** /*
*S** /* Histogram for next higher value from one in object.
*S** HISTOGRAM(2) NEXT-VIEW FOR WF-VERIFY-KEY
*S** STARTING FROM WFVER15D-ID
*S** IF NEXT-VIEW.WF-VERIFY-KEY NE WFVER15D-ID THEN
*S** ASSIGN WFVER15D-ID = NEXT-VIEW.WF-VERIFY-KEY
*S** MOVE BY NAME WFVER15D-ID.STRUCTURE TO WFVER15D
*S** PERFORM GET-OBJECT
*S** ASSIGN ##MSG-DATA(1) = #OBJECT
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-HISTOGRAM
*S** /*
*S** /* No records beyond current record.
*S** IF NOT WWAOBJ.#EXISTS
*S** ASSIGN ##MSG = 'End of data reached'
*S** ASSIGN ##RETURN-CODE = 'W' /* Warning.
*S** END-IF
*S** VALUE 'UPDATE','DELETE' /* Modify or purge current object
*S** /*
*S** /* Make sure the record was held prior to updating.
*S** IF WFVER15D-ID NE WFVER15R.HELD-ID THEN
*S** ASSIGN ##MSG = 'Record not in held status'
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** PERFORM HOLD-OBJECT
*S** PERFORM SET-OBJECT-ID
*S** IF WWAOBJ.#FUNCTION = 'DELETE'
*S** ASSIGN ##MSG = 'Record purged successfully'
*S** END-IF
*S** VALUE 'EXISTS' /* Existence check
*S** PERFORM CLEAR
*S** PERFORM CHECK-EXISTENCE
*S** VALUE 'STORE' /* Add new object
*S** PERFORM CREATE-OBJECT
*S** PERFORM SET-OBJECT-ID
*S** VALUE 'INITIALIZE'
*S** PERFORM CLEAR
*S** ANY
*S** PERFORM RELOAD-MSG
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE /* All done.
*S** NONE /* Unknown action code
*S** ASSIGN ##MSG-DATA(1) = #OBJECT
*S** ASSIGN ##MSG-DATA(2) = WWAOBJ.#FUNCTION
*S** ASSIGN ##MSG = 'Invalid:1:function specified::2:'
*S** PERFORM PROCESS-ERROR
*S** END-DECIDE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE PROCESS-ERROR
*S*************************************************************************
*S***
*S** IF ##MSG-DATA(1) = ' ' /* Set default for :1:.
*S** PERFORM SET-OBJECT-ID
*S** END-IF
*S** ASSIGN ##RETURN-CODE = 'E' /* Error.
*S** IF #DISP-BACKOUT
*S** WRITE 'Issuing Backout transaction for action:' #FUNCTION
*S** / ' in subprogram' *PROGRAM
*S** END-IF
*S** BACKOUT TRANSACTION
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S**END-SUBROUTINE /* PROCESS-ERROR
*S***
*S**END-REPEAT
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CREATE-OBJECT
*S*************************************************************************
*S***
*S** ASSIGN WFVER15D.WW-CDATE = *DATX
*S***
*S*** Don't allow the key to be null.
*S** IF WFVER15D-ID = NEXT-VIEW.WF-VERIFY-KEY /* Compare with null
*S** ASSIGN ##MSG-DATA(1) = #OBJECT
*S** ASSIGN ##MSG = ':1:identifier is required'
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** /*
*S** /* If object already exist, return with error.
*S** PERFORM CHECK-EXISTENCE
*S** IF WWAOBJ.#EXISTS THEN
*S** ASSIGN ##MSG = ':1:already exists'
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** PERFORM EDIT-OBJECT /* Pre-edit object header
*S** ASSIGN WF-VERIFY-1415.WW-HOLD = *TIMN
*S** ASSIGN WFVER15R.INTERVENING-UPD-FLD =
*S** WF-VERIFY-1415.WW-HOLD
*S** ASSIGN WFVER15R.HELD-ID = WFVER15D-ID
*S** STORE WF-VERIFY-1415
*S**END-SUBROUTINE /* CREATE-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE GET-OBJECT
*S*************************************************************************
*S***
*S*** Get the primary object record.
*S** PERFORM CLEAR
*S** FIND WF-VERIFY-1415 WITH WF-VERIFY-KEY = WFVER15D-ID
*S** IF NO RECORDS FOUND
*S** /*
*S** /* Return the fact that the object does not exist.
*S** ESCAPE ROUTINE
*S** END-NOREC
*S** ASSIGN WWAOBJ.#EXISTS = TRUE
*S** /*
*S** /* "Hold" the record by capturing the value of the update flag.
*S** ASSIGN WFVER15R.INTERVENING-UPD-FLD =
*S** WF-VERIFY-1415.WW-HOLD
*S** /*
*S** /* Shift primary entity information to object
*S** MOVE BY NAME WF-VERIFY-1415 TO WFVER15D
*S** ASSIGN WFVER15R.HELD-ID = WFVER15D-ID
*S** END-FIND
*S**END-SUBROUTINE /* GET-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE HOLD-OBJECT
*S*************************************************************************
*S***
*S*** Get primary entity and process it.
*S** HOLD-PRIME.
*S** FIND WF-VERIFY-1415 WITH
*S** WF-VERIFY-KEY = WFVER15D-ID
*S** IF NO RECORDS FOUND
*S** /*
*S** /* Trying to process an object that doesn't exist.
*S** ASSIGN ##MSG = 'Intervening purge, please try again'
*S** RESET WFVER15R
*S** PERFORM PROCESS-ERROR
*S** END-NOREC
*S** IF WFVER15R.INTERVENING-UPD-FLD NE
*S** WF-VERIFY-1415.WW-HOLD THEN
*S** ASSIGN ##MSG = 'Intervening update, please try again'
*S** RESET WFVER15R
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** ASSIGN WWAOBJ.#EXISTS = TRUE
*S** PERFORM EDIT-OBJECT /* Pre-edit object header
*S** DECIDE ON EVERY VALUE WWAOBJ.#FUNCTION
*S** VALUE 'UPDATE'
*S** ASSIGN WF-VERIFY-1415.WW-HOLD = *TIMN
*S** ASSIGN WF-VERIFY-1415.WW-MDATE = *DATX
*S** ASSIGN WFVER15R.INTERVENING-UPD-FLD =
*S** WF-VERIFY-1415.WW-HOLD
*S** UPDATE(HOLD-PRIME.)
*S** VALUE 'DELETE'
*S** DELETE(HOLD-PRIME.)
*S** RESET WFVER15R.HELD-ID
*S** NONE IGNORE
*S** END-DECIDE
*S** END-FIND
*S**END-SUBROUTINE /* HOLD-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CHECK-AND-UPDATE-OBJECT /* Process all sub-entities
*S*************************************************************************
*S***
*S** ESCAPE ROUTINE /* No sub-entities
*S**END-SUBROUTINE /* CHECK-AND-UPDATE-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE EDIT-OBJECT
*S*************************************************************************
*S***
*S** IF WWAOBJ.#FUNCTION = 'UPDATE' OR = 'STORE'
*S** /*
*S** /* Load file view
*S** MOVE BY NAME WFVER15D TO WF-VERIFY-1415
*S** END-IF
*S**END-SUBROUTINE /* EDIT-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CHECK-EXISTENCE
*S*************************************************************************
*S***
*S*** Check whether object currently exists.
*S** EXISTENCE-CHECK.
*S** HISTOGRAM(1) NEXT-VIEW FOR WF-VERIFY-KEY
*S** FROM WFVER15D-ID THRU WFVER15D-ID
*S** ASSIGN WWAOBJ.#EXISTS = TRUE
*S** END-HISTOGRAM
*S**END-SUBROUTINE /* CHECK-EXISTENCE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CLEAR
*S*************************************************************************
*S***
*S** MOVE BY NAME WFVER15D TO WFVER15D-ID.STRUCTURE /* Capture key.
*S** RESET WFVER15D WFVER15R
*S** MOVE BY NAME WFVER15D-ID.STRUCTURE TO WFVER15D /* Restore key.
*S**END-SUBROUTINE /* CLEAR
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE GET-DB-CALL
*S*************************************************************************
*S***
*S**INCLUDE WWDBCALL
*S**END-SUBROUTINE /* GET-DB-CALL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE SET-OBJECT-ID
*S*************************************************************************
*S***
*S** COMPRESS WFVER15D.WF-FAO
*S** '-' WFVER15D.WW-STUDENT-ID
*S** TO ##MSG-DATA(1) LEAVING NO
*S** COMPRESS #OBJECT ##MSG-DATA(1) TO ##MSG-DATA(1)
*S**END-SUBROUTINE /* SET-OBJECT-ID
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE RELOAD-MSG
*S*************************************************************************
*S***
*S*** If no messages set in subprogram, reset passed message
*S** IF ##MSG = ' '
*S** ASSIGN ##MSG = #SAVE-MSG
*S** END-IF
*S**END-SUBROUTINE /* RELOAD-MSG
*S**END
|
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
|
*S****SAG GENERATOR: WW-OBJECT-SUBP Version: 3.2.2
*S****SAG TITLE: WFVER15O
*S****SAG SYSTEM: FINANCIER
*S****SAG OBJECT-DESC: record
*S****SAG PRIME-FILE: WF-VERIFY-1415
*S****SAG PRIME-KEY: WF-VERIFY-KEY
*S****SAG HOLD-FIELD: WW-HOLD
*S****SAG OBJECT-PDA: WFVER15D
*S****SAG RESTRICTED-PDA: WFVER15R
*S****SAG DESCS(1): This subprogram performs I/O functions for the
*S****SAG DESCS(2): WF-VERIFY-1415 userview/file using the
*S****SAG DESCS(3): WF-VERIFY-KEY primary superdescriptor.
*S*************************************************************************
*S***
*S*** WolffPack
*S***
*S*** Subprogram: WFVER15O
*S*** System : FINANCIER
*S*** Title : WFVER15O
*S*** Function : This subprogram performs I/O functions for the
*S*** WF-VERIFY-1415 userview/file using the
*S*** WF-VERIFY-KEY primary superdescriptor.
*S***
*S***
*S*** Copyright 1995 - 2013 WolffPack, Inc. All rights reserved.
*S***
*S*************************************************************************
*S**DEFINE DATA
*S** GLOBAL USING WWGDA
*S** PARAMETER USING WWPDA
*S***
*S** PARAMETER USING WFVER15D
*S** PARAMETER USING WFVER15R
*S** PARAMETER USING WWAOBJ
*S***
*S** LOCAL
*S***
*S*** Miscellaneous local variables.
*S** 01 #CURRENT-FIELD(A32) /* Current field name being proccessed
*S** 01 #DB-CALL(A1) /* D=Delete, U=Update, S=Store
*S** 01 #D1(P3) /* Temporary indices for MU and PE
*S** 01 #D2(P3)
*S** 01 #OBJECT(A20) INIT<'record'>
*S** 01 #OLD-REC(L) /* Record existed before.
*S** 01 #SAVE-REC(L) /* True if record is non-null.
*S** 01 #DISP-BACKOUT(L) INIT<TRUE> /* Display message on BACKOUT TRANS
*S** 01 #SAVE-MSG(A79) /* Save previously defined messages
*S***
*S*** Views used to build object.
*S***
*S*** View for histogram on NEXT action.
*S** 01 NEXT-VIEW VIEW OF WF-VERIFY-1415
*S** 02 WF-VERIFY-KEY
*S***
*S*** Primary object entity.
*S** 01 WF-VERIFY-1415 VIEW OF WF-VERIFY-1415
*S** 02 WW-STUDENT-ID
*S** 02 WF-FAO
*S** 02 WW-SYSTEM
*S** 03 WW-HOLD
*S** 03 WW-CDATE
*S** 03 WW-MDATE
*S** 02 WF-VERIFY-CONTROL
*S** 03 WF-VE-VER-INS
*S** 03 WF-VE-VER
*S** 03 WF-VE-VER-FED
*S** 03 WF-VE-VER-DATE
*S** 03 WF-VE-VER-TRAN
*S** 03 WF-VE-VER-REVER
*S** 03 WF-VE-INS-REQD
*S** 03 WF-VE-INS-STAT
*S** 03 WF-VE-INS-DATE
*S** 03 WF-VE-VET-REQD
*S** 03 WF-VE-VET-STAT
*S** 03 WF-VE-VET-DATE
*S** 02 WF-VERIFY-STU-ATT
*S** 03 WF-VE-S-CIT
*S** 03 WF-VE-S-RES
*S** 03 WF-VE-S-MAR
*S** 03 WF-VE-S-FAM-SIZE
*S** 03 WF-VE-S-FAM-COL
*S** 03 WF-VE-S-DLW
*S** 03 WF-VE-S-MT-SSI
*S** 03 WF-VE-S-MT-SNAP
*S** 03 WF-VE-S-MT-LUNCH
*S** 03 WF-VE-S-MT-TANF
*S** 03 WF-VE-S-MT-WIC
*S** 03 WF-VE-S-TEST-DOB
*S** 03 WF-VE-S-TEST-GRAD
*S** 03 WF-VE-S-TEST-MAR
*S** 03 WF-VE-S-TEST-CHL
*S** 03 WF-VE-S-TEST-DEP
*S** 03 WF-VE-S-TEST-ORPH
*S** 03 WF-VE-S-TEST-VET
*S** 03 WF-VE-S-TEST-ACTV
*S** 03 WF-VE-S-TEST-EMAN
*S** 03 WF-VE-S-TEST-GUAR
*S** 03 WF-VE-S-TEST-UYSD
*S** 03 WF-VE-S-TEST-UYHU
*S** 03 WF-VE-S-TEST-HMLS
*S** 03 WF-VE-S-HS-COMP
*S** 03 WF-VE-S-SEP
*S** 02 WF-VERIFY-STU-INC
*S** 03 WF-VE-S-FILER
*S** 03 WF-VE-S-FORM
*S** 03 WF-VE-S-FILE-STAT
*S** 03 WF-VE-S-SFORM
*S** 03 WF-VE-S-TAX-EXEM
*S** 03 WF-VE-S-AGI
*S** 03 WF-VE-S-FED-TAX
*S** 03 WF-VE-S-ST-INC
*S** 03 WF-VE-S-SP-INC
*S** 03 WF-VE-S-A-EDCR
*S** 03 WF-VE-S-A-CSPD
*S** 03 WF-VE-S-A-WORK
*S** 03 WF-VE-S-A-GRNT
*S** 03 WF-VE-S-A-CPAY
*S** 03 WF-VE-S-A-COOP
*S** 03 WF-VE-S-U-PEN
*S** 03 WF-VE-S-U-IRA
*S** 03 WF-VE-S-U-CSUP
*S** 03 WF-VE-S-U-INT
*S** 03 WF-VE-S-U-DIST
*S** 03 WF-VE-S-U-PENS
*S** 03 WF-VE-S-U-LIV
*S** 03 WF-VE-S-U-VET
*S** 03 WF-VE-S-U-OTHER
*S** 03 WF-VE-S-U-MONEY
*S** 03 WF-VE-S-UNTAXED
*S** 02 WF-VERIFY-STU-AST
*S** 03 WF-VE-S-CASH
*S** 03 WF-VE-S-INV
*S** 03 WF-VE-S-BUS-FRM
*S** 02 WF-VERIFY-PAR-ATT
*S** 03 WF-VE-P-RES
*S** 03 WF-VE-P-MAR
*S** 03 WF-VE-P-FAM-SIZE
*S** 03 WF-VE-P-FAM-COL
*S** 03 WF-VE-P-DLW
*S** 03 WF-VE-P-MT-SSI
*S** 03 WF-VE-P-MT-SNAP
*S** 03 WF-VE-P-MT-LUNCH
*S** 03 WF-VE-P-MT-TANF
*S** 03 WF-VE-P-MT-WIC
*S** 02 WF-VERIFY-PAR-INC
*S** 03 WF-VE-P-FILER
*S** 03 WF-VE-P-FORM
*S** 03 WF-VE-P-FILE-STAT
*S** 03 WF-VE-P-SFORM
*S** 03 WF-VE-P-TAX-EXEM
*S** 03 WF-VE-P-AGI
*S** 03 WF-VE-P-FED-TAX
*S** 03 WF-VE-P-P1-INC
*S** 03 WF-VE-P-P2-INC
*S** 03 WF-VE-P-A-EDCR
*S** 03 WF-VE-P-A-CSPD
*S** 03 WF-VE-P-A-WORK
*S** 03 WF-VE-P-A-GRNT
*S** 03 WF-VE-P-A-CPAY
*S** 03 WF-VE-P-A-COOP
*S** 03 WF-VE-P-U-PEN
*S** 03 WF-VE-P-U-IRA
*S** 03 WF-VE-P-U-CSUP
*S** 03 WF-VE-P-U-INT
*S** 03 WF-VE-P-U-DIST
*S** 03 WF-VE-P-U-PENS
*S** 03 WF-VE-P-U-LIV
*S** 03 WF-VE-P-U-VET
*S** 03 WF-VE-P-U-OTHER
*S** 03 WF-VE-P-UNTAXED
*S** 02 WF-VERIFY-PAR-AST
*S** 03 WF-VE-P-CASH
*S** 03 WF-VE-P-INV
*S** 03 WF-VE-P-BUS-FRM
*S** 02 WF-IDENT-VERIF
*S** 03 WF-VE-ID-VER-RSLTS
*S**END-DEFINE
*S***
*S***
*S*** Populate WW-GDA from WW-PDA
*S**MOVE BY POSITION WW-PDA TO WW-GDA
*S***
*S***
*S*** Initialize output fields.
*S**ASSIGN #SAVE-MSG = ##MSG
*S**RESET WWAOBJ.OUTPUTS ##MSG ##MSG-DATA(*) ##RETURN-CODE
*S***
*S*** Build up prime key of the object.
*S**MOVE BY NAME WFVER15D TO WFVER15D-ID.STRUCTURE
*S***
*S*************************************************************************
*S***
*S*** Set up repeat to allow escape from within a subroutine.
*S**PROG.
*S**REPEAT
*S***
*S*** Decide what to do based on function supplied.
*S** DECIDE ON FIRST VALUE WWAOBJ.#FUNCTION
*S** VALUE 'GET' /* Read the object
*S** /*
*S** /* Object exists, get object
*S** PERFORM GET-OBJECT
*S** PERFORM SET-OBJECT-ID
*S** VALUE 'NEXT' /* Read the next higher object
*S** /*
*S** /* Histogram for next higher value from one in object.
*S** HISTOGRAM(2) NEXT-VIEW FOR WF-VERIFY-KEY
*S** STARTING FROM WFVER15D-ID
*S** IF NEXT-VIEW.WF-VERIFY-KEY NE WFVER15D-ID THEN
*S** ASSIGN WFVER15D-ID = NEXT-VIEW.WF-VERIFY-KEY
*S** MOVE BY NAME WFVER15D-ID.STRUCTURE TO WFVER15D
*S** PERFORM GET-OBJECT
*S** ASSIGN ##MSG-DATA(1) = #OBJECT
*S** ESCAPE BOTTOM
*S** END-IF
*S** END-HISTOGRAM
*S** /*
*S** /* No records beyond current record.
*S** IF NOT WWAOBJ.#EXISTS
*S** ASSIGN ##MSG = 'End of data reached'
*S** ASSIGN ##RETURN-CODE = 'W' /* Warning.
*S** END-IF
*S** VALUE 'UPDATE','DELETE' /* Modify or purge current object
*S** /*
*S** /* Make sure the record was held prior to updating.
*S** IF WFVER15D-ID NE WFVER15R.HELD-ID THEN
*S** ASSIGN ##MSG = 'Record not in held status'
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** PERFORM HOLD-OBJECT
*S** PERFORM SET-OBJECT-ID
*S** IF WWAOBJ.#FUNCTION = 'DELETE'
*S** ASSIGN ##MSG = 'Record purged successfully'
*S** END-IF
*S** VALUE 'EXISTS' /* Existence check
*S** PERFORM CLEAR
*S** PERFORM CHECK-EXISTENCE
*S** VALUE 'STORE' /* Add new object
*S** PERFORM CREATE-OBJECT
*S** PERFORM SET-OBJECT-ID
*S** VALUE 'INITIALIZE'
*S** PERFORM CLEAR
*S** ANY
*S** PERFORM RELOAD-MSG
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE /* All done.
*S** NONE /* Unknown action code
*S** ASSIGN ##MSG-DATA(1) = #OBJECT
*S** ASSIGN ##MSG-DATA(2) = WWAOBJ.#FUNCTION
*S** ASSIGN ##MSG = 'Invalid:1:function specified::2:'
*S** PERFORM PROCESS-ERROR
*S** END-DECIDE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE PROCESS-ERROR
*S*************************************************************************
*S***
*S** IF ##MSG-DATA(1) = ' ' /* Set default for :1:.
*S** PERFORM SET-OBJECT-ID
*S** END-IF
*S** ASSIGN ##RETURN-CODE = 'E' /* Error.
*S** IF #DISP-BACKOUT
*S** WRITE 'Issuing Backout transaction for action:' #FUNCTION
*S** / ' in subprogram' *PROGRAM
*S** END-IF
*S** BACKOUT TRANSACTION
*S** MOVE BY POSITION WW-GDA TO WW-PDA
*S** ESCAPE BOTTOM(PROG.) IMMEDIATE
*S**END-SUBROUTINE /* PROCESS-ERROR
*S***
*S**END-REPEAT
*S***
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CREATE-OBJECT
*S*************************************************************************
*S***
*S** ASSIGN WFVER15D.WW-CDATE = *DATX
*S***
*S*** Don't allow the key to be null.
*S** IF WFVER15D-ID = NEXT-VIEW.WF-VERIFY-KEY /* Compare with null
*S** ASSIGN ##MSG-DATA(1) = #OBJECT
*S** ASSIGN ##MSG = ':1:identifier is required'
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** /*
*S** /* If object already exist, return with error.
*S** PERFORM CHECK-EXISTENCE
*S** IF WWAOBJ.#EXISTS THEN
*S** ASSIGN ##MSG = ':1:already exists'
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** PERFORM EDIT-OBJECT /* Pre-edit object header
*S** ASSIGN WF-VERIFY-1415.WW-HOLD = *TIMN
*S** ASSIGN WFVER15R.INTERVENING-UPD-FLD =
*S** WF-VERIFY-1415.WW-HOLD
*S** ASSIGN WFVER15R.HELD-ID = WFVER15D-ID
*S** STORE WF-VERIFY-1415
*S**END-SUBROUTINE /* CREATE-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE GET-OBJECT
*S*************************************************************************
*S***
*S*** Get the primary object record.
*S** PERFORM CLEAR
*S** FIND WF-VERIFY-1415 WITH WF-VERIFY-KEY = WFVER15D-ID
*S** IF NO RECORDS FOUND
*S** /*
*S** /* Return the fact that the object does not exist.
*S** ESCAPE ROUTINE
*S** END-NOREC
*S** ASSIGN WWAOBJ.#EXISTS = TRUE
*S** /*
*S** /* "Hold" the record by capturing the value of the update flag.
*S** ASSIGN WFVER15R.INTERVENING-UPD-FLD =
*S** WF-VERIFY-1415.WW-HOLD
*S** /*
*S** /* Shift primary entity information to object
*S** MOVE BY NAME WF-VERIFY-1415 TO WFVER15D
*S** ASSIGN WFVER15R.HELD-ID = WFVER15D-ID
*S** END-FIND
*S**END-SUBROUTINE /* GET-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE HOLD-OBJECT
*S*************************************************************************
*S***
*S*** Get primary entity and process it.
*S** HOLD-PRIME.
*S** FIND WF-VERIFY-1415 WITH
*S** WF-VERIFY-KEY = WFVER15D-ID
*S** IF NO RECORDS FOUND
*S** /*
*S** /* Trying to process an object that doesn't exist.
*S** ASSIGN ##MSG = 'Intervening purge, please try again'
*S** RESET WFVER15R
*S** PERFORM PROCESS-ERROR
*S** END-NOREC
*S** IF WFVER15R.INTERVENING-UPD-FLD NE
*S** WF-VERIFY-1415.WW-HOLD THEN
*S** ASSIGN ##MSG = 'Intervening update, please try again'
*S** RESET WFVER15R
*S** PERFORM PROCESS-ERROR
*S** END-IF
*S** ASSIGN WWAOBJ.#EXISTS = TRUE
*S** PERFORM EDIT-OBJECT /* Pre-edit object header
*S** DECIDE ON EVERY VALUE WWAOBJ.#FUNCTION
*S** VALUE 'UPDATE'
*S** ASSIGN WF-VERIFY-1415.WW-HOLD = *TIMN
*S** ASSIGN WF-VERIFY-1415.WW-MDATE = *DATX
*S** ASSIGN WFVER15R.INTERVENING-UPD-FLD =
*S** WF-VERIFY-1415.WW-HOLD
*S** UPDATE(HOLD-PRIME.)
*S** VALUE 'DELETE'
*S** DELETE(HOLD-PRIME.)
*S** RESET WFVER15R.HELD-ID
*S** NONE IGNORE
*S** END-DECIDE
*S** END-FIND
*S**END-SUBROUTINE /* HOLD-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CHECK-AND-UPDATE-OBJECT /* Process all sub-entities
*S*************************************************************************
*S***
*S** ESCAPE ROUTINE /* No sub-entities
*S**END-SUBROUTINE /* CHECK-AND-UPDATE-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE EDIT-OBJECT
*S*************************************************************************
*S***
*S** IF WWAOBJ.#FUNCTION = 'UPDATE' OR = 'STORE'
*S** /*
*S** /* Load file view
*S** MOVE BY NAME WFVER15D TO WF-VERIFY-1415
*S** END-IF
*S**END-SUBROUTINE /* EDIT-OBJECT
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CHECK-EXISTENCE
*S*************************************************************************
*S***
*S*** Check whether object currently exists.
*S** EXISTENCE-CHECK.
*S** HISTOGRAM(1) NEXT-VIEW FOR WF-VERIFY-KEY
*S** FROM WFVER15D-ID THRU WFVER15D-ID
*S** ASSIGN WWAOBJ.#EXISTS = TRUE
*S** END-HISTOGRAM
*S**END-SUBROUTINE /* CHECK-EXISTENCE
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE CLEAR
*S*************************************************************************
*S***
*S** MOVE BY NAME WFVER15D TO WFVER15D-ID.STRUCTURE /* Capture key.
*S** RESET WFVER15D WFVER15R
*S** MOVE BY NAME WFVER15D-ID.STRUCTURE TO WFVER15D /* Restore key.
*S**END-SUBROUTINE /* CLEAR
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE GET-DB-CALL
*S*************************************************************************
*S***
*S**INCLUDE WWDBCALL
*S**END-SUBROUTINE /* GET-DB-CALL
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE SET-OBJECT-ID
*S*************************************************************************
*S***
*S** COMPRESS WFVER15D.WF-FAO
*S** '-' WFVER15D.WW-STUDENT-ID
*S** TO ##MSG-DATA(1) LEAVING NO
*S** COMPRESS #OBJECT ##MSG-DATA(1) TO ##MSG-DATA(1)
*S**END-SUBROUTINE /* SET-OBJECT-ID
*S***
*S*************************************************************************
*S**DEFINE SUBROUTINE RELOAD-MSG
*S*************************************************************************
*S***
*S*** If no messages set in subprogram, reset passed message
*S** IF ##MSG = ' '
*S** ASSIGN ##MSG = #SAVE-MSG
*S** END-IF
*S**END-SUBROUTINE /* RELOAD-MSG
*S**END
|