Trailing-Edge
-
PDP-10 Archives
-
BB-5372D-BM
-
traffic/demonstration/ttest.cbl
There is 1 other file named ttest.cbl in the archive. Click here to see a list.
IDENTIFICATION DIVISION.
PROGRAM-ID. TTEST.
*REMARKS. TEST PROGRAM FOR TRAFFIC --
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
*********************************************************
* GENERAL VARIABLES
*********************************************************
77 TEMP-FIELD-NUMBER PIC S9(10) COMP.
01 TRAFFIC-COMPUTATIONALS COMP.
05 SECTION-NUMBER PIC S9(10).
05 FIELD-IDS PIC S9(10).
05 END-INDICATOR PIC S9(10).
05 ERROR-CODE PIC S9(10).
01 TRAFFIC-ALHPANUMERICS DISPLAY-7.
05 RECORD-NAME PIC X(30).
05 FORM-FILE PIC X(30).
05 PROGRAM-NAME PIC X(30).
*************************************************************
* MENU VARIABLES
*************************************************************
01 MENU-ITEMS COMP.
02 DESIRED-TEST PIC S9(10).
02 MAX-TEST PIC S9(10).
02 LOW-TEST PIC S9(10).
02 MENU-SECTION PIC S9(10).
01 MENU-ALPHANUMERICS DISPLAY-7.
05 MENU-FILE PIC X(30) VALUE IS "DSK:TTEST-MENU.FORM-DATA".
************************************************************
* RECORD DESCRIPTION OF FORM TTEST-MENU
************************************************************
01 MENU-RECORD DISPLAY-7.
05 DUMMY-GROUP-FOR-74.
10 TITLE-LINE
PICTURE X(60) DISPLAY-7.
10 DIRECTION
PICTURE X(60) DISPLAY-7.
10 TEST-1
PICTURE X(60) DISPLAY-7.
10 TEST-2
PICTURE X(60) DISPLAY-7.
10 TEST-3
PICTURE X(60) DISPLAY-7.
10 TEST-4
PICTURE X(60) DISPLAY-7.
10 TEST-5
PICTURE X(60) DISPLAY-7.
10 TEST-6
PICTURE X(60) DISPLAY-7.
10 TEST-7
PICTURE X(60) DISPLAY-7.
10 TEST-8
PICTURE X(60) DISPLAY-7.
10 TEST-9
PICTURE X(60) DISPLAY-7.
10 TEST-10
PICTURE X(60) DISPLAY-7.
10 TEST-11 PIC X(60) DISPLAY-7.
10 TEST-12 PIC X(60) DISPLAY-7.
10 TEST-13 PIC X(60) DISPLAY-7.
10 TEST-14 PIC X(60) DISPLAY-7.
10 TEST-15 PIC X(60) DISPLAY-7.
10 TEST-16 PIC X(60) DISPLAY-7.
10 TEST-17 PIC X(60) DISPLAY-7.
10 TEST-18 PIC X(60) DISPLAY-7.
10 TEST-19 PIC X(60) DISPLAY-7.
10 TEST-20 PIC X(60) DISPLAY-7.
10 TEST-21 PIC X(60) DISPLAY-7.
10 TEST-22 PIC X(60) DISPLAY-7.
10 TEST-23 PIC X(60) DISPLAY-7.
10 TEST-24 PIC X(60) DISPLAY-7.
10 TEST-25 PIC X(60) DISPLAY-7.
10 TEST-26 PIC X(60) DISPLAY-7.
10 SELECT-TEST
PICTURE X(40) DISPLAY-7.
10 TEST-NUM
PICTURE S9(2) DISPLAY-7.
***************************************************************
* NO FULL -- NO DUP -- NO REQ -- NO RANGE -- NO VALUES
***************************************************************
************************************************************
* RECORD DESCRIPTION OF FORM TTEST-NVAL
************************************************************
01 NV-RECORD DISPLAY-7.
05 ANOTHER-DUMMY-GROUP-FOR-74.
10 NV-TITLE
PICTURE X(60) DISPLAY-7.
10 NV-HEADING
PICTURE X(70) DISPLAY-7.
10 NV-ALPHA-T
PICTURE X(20) DISPLAY-7.
10 NV-AN-T
PICTURE X(20) DISPLAY-7.
10 NV-NUM-T
PICTURE X(20) DISPLAY-7.
10 NV-DATES
PICTURE X(20) DISPLAY-7.
10 NV-DASH-T
PICTURE X(20) DISPLAY-7.
10 NV-DEC
PICTURE X(20) DISPLAY-7.
10 NV-JULIAN
PICTURE X(20) DISPLAY-7.
10 NV-MILITARY
PICTURE X(20) DISPLAY-7.
10 NV-SLASH
PICTURE X(20) DISPLAY-7.
10 NV-MONEY
PICTURE X(20) DISPLAY-7.
10 NV-M5-0
PICTURE X(20) DISPLAY-7.
10 NV-M5-2
PICTURE X(20) DISPLAY-7.
10 NV-M5-7
PICTURE X(20) DISPLAY-7.
10 NV-SSN
PICTURE X(20) DISPLAY-7.
10 NV-YES-NO
PICTURE X(20) DISPLAY-7.
10 NV-QUES-1
PICTURE X(20) DISPLAY-7.
10 NV-QUES-2
PICTURE X(20) DISPLAY-7.
10 NV-QUES-3
PICTURE X(15) DISPLAY-7.
10 NV-ANS-1
PICTURE A(1) DISPLAY-7.
10 NV-ANS-2
PICTURE A(1) DISPLAY-7.
10 NV-ANS-3
PICTURE A(1) DISPLAY-7.
10 NV-ALPHA-P
PICTURE X(10) DISPLAY-7.
10 NV-ALPHA-U
PICTURE X(10) DISPLAY-7.
10 NV-AN-P
PICTURE X(10) DISPLAY-7.
10 NV-AN-U
PICTURE X(10) DISPLAY-7.
10 NV-NUM-P
PICTURE S9(10) DISPLAY-7.
10 NV-NUM-U
PICTURE S9(10) DISPLAY-7.
10 NV-DASH-P
PICTURE 9(6) DISPLAY-7.
10 NV-DASH-U
PICTURE 9(6) DISPLAY-7.
10 NV-DEC-P
PICTURE X(7) DISPLAY-7.
10 NV-DEC-U
PICTURE X(7) DISPLAY-7.
10 NV-JULIAN-P
PICTURE 9(5) DISPLAY-7.
10 NV-JULIAN-U
PICTURE 9(5) DISPLAY-7.
10 NV-MILITARY-P
PICTURE X(7) DISPLAY-7.
10 NV-MILITARY-U
PICTURE X(7) DISPLAY-7.
10 NV-SLASH-P
PICTURE 9(6) DISPLAY-7.
10 NV-SLASH-U
PICTURE 9(6) DISPLAY-7.
10 NV-M4-0
PICTURE S9(4)V DISPLAY-7.
10 NV-M4-0-U
PICTURE S9(4)V DISPLAY-7.
10 NV-M4-2-P
PICTURE S9(4)V9(2) DISPLAY-7.
10 NV-M4-2-U
PICTURE S9(4)V9(2) DISPLAY-7.
10 NV-M4-7-P
PICTURE S9(4)V9(7) DISPLAY-7.
10 NV-M4-7-U
PICTURE S9(4)V9(7) DISPLAY-7.
10 NV-SSN-P
PICTURE S9(9) DISPLAY-7.
10 NV-SSN-U
PICTURE S9(9) DISPLAY-7.
10 NV-YN-P
PICTURE A(1) DISPLAY-7.
10 NV-YN-U
PICTURE A(1) DISPLAY-7.
*************************************************************
* RECORD DESCRIPTION OF FORM TTEST-18, TTEST-19, AND TTEST-23
*************************************************************
01 CH-RECORD DISPLAY-7.
05 CH-DUMMY-FOR-74.
*1
10 NV-TITLE
PICTURE X(60) DISPLAY-7.
10 CH-HEADING
PICTURE X(70) DISPLAY-7.
10 CH-ALPHA-T
PICTURE X(20) DISPLAY-7.
10 CH-AN-T
PICTURE X(20) DISPLAY-7.
10 CH-NUM-T
PICTURE X(20) DISPLAY-7.
10 CH-DATES
PICTURE X(20) DISPLAY-7.
10 CH-DASH-T
PICTURE X(20) DISPLAY-7.
10 CH-DEC
PICTURE X(20) DISPLAY-7.
10 CH-JULIAN
PICTURE X(20) DISPLAY-7.
*10
10 CH-MILITARY
PICTURE X(20) DISPLAY-7.
10 CH-SLASH
PICTURE X(20) DISPLAY-7.
10 CH-MONEY
PICTURE X(20) DISPLAY-7.
10 CH-M5-0
PICTURE X(20) DISPLAY-7.
10 CH-M5-2
PICTURE X(20) DISPLAY-7.
10 CH-M5-7
PICTURE X(20) DISPLAY-7.
10 CH-SSN
PICTURE X(20) DISPLAY-7.
10 CH-YES-NO
PICTURE X(20) DISPLAY-7.
10 CH-QUES-1
PICTURE X(20) DISPLAY-7.
10 CH-QUES-2
PICTURE X(20) DISPLAY-7.
* 20
10 CH-QUES-3
PICTURE X(15) DISPLAY-7.
10 CH-ANS-1
PICTURE A(1) DISPLAY-7.
10 CH-ANS-2
PICTURE A(1) DISPLAY-7.
10 CH-ANS-3
PICTURE A(1) DISPLAY-7.
10 CH-ALPHA-P
PICTURE A(10) DISPLAY-7.
10 CH-ALPHA-U
PICTURE X(10) DISPLAY-7.
10 CH-AN-P
PICTURE X(10) DISPLAY-7.
10 CH-AN-U
PICTURE X(10) DISPLAY-7.
10 CH-NUM-P
PICTURE X(10) DISPLAY-7.
10 CH-NUM-U
PICTURE X(10) DISPLAY-7.
*30
10 CH-DASH-P
PICTURE X(6) DISPLAY-7.
10 CH-DASH-U
PICTURE X(6) DISPLAY-7.
10 CH-DEC-P
PICTURE X(7) DISPLAY-7.
10 CH-DEC-U
PICTURE X(7) DISPLAY-7.
10 CH-JULIAN-P
PICTURE X(5) DISPLAY-7.
10 CH-JULIAN-U
PICTURE X(5) DISPLAY-7.
10 CH-MILITARY-P
PICTURE X(7) DISPLAY-7.
10 CH-MILITARY-U
PICTURE X(7) DISPLAY-7.
10 CH-SLASH-P
PICTURE X(6) DISPLAY-7.
10 CH-SLASH-U
PICTURE X(6) DISPLAY-7.
*40
10 CH-M4-0-P
PICTURE S9(4)V DISPLAY-7.
10 CH-M4-0-U
PICTURE S9(4)V DISPLAY-7.
10 CH-M4-2-P
PICTURE S9(4)V9(2) DISPLAY-7.
10 CH-M4-2-U
PICTURE S9(4)V9(2) DISPLAY-7.
10 CH-M4-7-P
PICTURE S9(4)V9(7) DISPLAY-7.
10 CH-M4-7-U
PICTURE S9(4)V9(7) DISPLAY-7.
10 CH-SSN-P
PICTURE S9(9) DISPLAY-7.
10 CH-SSN-U
PICTURE S9(9) DISPLAY-7.
10 CH-YN-P
PICTURE X(1) DISPLAY-7.
10 CH-YN-U
PICTURE X(1) DISPLAY-7.
*50
10 CH-ALPHA-RL
PICTURE A(10) DISPLAY-7.
10 CH-ALPHA-RU
PICTURE A(10) DISPLAY-7.
10 CH-AN-RL
PICTURE X(10) DISPLAY-7.
10 CH-AN-RU
PICTURE X(10) DISPLAY-7.
10 CH-NUM-RL
PICTURE X(10) DISPLAY-7.
10 CH-NUM-RU
PICTURE X(10) DISPLAY-7.
10 CH-DASH-RL
PICTURE X(6) DISPLAY-7.
10 CH-DASH-RU
PICTURE X(6) DISPLAY-7.
10 CH-DEC-RL
PICTURE X(7) DISPLAY-7.
10 CH-DEC-RU
PICTURE X(7) DISPLAY-7.
*60
10 CH-JULIAN-RL
PICTURE X(5) DISPLAY-7.
10 CH-JULIAN-RU
PICTURE X(5) DISPLAY-7.
10 CH-MILITARY-RL
PICTURE X(7) DISPLAY-7.
10 CH-MILITARY-RU
PICTURE X(7) DISPLAY-7.
10 CH-SLASH-RL
PICTURE 9(6) DISPLAY-7.
10 CH-SLASH-RU
PICTURE 9(6) DISPLAY-7.
10 CH-M4-0-RL
PICTURE S9(4)V DISPLAY-7.
10 CH-M4-0-RU
PICTURE S9(4)V DISPLAY-7.
10 CH-M4-2-RL
PICTURE S9(4)V9(2) DISPLAY-7.
10 CH-M4-2-RL-X REDEFINES CH-M4-2-RL PIC X(6).
10 CH-M4-2-RU
PICTURE S9(4)V9(2) DISPLAY-7.
*70
10 CH-M4-7-RL
PICTURE S9(4)V9(7) DISPLAY-7.
10 CH-M4-7-RU
PICTURE S9(4)V9(7) DISPLAY-7.
10 CH-SSN-RL
PICTURE S9(9) DISPLAY-7.
10 CH-SSN-RU
PICTURE S9(9) DISPLAY-7.
10 CH-YN-RL
PICTURE A(1) DISPLAY-7.
10 CH-YN-RU
PICTURE A(1) DISPLAY-7.
05 ST-ER OCCURS 13 TIMES.
10 CH-ST.
11 CH-FILL OCCURS 4 TIMES.
12 FILLER PIC X.
12 CHST PIC X.
10 CH-ER PIC 9(2).
05 ST-ER-REDEF REDEFINES ST-ER.
10 CH-ALHPA-ST
PICTURE X(8) DISPLAY-7.
10 CH-ALPHA-ER
PICTURE X(2) DISPLAY-7.
10 CH-AN-ST
PICTURE X(8) DISPLAY-7.
10 CH-AN-ER
PICTURE X(2) DISPLAY-7.
*80
10 CH-NUM-ST
PICTURE X(8) DISPLAY-7.
10 CH-NUM-ER
PICTURE X(2) DISPLAY-7.
10 CH-DASH-ST
PICTURE X(8) DISPLAY-7.
10 CH-DASH-ER
PICTURE X(2) DISPLAY-7.
10 CH-DEC-ST
PICTURE X(8) DISPLAY-7.
10 CH-DEC-ER
PICTURE X(2) DISPLAY-7.
10 CH-JULIAN-ST
PICTURE X(8) DISPLAY-7.
10 CH-JULIAN-ER
PICTURE X(2) DISPLAY-7.
10 CH-MILITARY-ST
PICTURE X(8) DISPLAY-7.
10 CH-MILITARY-ER
PICTURE X(2) DISPLAY-7.
*90
10 CH-SLASH-ST
PICTURE X(8) DISPLAY-7.
10 CH-SLASH-ER
PICTURE X(2) DISPLAY-7.
10 CH-M4-0-ST
PICTURE X(8) DISPLAY-7.
10 CH-M4-0-ER
PICTURE X(2) DISPLAY-7.
10 CH-M4-2-ST
PICTURE X(8) DISPLAY-7.
10 CH-M4-2-ER
PICTURE X(2) DISPLAY-7.
10 CH-M4-7-ST
PICTURE X(8) DISPLAY-7.
10 CH-M4-7-ER
PICTURE X(2) DISPLAY-7.
10 CH-SSN-ST
PICTURE X(8) DISPLAY-7.
10 CH-SSN-ER
PICTURE X(2) DISPLAY-7.
*100
10 CH-YN-ST
PICTURE X(8) DISPLAY-7.
10 CH-YN-ER
PICTURE X(2) DISPLAY-7.
05 CH-DUMMY.
10 CH-TYP-1
PICTURE X(9) DISPLAY-7.
10 CH-TYP-2
PICTURE S9(1) DISPLAY-7.
10 CH-TYP-3
PICTURE X(27) DISPLAY-7.
10 CH-DUP-1
PICTURE X(9) DISPLAY-7.
10 CH-DUP-2
PICTURE S9(1) DISPLAY-7.
10 CH-DUP-3
PICTURE X(27) DISPLAY-7.
10 CH-ENT-1
PICTURE X(9) DISPLAY-7.
10 CH-ENT-2
PICTURE S9(1) DISPLAY-7.
*110
10 CH-ENT-3
PICTURE X(27) DISPLAY-7.
10 CH-PRO-1
PICTURE X(9) DISPLAY-7.
10 CH-PRO-2
PICTURE S9(1) DISPLAY-7.
10 CH-PRO-3
PICTURE X(27) DISPLAY-7.
10 CH-RQUES
PICTURE X(25) DISPLAY-7.
10 CH-RANGE
PICTURE A(1) DISPLAY-7.
10 CH-RANGE-CHK-1
PICTURE X(9) DISPLAY-7.
10 CH-RANGE-CHK-2
PICTURE S9(1) DISPLAY-7.
10 CH-RANGE-CHK-3
PICTURE X(27) DISPLAY-7.
10 FT-MORE-1
PICTURE X(6) DISPLAY-7.
*120
10 FT-MORE-2
PICTURE A(1) DISPLAY-7.
10 FT-FNUM-1
PICTURE X(15) DISPLAY-7.
10 FT-FNUM-2
PICTURE S9(2) DISPLAY-7.
10 FT-FNUM-3
PICTURE X(7) DISPLAY-7.
10 FT-HSNUM-1
PICTURE X(15) DISPLAY-7.
10 FT-HSNUM-2
PICTURE S9(1) DISPLAY-7.
10 FT-HSNUM-3
PICTURE X(25) DISPLAY-7.
10 FT-COM-1
PICTURE X(15) DISPLAY-7.
10 FT-COM-2
PICTURE S9(1) DISPLAY-7.
10 FT-COM-3
PICTURE X(25) DISPLAY-7.
*130
10 FT-ERR-1
PICTURE X(15) DISPLAY-7.
10 FT-ERR-2
PICTURE S9(2) DISPLAY-7.
10 FT-WRT-1
PICTURE X(17) DISPLAY-7.
10 FT-CHG-1
PICTURE X(30) DISPLAY-7.
10 FT-CHG-E1
PICTURE S9(1) DISPLAY-7.
10 FT-CHG-T1
PICTURE S9(1) DISPLAY-7.
10 FT-CHG-P1
PICTURE S9(1) DISPLAY-7.
10 FT-CHG-D1
PICTURE S9(1) DISPLAY-7.
10 FT-CHG-R1
PICTURE S9(1) DISPLAY-7.
10 FT-CHG-C1
PICTURE S9(1) DISPLAY-7.
*140
10 FT-CHG-E2
PICTURE X(20) DISPLAY-7.
10 FT-CHG-T2
PICTURE X(20) DISPLAY-7.
10 FT-CHG-P2
PICTURE X(20) DISPLAY-7.
10 FT-CHG-D2
PICTURE X(27) DISPLAY-7.
10 FT-CHG-R2
PICTURE X(27) DISPLAY-7.
10 FT-CHG-C2
PICTURE X(20) DISPLAY-7.
10 FT-RANL-1
PICTURE X(12) DISPLAY-7.
10 FT-RANU-1
PICTURE X(12) DISPLAY-7.
10 FT-ALPHA
PICTURE X(10) DISPLAY-7.
10 FT-ALPHANU
PICTURE X(10) DISPLAY-7.
*150
10 FT-NUM
PICTURE X(10) DISPLAY-7.
10 FT-DASH
PICTURE 9(6) DISPLAY-7.
10 FT-DEC
PICTURE X(7) DISPLAY-7.
10 FT-JULIAN
PICTURE 9(5) DISPLAY-7.
10 FT-MILITARY
PICTURE X(7) DISPLAY-7.
10 FT-SLASH
PICTURE 9(6) DISPLAY-7.
10 FT-CH-M4
PICTURE S9(4)V DISPLAY-7.
10 FT-CH-M4-2
PICTURE S9(4)V9(2) DISPLAY-7.
10 FT-CH-M4-7
PICTURE S9(4)V9(7) DISPLAY-7.
10 FT-SSN
PICTURE S9(9) DISPLAY-7.
*160
10 FT-YN
PICTURE X(1) DISPLAY-7.
************************************************************
* RECORD DESCRIPTION OF FORM TTEST-24
************************************************************
01 T24-RECORD DISPLAY-7.
10 T24-TITLE-LINE
PICTURE X(60) DISPLAY-7.
10 T24-DIRECTION
PICTURE X(60) DISPLAY-7.
10 T24-1
PICTURE X(30) DISPLAY-7.
10 T24-2
PICTURE X(30) DISPLAY-7.
10 T24-3
PICTURE X(30) DISPLAY-7.
10 T24-4
PICTURE X(30) DISPLAY-7.
10 T24V
PICTURE S9(1) DISPLAY-7.
10 T24NV
PICTURE S9(2) DISPLAY-7.
10 T24OV
PICTURE S9(2) DISPLAY-7.
10 T24E
PICTURE S9(2) DISPLAY-7.
77 T24-VAR PIC S9(10) COMP.
77 T24-NVAL PIC S9(10) COMP.
77 T24-OVAL PIC S9(10) COMP.
******************************************************
* ATTRIBUTE CHANGING TABLES AND VARIABLES *
******************************************************
01 I-ST PIC X(8) DISPLAY-7 OCCURS 13 TIMES.
01 CHKR PIC 9 DISPLAY-7 OCCURS 13 TIMES.
01 ASCII-ATTRIBUTES DISPLAY-7.
02 FILLER PIC XX.
02 AT-1 PIC X(15).
02 AT-2 PIC X(15).
02 AT-3 PIC X(15).
02 AT-4 PIC X(15).
01 SIXBIT-ATTRIBUTES DISPLAY-6.
02 FILLER PIC X.
02 ST-1 PIC X(15).
02 ST-2 PIC X(15).
02 ST-3 PIC X(15).
02 ST-4 PIC X(15).
01 ASC DISPLAY-7.
02 FILLER PIC X(75) VALUE IS
'CH-ALPHA-U CH-AN-U CH-NUM-U CH-DASH-U CH-DEC-U'.
02 FILLER PIC X(75) VALUE IS
'CH-JULIAN-U CH-MILITARY-U CH-SLASH-U CH-M4-0-U CH-M4-2-U'.
02 FILLER PIC X(45) VALUE IS
'CH-M4-7-U CH-SSN-U CH-YN-U'.
01 ASC-NAME REDEFINES ASC PIC X(15) DISPLAY-7 OCCURS 13 TIMES.
01 SIX DISPLAY-6.
02 FILLER PIC X(75) VALUE IS
'CH-ALPHA-U CH-AN-U CH-NUM-U CH-DASH-U CH-DEC-U'.
02 FILLER PIC X(75) VALUE IS
'CH-JULIAN-U CH-MILITARY-U CH-SLASH-U CH-M4-0-U CH-M4-2-U'.
02 FILLER PIC X(45) VALUE IS
'CH-M4-7-U CH-SSN-U CH-YN-U'.
01 SIX-NAME REDEFINES SIX PIC X(15) DISPLAY-6 OCCURS 13 TIMES.
01 ASCI-N DISPLAY-7.
02 FILLER PIC XX.
02 ASCII-NAME PIC X(15).
01 SIXB-N DISPLAY-6.
02 FILLER PIC XX.
02 SIXBIT-NAME PIC X(15).
01 FIELD-NAME PIC X(15) DISPLAY-7.
01 FT-FLD-OFFSET PIC 999 VALUE IS 24.
01 CHANGE-COMPS COMP.
02 FIRST-FIELD-NUM PIC S9(10) VALUE 24.
02 FIRST-RANGE-NUM PIC S9(10) VALUE 50.
02 FIRST-STATE-NUM PIC S9(10) VALUE 76.
02 FIRST-WRITE-NUM PIC S9(10) VALUE 147.
02 NUMBER-OF-FIELDS PIC S9(10) VALUE 26.
02 CURRENT-TYPE PIC 9 VALUE 0.
02 CURRENT-DUP PIC 9 VALUE 3.
02 CURRENT-ENTRY PIC 9 VALUE 2.
02 CURRENT-PROT PIC 9 VALUE 2.
02 CURRENT-RANGE PIC 9.
02 DONE-FLAG PIC S9(10).
02 IND PIC S9(10).
02 MAX PIC S9(10).
02 EC PIC S9(10).
02 IND-1 PIC S9(10).
02 IND-2 PIC S9(10).
02 IND-3 PIC S9(10).
02 THE-VALUE PIC S9(10).
02 FIELD-NUMBER PIC S9(10).
77 LL PIC X(11) DISPLAY-7 VALUE IS 'LOWER-RANGE'.
77 UL PIC X(11) DISPLAY-7 VALUE IS 'UPPER-RANGE'.
77 THE-ATTRIBUTE PIC X(15) DISPLAY-7.
01 LEGAL-FILL.
02 LEGAL-FIELDS OCCURS 13 TIMES.
03 LEGAL-TYPE OCCURS 3 TIMES PIC X.
77 THE-ANSWER PIC X(10).
77 SIXBIT-FORM-NAME PIC X(40) DISPLAY-6.
77 ANS-1 PIC X DISPLAY-7.
PROCEDURE DIVISION.
START-UP.
ENTER MACRO TFRCLR.
MOVE -2 TO MENU-SECTION.
PERFORM INITIALIZE.
START-MENU.
PERFORM DO-MENU.
IF DESIRED-TEST < LOW-TEST OR > MAX-TEST
PERFORM MENU-ERROR
GO TO START-MENU.
IF DESIRED-TEST = 0
GO TO NORMAL-EXIT.
GO TO
TTEST-1
TTEST-2
TTEST-3
TTEST-4
TTEST-5
TTEST-6
TTEST-7
TTEST-8
TTEST-9
TTEST-10
TTEST-11
TTEST-12
TTEST-13
TTEST-14
TTEST-15
TTEST-16
TTEST-17
TTEST-18
TTEST-19
TTEST-20
TTEST-21
TTEST-22
TTEST-23
TTEST-24
TTEST-25
TTEST-26
DEPENDING ON DESIRED-TEST.
INITIALIZE.
MOVE 0 TO LOW-TEST.
MOVE 26 TO MAX-TEST.
* INITIALIZE THE TITLE
MOVE MENU-FILE TO FORM-FILE.
MOVE -1 TO SECTION-NUMBER.
PERFORM INIT-SECTION.
MOVE MENU-SECTION TO SECTION-NUMBER.
PERFORM INIT-SECTION.
MOVE -3 TO SECTION-NUMBER.
PERFORM INIT-SECTION.
INIT-SECTION.
ENTER MACRO TFRINI USING MENU-RECORD, FORM-FILE, SECTION-NUMBER,
ERROR-CODE.
IF ERROR-CODE NOT = 0
DISPLAY 'INIT-SECTION ERROR CODE = ' ERROR-CODE
STOP RUN.
DO-MENU.
PERFORM DM THRU DMX.
DM.
MOVE -3 TO SECTION-NUMBER.
PERFORM READ-SECTION.
DSB-1.
MOVE TEST-NUM TO DESIRED-TEST.
DSB-2.
DMX. EXIT.
READ-SECTION.
ENTER MACRO TFRRD USING SECTION-NUMBER, END-INDICATOR,
ERROR-CODE.
IF ERROR-CODE NOT = 0
DISPLAY ' '
DISPLAY 'READ-SEC ERROR ' ERROR-CODE ' ' END-INDICATOR
STOP RUN.
PROTECT-SECTION.
ENTER MACRO TFRCHG USING SECTION-NUMBER,'PROTECTED',EC.
UNPROTECT-SECTION.
ENTER MACRO TFRCHG USING SECTION-NUMBER,'UNPROTECTED', EC.
GET-SECTION.
PERFORM UNPROTECT-SECTION.
PERFORM READ-SECTION.
PERFORM PROTECT-SECTION.
PROT-INIT-SECTION.
PERFORM PROTECT-SECTION.
PERFORM INIT-SEC-CH.
PROTECT-FIELD.
ENTER MACRO TFRCHG USING FIELD-NAME,'PROTECTED',EC.
UNPROTECT-FIELD.
ENTER MACRO TFRCHG USING FIELD-NAME,'UNPROTECTED',EC.
READ-FIELD.
ENTER MACRO TFRRD USING FIELD-NAME, END-INDICATOR, EC.
IF EC NOT = 0
DISPLAY 'READ FLD ERROR ' EC
STOP RUN.
GET-FIELD.
PERFORM UNPROTECT-FIELD.
PERFORM READ-FIELD.
PERFORM PROTECT-FIELD.
WRITE-SECTION.
ENTER MACRO TFRWRT USING SECTION-NUMBER, ERROR-CODE.
CLEAR-SECTION.
ENTER MACRO TFRCLR USING SECTION-NUMBER, ERROR-CODE.
INIT-SEC-TEST.
ENTER MACRO TFRINI USING NV-RECORD, FORM-FILE, SECTION-NUMBER,
ERROR-CODE.
IF ERROR-CODE NOT = 0
DISPLAY ' ' DISPLAY ' '
DISPLAY "INIT-SEC-TEST ERROR CODE = ", ERROR-CODE
DISPLAY " "
DISPLAY " "
STOP RUN.
MENU-ERROR.
TTEST-1.
MOVE "TTEST-1.FORM-DATA" TO FORM-FILE.
TTEST-1A.
MOVE -1 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -2 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -3 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
ALPHA-T1.
MOVE -4 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -4 TO SECTION-NUMBER.
PERFORM READ-SECTION.
IF NV-ANS-1 = "Y"
PERFORM MOVE-DATA
MOVE -5 TO SECTION-NUMBER
PERFORM WRITE-SECTION.
IF NV-ANS-2 = "Y"
MOVE -6 TO SECTION-NUMBER
PERFORM READ-SECTION.
IF NV-ANS-3 = "Y"
MOVE -5 TO SECTION-NUMBER
PERFORM INIT-SEC-TEST
MOVE -6 TO SECTION-NUMBER
PERFORM INIT-SEC-TEST.
IF NV-ANS-1 = 'N' AND NV-ANS-2 = 'N' AND NV-ANS-3 = 'N'
GO TO START-UP
ELSE
GO TO ALPHA-T1.
TTEST-2.
MOVE "TTEST-2.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-3.
MOVE "TTEST-3.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-4.
MOVE "TTEST-4.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-5.
MOVE "TTEST-5.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-6.
MOVE "TTEST-6.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-7.
MOVE "TTEST-7.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-8.
MOVE "TTEST-8.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-9.
MOVE "TTEST-9.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-10.
MOVE "TTEST-10.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-11.
MOVE "TTEST-11.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-12.
MOVE -2 TO SECTION-NUMBER.
ENTER MACRO TFRCLR USING SECTION-NUMBER, ERROR-CODE.
MOVE -4 TO MENU-SECTION.
PERFORM INITIALIZE.
GO TO START-MENU.
TTEST-13.
MOVE "TTEST-13.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-14.
MOVE "TTEST-14.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-15.
MOVE "TTEST-15.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-16.
MOVE "TTEST-16.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-17.
MOVE "TTEST-17.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-18.
MOVE "TTEST-18.FORM-DATA" TO FORM-FILE.
TTEST-18-START.
MOVE -1 TO SECTION-NUMBER. PERFORM INIT-SEC-CH.
MOVE -2 TO SECTION-NUMBER. PERFORM INIT-SEC-CH.
MOVE -5 TO SECTION-NUMBER. PERFORM INIT-SEC-CH.
MOVE -19 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
MOVE -20 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
MOVE -21 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
MOVE -22 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
MOVE -23 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
MOVE -24 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
MOVE -25 TO SECTION-NUMBER. PERFORM PROT-INIT-SECTION.
PERFORM TT-19A.
MOVE CH-ST (1) TO I-ST(1).
MOVE CH-ST (2) TO I-ST(2).
MOVE CH-ST (3) TO I-ST(3).
MOVE CH-ST (4) TO I-ST(4).
MOVE CH-ST (5) TO I-ST(5).
MOVE CH-ST (6) TO I-ST(6).
MOVE CH-ST (7) TO I-ST(7).
MOVE CH-ST (8) TO I-ST(8).
MOVE CH-ST (9) TO I-ST(9).
MOVE CH-ST (10) TO I-ST(10).
MOVE CH-ST (11) TO I-ST(11).
MOVE CH-ST (12) TO I-ST(12).
MOVE CH-ST (13) TO I-ST(13).
MOVE 2 TO CHKR(1) CHKR(2) CHKR(3) CHKR(4) CHKR(5) CHKR(6)
CHKR(7) CHKR(8) CHKR(9) CHKR(10) CHKR(11) CHKR(12)
CHKR(13).
TS-18.
MOVE 'FT-MORE-2' TO FIELD-NAME. PERFORM GET-FIELD.
IF FT-MORE-2 = 'N' GO TO START-UP.
MOVE 'FT-FNUM-2' TO FIELD-NAME. PERFORM GET-FIELD.
IF FT-FNUM-2 = 14 OR FT-FNUM-2 = -6
MOVE -6 TO FT-FNUM-2
GO TO CHST-MOVE-END.
CHST-MOVE.
MOVE CHST (FT-FNUM-2, 1) TO FT-CHG-T1.
MOVE CHST (FT-FNUM-2, 2) TO FT-CHG-D1.
MOVE CHST (FT-FNUM-2, 3) TO FT-CHG-E1.
MOVE CHST (FT-FNUM-2, 4) TO FT-CHG-P1.
MOVE CHKR (FT-FNUM-2) TO FT-CHG-R1.
MOVE 2 TO FT-CHG-C1.
CHST-MOVE-END.
MOVE -28 TO SECTION-NUMBER. PERFORM WRITE-SECTION.
MOVE -27 TO SECTION-NUMBER. PERFORM GET-SECTION.
IF FT-FNUM-2 = -6
MOVE 1 TO FT-HSNUM-2
MOVE FT-FNUM-2 TO FIELD-NUMBER
GO TO TS-18-GO.
COMPUTE IND-1 = FT-FNUM-2 * 2 - 1.
IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
COMPUTE IND-1 = IND-1 + FT-FNUM-2 * 2 - 1
ELSE ADD 16 TO IND-1.
ADD FIRST-FIELD-NUM IND-1 GIVING FIELD-NUMBER.
MOVE ASC-NAME(FT-FNUM-2) TO ASCII-NAME.
MOVE SIX-NAME(FT-FNUM-2) TO SIXBIT-NAME.
TS-18-GO.
GO TO TS-18-INIT, TS-18-READ, TS-18-WRITE, TS-18-CLEAR,
TS-18-CHANGE DEPENDING ON FT-COM-2.
GO TO TS-18.
TS-18-INIT.
IF FT-FNUM-2 = -6 GO TO TS-18-INIT-AA.
MOVE I-ST(FT-FNUM-2) TO CH-ST(FT-FNUM-2).
MOVE 2 TO CHKR(FT-FNUM-2).
TS-18-INIT-AA.
MOVE -28 TO SECTION-NUMBER. PERFORM WRITE-SECTION.
PERFORM PROTECT-SECTION.
GO TO TS-18-INIT-N, TS-18-INIT-A, TS-18-INIT-S
DEPENDING ON FT-HSNUM-2.
GO TO TS-18.
TS-18-INIT-N.
ENTER MACRO TFRINI USING CH-RECORD, FORM-FILE, FIELD-NUMBER, EC.
GO TO TS-18-END.
TS-18-INIT-A.
ENTER MACRO TFRINI USING CH-RECORD, FORM-FILE, ASCII-NAME, EC.
GO TO TS-18-END.
TS-18-INIT-S.
ENTER MACRO TFRINI USING CH-RECORD, FORM-FILE, SIXBIT-NAME, EC.
GO TO TS-18-END.
TS-18-READ.
MOVE FIELD-NUMBER TO SECTION-NUMBER.
* IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
* COMPUTE SECTION-NUMBER = FIELD-NUMBER - 2 * FT-FNUM-2 + 1
* ELSE COMPUTE SECTION-NUMBER = FIELD-NUMBER - 16.
IF FT-CHG-P1 = 2 PERFORM UNPROTECT-SECTION.
GO TO TS-18-READ-N, TS-18-READ-A, TS-18-READ-S
DEPENDING ON FT-HSNUM-2.
TS-18-READ-N.
ENTER MACRO TFRRD USING FIELD-NUMBER, END-INDICATOR, EC.
PERFORM PROTECT-SECTION.
GO TO TS-18-END.
TS-18-READ-A.
ENTER MACRO TFRRD USING ASCII-NAME, END-INDICATOR, EC.
PERFORM PROTECT-SECTION.
GO TO TS-18-END.
TS-18-READ-S.
ENTER MACRO TFRRD USING SIXBIT-NAME, END-INDICATOR, EC.
PERFORM PROTECT-SECTION.
GO TO TS-18-END.
TS-18-WRITE.
IF FIELD-NUMBER = -6 GO TO TS-18.
ADD FIRST-WRITE-NUM FT-FNUM-2 GIVING IND-1.
MOVE -26 TO SECTION-NUMBER. PERFORM CLEAR-SECTION.
IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
COMPUTE IND-1 = IND-1 + FT-FNUM-2 - 1 + 32
ELSE ADD 40 TO IND-1.
MOVE IND-1 TO SECTION-NUMBER.
PERFORM INIT-SEC-CH. PERFORM GET-SECTION.
GO TO MF-1, MF-2, MF-3, MF-4, MF-5, MF-6, MF-7, MF-8, MF-9,
MF-10, MF-11, MF-12, MF-13 DEPENDING ON FT-FNUM-2.
GO TO TS-18.
MF-1.
MOVE FT-ALPHA TO CH-ALPHA-U.
GO TO TS-18-WRITE-2.
MF-2.
MOVE FT-ALPHANU TO CH-AN-U.
GO TO TS-18-WRITE-2.
MF-3.
MOVE FT-NUM TO CH-NUM-U.
GO TO TS-18-WRITE-2.
MF-4.
MOVE FT-DASH TO CH-DASH-U.
GO TO TS-18-WRITE-2.
MF-5.
MOVE FT-DEC TO CH-DEC-U.
GO TO TS-18-WRITE-2.
MF-6.
MOVE FT-JULIAN TO CH-JULIAN-U.
GO TO TS-18-WRITE-2.
MF-7.
MOVE FT-MILITARY TO CH-MILITARY-U.
GO TO TS-18-WRITE-2.
MF-8.
MOVE FT-SLASH TO CH-SLASH-U.
GO TO TS-18-WRITE-2.
MF-9.
MOVE FT-CH-M4 TO CH-M4-0-U.
GO TO TS-18-WRITE-2.
MF-10.
MOVE FT-CH-M4-2 TO CH-M4-2-U.
GO TO TS-18-WRITE-2.
MF-11.
MOVE FT-CH-M4-7 TO CH-M4-7-U.
GO TO TS-18-WRITE-2.
MF-12.
MOVE FT-SSN TO CH-SSN-U.
GO TO TS-18-WRITE-2.
MF-13.
MOVE FT-YN TO CH-YN-U.
GO TO TS-18-WRITE-2.
TS-18-WRITE-2.
GO TO TS-18-WRITE-N, TS-18-WRITE-A, TS-18-WRITE-S
DEPENDING ON FT-HSNUM-2.
TS-18-WRITE-N.
ENTER MACRO TFRWRT USING FIELD-NUMBER, EC.
GO TO TS-18-END.
TS-18-WRITE-A.
ENTER MACRO TFRWRT USING ASCII-NAME, EC.
GO TO TS-18-END.
TS-18-WRITE-S.
ENTER MACRO TFRWRT USING SIXBIT-NAME, EC.
GO TO TS-18-END.
TS-18-CLEAR.
GO TO TS-18-CLEAR-N, TS-18-CLEAR-A, TS-18-CLEAR-S
DEPENDING ON FT-HSNUM-2.
GO TO TS-18.
TS-18-CLEAR-N.
ENTER MACRO TFRCLR USING FIELD-NUMBER, EC.
GO TO TS-18.
TS-18-CLEAR-A.
ENTER MACRO TFRCLR USING ASCII-NAME, EC.
GO TO TS-18.
TS-18-CLEAR-S.
ENTER MACRO TFRCLR USING SIXBIT-NAME, EC.
GO TO TS-18.
TS-18-CHANGE.
IF FIELD-NUMBER = -6 GO TO TS-18.
MOVE -28 TO SECTION-NUMBER. PERFORM GET-SECTION.
GO TO TS-18-CHANGE-N, TS-18-CHANGE-A, TS-18-CHANGE-S
DEPENDING ON FT-HSNUM-2.
GO TO TS-18.
TS-18-CHANGE-N.
PERFORM ASC-ATTR.
ENTER MACRO TFRCHG USING FIELD-NUMBER, AT-1, AT-2, AT-3, AT-4, EC.
GO TO TS-18-CHANGE-END.
TS-18-CHANGE-A.
PERFORM ASC-ATTR.
ENTER MACRO TFRCHG USING ASCII-NAME, AT-1, AT-2, AT-3, AT-4, EC.
GO TO TS-18-CHANGE-END.
TS-18-CHANGE-S.
PERFORM SIX-ATTR.
ENTER MACRO TFRCHG USING SIXBIT-NAME, ST-1, ST-2, ST-3, ST-4,EC.
GO TO TS-18-CHANGE-END.
TS-18-CHANGE-END.
MOVE FT-CHG-R1 TO CHKR (FT-FNUM-2).
IF FT-CHG-R1 = 1
PERFORM NO-LOW THRU NO-LOW-EXIT
PERFORM NO-HIGH THRU NO-HIGH-EXIT
GO TO GET-RANGES.
IF FT-CHG-R1 = 2
GO TO GET-RANGES.
IF FT-CHG-R1 = 3
PERFORM NO-HIGH THRU NO-HIGH-EXIT
GO TO GET-RANGES.
IF FT-CHG-R1 = 4
PERFORM NO-LOW THRU NO-LOW-EXIT
GO TO GET-RANGES.
TS-18-CHANGE-EXIT.
MOVE FT-CHG-T1 TO CHST (FT-FNUM-2, 1).
MOVE FT-CHG-D1 TO CHST (FT-FNUM-2, 2).
MOVE FT-CHG-E1 TO CHST (FT-FNUM-2, 3).
MOVE FT-CHG-P1 TO CHST (FT-FNUM-2, 4).
MOVE FT-CHG-R1 TO CHKR (FT-FNUM-2).
GO TO TS-18.
NO-LOW.
GO TO NL-1, NL-2, NL-3, NL-4, NL-5, NL-6, NL-7, NL-8,
NL-9, NL-10, NL-11, NL-12, NL-13
DEPENDING ON FT-FNUM-2.
NL-1.
MOVE LOW-VALUES TO CH-ALPHA-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-ALPHA-RL, EC.
GO TO NO-LOW-EXIT.
NL-2.
MOVE LOW-VALUES TO CH-AN-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-AN-RL, EC.
GO TO NO-LOW-EXIT.
NL-3.
MOVE LOW-VALUES TO CH-NUM-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-NUM-RL, EC.
GO TO NO-LOW-EXIT.
NL-4.
MOVE LOW-VALUES TO CH-DASH-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-DASH-RL, EC.
GO TO NO-LOW-EXIT.
NL-5.
MOVE LOW-VALUES TO CH-DEC-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-DEC-RL, EC.
GO TO NO-LOW-EXIT.
NL-6.
MOVE LOW-VALUES TO CH-JULIAN-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-JULIAN-RL, EC.
GO TO NO-LOW-EXIT.
NL-7.
MOVE LOW-VALUES TO CH-MILITARY-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-MILITARY-RL, EC.
GO TO NO-LOW-EXIT.
NL-8.
MOVE LOW-VALUES TO CH-SLASH-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-SLASH-RL, EC.
GO TO NO-LOW-EXIT.
NL-9.
MOVE LOW-VALUES TO CH-M4-0-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-M4-0-RL, EC.
GO TO NO-LOW-EXIT.
NL-10.
MOVE LOW-VALUES TO CH-M4-2-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-M4-2-RL, EC.
GO TO NO-LOW-EXIT.
NL-11.
MOVE LOW-VALUES TO CH-M4-7-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-M4-7-RL, EC.
GO TO NO-LOW-EXIT.
NL-12.
MOVE LOW-VALUES TO CH-SSN-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-SSN-RL, EC.
GO TO NO-LOW-EXIT.
NL-13.
MOVE LOW-VALUES TO CH-YN-RL.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'LOWER-RANGE',
CH-YN-RL, EC.
GO TO NO-LOW-EXIT.
NO-LOW-EXIT. EXIT.
NO-HIGH.
GO TO HL-1, HL-2, HL-3, HL-4, HL-5, HL-6, HL-7, HL-8,
HL-9, HL-10, HL-11, HL-12, HL-13
DEPENDING ON FT-FNUM-2.
HL-1.
MOVE LOW-VALUES TO CH-ALPHA-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-ALPHA-RU, EC.
GO TO NO-HIGH-EXIT.
HL-2.
MOVE LOW-VALUES TO CH-AN-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-AN-RU, EC.
GO TO NO-HIGH-EXIT.
HL-3.
MOVE LOW-VALUES TO CH-NUM-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-NUM-RU, EC.
GO TO NO-HIGH-EXIT.
HL-4.
MOVE LOW-VALUES TO CH-DASH-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-DASH-RU, EC.
GO TO NO-HIGH-EXIT.
HL-5.
MOVE LOW-VALUES TO CH-DEC-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-DEC-RU, EC.
GO TO NO-HIGH-EXIT.
HL-6.
MOVE LOW-VALUES TO CH-JULIAN-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-JULIAN-RU, EC.
GO TO NO-HIGH-EXIT.
HL-7.
MOVE LOW-VALUES TO CH-MILITARY-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-MILITARY-RU, EC.
GO TO NO-HIGH-EXIT.
HL-8.
MOVE LOW-VALUES TO CH-SLASH-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-SLASH-RU, EC.
GO TO NO-HIGH-EXIT.
HL-9.
MOVE LOW-VALUES TO CH-M4-0-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-M4-0-RU, EC.
GO TO NO-HIGH-EXIT.
HL-10.
MOVE LOW-VALUES TO CH-M4-2-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-M4-2-RU, EC.
GO TO NO-HIGH-EXIT.
HL-11.
MOVE LOW-VALUES TO CH-M4-7-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-M4-7-RU, EC.
GO TO NO-HIGH-EXIT.
HL-12.
MOVE LOW-VALUES TO CH-SSN-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-SSN-RU, EC.
GO TO NO-HIGH-EXIT.
HL-13.
MOVE LOW-VALUES TO CH-YN-RU.
ENTER MACRO TFRCHG USING FIELD-NUMBER,'UPPER-RANGE',
CH-YN-RU, EC.
GO TO NO-HIGH-EXIT.
NO-HIGH-EXIT. EXIT.
GET-RANGES.
MOVE -7 TO SECTION-NUMBER. PERFORM CLEAR-SECTION.
IF FT-CHG-R1 = 1
MOVE 2 TO FT-CHG-C1
ENTER MACRO TFRWRT USING 'FT-CHG-C1', EC
GO TO TS-18-CHANGE-EXIT.
IF FT-CHG-C1 = 2 GO TO TS-18-CHANGE-EXIT.
COMPUTE IND-1 = FIRST-RANGE-NUM - 2 + FT-FNUM-2 * 2.
IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
COMPUTE IND-1 = IND-1 + FT-FNUM-2 * 2 - 2 + 16
ELSE ADD 32 TO IND-1.
MOVE IND-1 TO SECTION-NUMBER. PERFORM INIT-SEC-CH.
MOVE IND-1 TO IND.
ADD 1 TO IND-1.
IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
ADD 1 TO IND-1.
MOVE IND-1 TO SECTION-NUMBER. PERFORM INIT-SEC-CH.
IF FT-CHG-R1 = 2 OR FT-CHG-R1 = 3 PERFORM CHANGE-R-DO.
ADD 1 TO IND.
IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
ADD 1 TO IND.
IF FT-CHG-R1 = 2 OR FT-CHG-R1 = 4 PERFORM CHANGE-R-DO.
ADD 1 TO IND.
PERFORM CHANGE-R-CHANGE THRU CRC-EXIT-IT.
GO TO TS-18-CHANGE-EXIT.
ASC-ATTR.
IF FT-CHG-E1 = 1
MOVE 'REQUIRED' TO AT-1
ELSE
MOVE 'OPTIONAL' TO AT-1.
IF FT-CHG-T1 = 1
MOVE 'ALPHABETIC' TO AT-2
ELSE
IF FT-CHG-T1 = 3
MOVE 'ALPHANUMERIC' TO AT-2
ELSE
MOVE 'NUMERIC' TO AT-2.
IF FT-CHG-P1 = 1
MOVE 'PROTECTED' TO AT-3
ELSE
MOVE 'UNPROTECTED' TO AT-3.
IF FT-CHG-D1 = 3
MOVE 'NO-DUPE' TO AT-4
ELSE
IF FT-CHG-D1 = 2
MOVE 'PREVIOUS-DUPE' TO AT-4
ELSE
MOVE 'MASTER-DUPE' TO AT-4.
SIX-ATTR.
IF FT-CHG-E1 = 1
MOVE 'REQUIRED' TO ST-1
ELSE
MOVE 'OPTIONAL' TO ST-1.
IF FT-CHG-T1 = 1
MOVE 'ALPHABETIC' TO ST-2
ELSE
IF FT-CHG-T1 = 3
MOVE 'ALPHANUMERIC' TO ST-2
ELSE
MOVE 'NUMERIC' TO ST-2.
IF FT-CHG-P1 = 1
MOVE 'PROTECTED' TO ST-3
ELSE
MOVE 'UNPROTECTED' TO ST-3.
IF FT-CHG-D1 = 3
MOVE 'NO-DUPE' TO ST-4
ELSE
IF FT-CHG-D1 = 2
MOVE 'PREVIOUS-DUPE' TO ST-4
ELSE
MOVE 'MASTER-DUPE' TO ST-4.
TS-18-END.
MOVE EC TO FT-ERR-2.
ENTER MACRO TFRWRT USING 'FT-ERR-2', EC.
IF FIELD-NUMBER NOT EQUAL -6
ADD FIRST-FIELD-NUM IND-1 -1 GIVING FIELD-NUMBER
ELSE MOVE -5 TO FIELD-NUMBER.
IF (FIELD-NUMBER NOT EQUAL -5 AND DESIRED-TEST = 23) IF FT-FNUM-2 < 9
SUBTRACT 1 FROM FIELD-NUMBER.
IF FT-COM-2 = 2 OR FT-COM-2 = 3
PERFORM MOVE-CH-DATA
ENTER MACRO TFRWRT USING FIELD-NUMBER, EC.
GO TO TS-18.
TTEST-19.
MOVE "TTEST-19.FORM-DATA" TO FORM-FILE.
MOVE 0 TO SECTION-NUMBER.
PERFORM INIT-SEC-CH.
MOVE 'YYYYYYYYYNYYNNYNYYNNYNYYYYYYYYYYYYYYYNY' TO LEGAL-FILL.
* 111222333444555666777888999000AAABBBCCC
MOVE 0 TO CURRENT-TYPE.
MOVE 2 TO CURRENT-DUP.
MOVE 2 TO CURRENT-ENTRY.
MOVE 2 TO CURRENT-PROT.
MOVE 1 TO CURRENT-RANGE.
MOVE CURRENT-TYPE TO CH-TYP-2.
MOVE CURRENT-DUP TO CH-DUP-2.
MOVE CURRENT-ENTRY TO CH-ENT-2.
MOVE CURRENT-PROT TO CH-PRO-2.
MOVE CURRENT-RANGE TO CH-RANGE-CHK-2.
* SET UP THE STATUS FOR EACH (OF 13) FIELDS.
TT-19A.
MOVE ' 1 2 2 2' TO CH-ST(1).
MOVE ' 3 2 2 2' TO CH-ST(2).
MOVE ' 2 2 2 2' TO CH-ST(3) CH-ST(4).
MOVE ' 3 2 2 2' TO CH-ST(5).
MOVE ' 2 2 2 2' TO CH-ST(6).
MOVE ' 3 2 2 2' TO CH-ST(7).
MOVE ' 2 2 2 2' TO CH-ST(8) CH-ST(9) CH-ST(10) CH-ST(11) CH-ST(12).
MOVE ' 3 2 2 2' TO CH-ST(13).
IF DESIRED-TEST = 23
MOVE ' 3 2 2 2' TO CH-ST(1) CH-ST(3) CH-ST(4) CH-ST(6)
CH-ST(8) CH-ST(9) CH-ST(10) CH-ST(11) CH-ST(12).
TT-19A-END.
MOVE 99 TO EC.
MOVE EC TO CH-ER(1), CH-ER(2), CH-ER(3), CH-ER(4), CH-ER(5),
CH-ER(6), CH-ER(7), CH-ER(8), CH-ER(9), CH-ER(10), CH-ER(11),
CH-ER(12), CH-ER(13).
MOVE -9 TO SECTION-NUMBER. PERFORM WRITE-SECTION.
MOVE -10 TO SECTION-NUMBER. PERFORM WRITE-SECTION.
MOVE -12 TO SECTION-NUMBER. PERFORM WRITE-SECTION.
MOVE 0 TO SECTION-NUMBER.
* PERFORM INIT-SEC-CH.
* READ THE YES NO QUESTIONS
T19-READ.
MOVE -12 TO SECTION-NUMBER.
PERFORM WRITE-SECTION.
MOVE -4 TO SECTION-NUMBER.
PERFORM READ-SECTION.
MOVE -13 TO SECTION-NUMBER.
PERFORM READ-SECTION.
MOVE -12 TO SECTION-NUMBER.
PERFORM READ-SECTION.
PERFORM CHECK-FOR-FINISHED.
IF DONE-FLAG = 0 GO TO START-UP.
IF CURRENT-RANGE NOT = CH-RANGE-CHK-2
PERFORM EDIT-RANGE.
IF CURRENT-TYPE NOT = CH-TYP-2
PERFORM CHANGE-TYPE.
IF CURRENT-DUP NOT = CH-DUP-2
PERFORM CHANGE-DUP.
IF CURRENT-ENTRY NOT = CH-ENT-2
PERFORM CHANGE-ENTRY.
IF CURRENT-PROT NOT = CH-PRO-2
PERFORM CHANGE-PROT.
IF CH-RANGE = 'Y' PERFORM CHANGE-RANGE.
IF CH-ANS-1 = 'Y'
PERFORM MOVE-CH-DATA
MOVE -5 TO SECTION-NUMBER
PERFORM WRITE-SECTION.
IF CH-ANS-2 = 'Y'
MOVE -6 TO SECTION-NUMBER
PERFORM READ-SECTION.
IF CH-ANS-3 = 'Y'
GO TO TTEST-19.
GO TO T19-READ.
CHECK-FOR-FINISHED.
MOVE 1 TO DONE-FLAG.
IF CH-ANS-1 = 'N' AND CH-ANS-2 = 'N' AND CH-ANS-3 = 'N'
AND CH-RANGE = 'N' AND
CURRENT-TYPE = CH-TYP-2 AND
CURRENT-DUP = CH-DUP-2 AND
CURRENT-ENTRY= CH-ENT-2 AND
CURRENT-PROT = CH-PRO-2 AND
CURRENT-RANGE = CH-RANGE-CHK-2
MOVE 0 TO DONE-FLAG.
INIT-SEC-CH.
ENTER MACRO TFRINI USING CH-RECORD, FORM-FILE, SECTION-NUMBER,
ERROR-CODE.
IF ERROR-CODE = 7 MOVE 0 TO ERROR-CODE.
IF ERROR-CODE NOT = 0
DISPLAY 'INIT-SEC-CH ERROR CODE = ' ERROR-CODE
DISPLAY ' '
DISPLAY ' '
STOP RUN.
MOVE-CH-DATA.
MOVE CH-ALPHA-U TO CH-ALPHA-P.
MOVE CH-AN-U TO CH-AN-P.
MOVE CH-NUM-U TO CH-NUM-P.
MOVE CH-DASH-U TO CH-DASH-P.
MOVE CH-DEC-U TO CH-DEC-P.
MOVE CH-JULIAN-U TO CH-JULIAN-P.
MOVE CH-MILITARY-U TO CH-MILITARY-P.
MOVE CH-SLASH-U TO CH-SLASH-P.
MOVE CH-M4-0-U TO CH-M4-0-P.
MOVE CH-M4-2-U TO CH-M4-2-P.
MOVE CH-M4-7-U TO CH-M4-7-P.
MOVE CH-SSN-U TO CH-SSN-P.
MOVE CH-YN-U TO CH-YN-P.
TTEST-20.
MOVE "TTEST-20.FORM-DATA" TO FORM-FILE.
GO TO TTEST-1A.
TTEST-21.
MOVE "TTEST.EXE" TO PROGRAM-NAME.
ENTER MACRO IPRUNI USING PROGRAM-NAME, EC.
ENTER MACRO TFRSET.
ENTER MACRO TFRRWT.
GO TO START-UP.
TTEST-22.
MOVE 'TITLE-LINE' TO ASCII-NAME. MOVE 1 TO IND. PERFORM T22A.
MOVE 'DIRECTION' TO ASCII-NAME. MOVE 2 TO IND. PERFORM T22A.
MOVE 'TEST-2' TO ASCII-NAME. MOVE 4 TO IND. PERFORM T22A.
MOVE 'TEST-6' TO ASCII-NAME. MOVE 8 TO IND. PERFORM T22A.
MOVE 'TEST-14' TO ASCII-NAME. MOVE 16 TO IND. PERFORM T22A.
GO TO START-UP.
T22A.
ENTER MACRO TFRFNO USING ASCII-NAME, FIELD-NUMBER, EC.
IF EC NOT = 0
DISPLAY ' '
DISPLAY ' '
DISPLAY 'TFRFNO ERROR=' EC ' NAME='ASCII-NAME
STOP RUN.
IF FIELD-NUMBER NOT = IND
DISPLAY ' ' DISPLAY ' '
DISPLAY 'TFRFNO NOT MATCH NAME='ASCII-NAME ' WANT='IND,
' GOT='FIELD-NUMBER
STOP RUN.
TTEST-23.
MOVE "TTEST-23.FORM-DATA" TO FORM-FILE.
GO TO TTEST-18-START.
TTEST-24.
MOVE "TTEST-24.FORM-DATA" TO FORM-FILE.
ENTER MACRO TFRINI USING T24-RECORD,FORM-FILE,0,EC.
IF EC NOT = 0
DISPLAY ' ' DISPLAY ' ' DISPLAY ' '
DISPLAY 'ERROR='EC ' ON CALL TO TFRINI IN TTEST-24.'
STOP RUN.
TTEST-24A.
ENTER MACRO TFRRD USING -3,END-INDICATOR,EC.
MOVE T24V TO T24-VAR. MOVE T24NV TO T24-NVAL.
IF T24V = 0 GO TO START-UP.
ENTER MACRO TFRSYS USING T24-VAR,T24-NVAL,T24-OVAL,EC.
MOVE T24-OVAL TO T24OV. MOVE EC TO T24E.
ENTER MACRO TFRWRT USING -4,EC.
GO TO TTEST-24A.
TTEST-25.
ENTER MACRO TFRCLR.
ENTER MACRO TFRRST.
DISPLAY ' TEST-25'.
DISPLAY ' '. DISPLAY ' '. DISPLAY ' '.
DISPLAY 'DISPLAY/ACCEPT TEST'.
DISPLAY ' '. DISPLAY ' '. DISPLAY ' '.
DISPLAY 'WHAT IS THE ANSWER ?'
ACCEPT THE-ANSWER.
DISPLAY 'YOU ARE RIGHT !!!! WITH ' THE-ANSWER.
DISPLAY ' '. DISPLAY ' '. DISPLAY ' '.
DISPLAY 'ENTER A <CR> TO GET A FORM :' WITH NO ADVANCING.
ACCEPT THE-ANSWER.
ENTER MACRO TFRSET.
T25-1.
MOVE "TTEST-1.FORM-DATA" TO FORM-FILE.
MOVE -1 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -2 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -3 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -4 TO SECTION-NUMBER.
PERFORM INIT-SEC-TEST.
MOVE -4 TO SECTION-NUMBER.
PERFORM READ-SECTION.
ENTER MACRO TFRCLR USING 0,EC.
DISPLAY ' ' DISPLAY 'NOW AFTER THE SCREEN'
DISPLAY ' '. DISPLAY ' '. DISPLAY ' '.
DISPLAY 'ENTER AGAIN TO ACCEPT: ' WITH NO ADVANCING.
ENTER MACRO TFRRST.
ACCEPT THE-ANSWER.
IF THE-ANSWER NOT = ' ' GO TO TTEST-25.
ENTER MACRO TFRSET.
GO TO START-UP.
TTEST-26.
MOVE 'TTEST-1.FORM-DATA' TO SIXBIT-FORM-NAME.
PERFORM TT-26-INIT.
CALL TFRRST.
DISPLAY 'GO ON ?' WITH NO ADVANCING.
ACCEPT ANS-1.
CALL TFRSET.
IF ANS-1 NOT = 'Y' GO TO START-UP.
PERFORM TT-26-INIT.
CALL TFRERR USING 'ERR-01234567890123456789012345678901234567890123456789',0,EC.
CALL TFRRST.
DISPLAY 'GO ON ?' WITH NO ADVANCING.
ACCEPT ANS-1.
CALL TFRSET.
IF ANS-1 NOT = 'Y' GO TO START-UP.
PERFORM TT-26-INIT.
CALL TFRRST.
DISPLAY 'GO ON ?' WITH NO ADVANCING.
ACCEPT ANS-1.
CALL TFRSET.
GO TO START-UP.
TT-26-INIT.
ENTER MACRO TFRINI USING NV-RECORD, SIXBIT-FORM-NAME, -1, EC.
ENTER MACRO TFRERR USING 'INIT STATUS=',0,ERROR-CODE.
CALL TFRSET.
DISPLAY EC ' ' WITH NO ADVANCING.
CALL TFRRST.
TT-26-INIT-EXIT. EXIT.
NORMAL-EXIT.
MOVE 0 TO FIELD-IDS.
ENTER MACRO TFRCLR.
STOP RUN.
MOVE-DATA.
MOVE NV-ALPHA-U TO NV-ALPHA-P.
MOVE NV-AN-U TO NV-AN-P.
MOVE NV-NUM-U TO NV-NUM-P.
MOVE NV-DASH-U TO NV-DASH-P.
MOVE NV-DEC-U TO NV-DEC-P.
MOVE NV-JULIAN-U TO NV-JULIAN-P.
MOVE NV-MILITARY-U TO NV-MILITARY-P.
MOVE NV-SLASH-U TO NV-SLASH-P.
MOVE NV-M4-0-U TO NV-M4-0.
MOVE NV-M4-2-U TO NV-M4-2-P.
MOVE NV-M4-7-U TO NV-M4-7-P.
MOVE NV-SSN-U TO NV-SSN-P.
MOVE NV-YN-U TO NV-YN-P.
CHANGE-DUP.
IF CH-DUP-2 = 1
MOVE "MASTER-DUPE" TO THE-ATTRIBUTE
ELSE IF CH-DUP-2 = 2
MOVE "PREVIOUS-DUPE" TO THE-ATTRIBUTE
ELSE
MOVE "NO-DUPE" TO THE-ATTRIBUTE.
MOVE CH-DUP-2 TO CURRENT-DUP.
MOVE CH-DUP-2 TO THE-VALUE.
MOVE 2 TO IND-2.
PERFORM CHANGE-IT THRU CHANGE-IT-EXIT.
CHANGE-PROT.
IF CH-PRO-2 = 1
MOVE "PROTECTED" TO THE-ATTRIBUTE
ELSE
MOVE "UNPROTECTED" TO THE-ATTRIBUTE.
MOVE CH-PRO-2 TO CURRENT-PROT.
MOVE CH-PRO-2 TO THE-VALUE.
MOVE 4 TO IND-2.
PERFORM CHANGE-IT THRU CHANGE-IT-EXIT.
CHANGE-ENTRY.
IF CH-ENT-2 = 1
MOVE "REQUIRED" TO THE-ATTRIBUTE
ELSE
MOVE "OPTIONAL" TO THE-ATTRIBUTE.
MOVE CH-ENT-2 TO CURRENT-ENTRY.
MOVE CH-ENT-2 TO THE-VALUE.
MOVE 3 TO IND-2.
PERFORM CHANGE-IT THRU CHANGE-IT-EXIT.
CHANGE-TYPE.
IF CH-TYP-2 = 1
MOVE "ALPHABETIC" TO THE-ATTRIBUTE
ELSE IF CH-TYP-2 = 2
MOVE "ALPHANUMERIC" TO THE-ATTRIBUTE
ELSE IF CH-TYP-2 = 3
MOVE "NUMERIC" TO THE-ATTRIBUTE.
IF CH-TYP-2 = 0
MOVE CURRENT-TYPE TO CH-TYP-2
ELSE
MOVE CH-TYP-2 TO CURRENT-TYPE
MOVE CH-TYP-2 TO THE-VALUE
MOVE 1 TO IND-2.
PERFORM CHANGE-IT THRU CHANGE-IT-EXIT.
EDIT-RANGE.
IF CH-RANGE-CHK-2 = 2
MOVE 'LOWER-RANGE' TO THE-ATTRIBUTE
MOVE 0 TO IND-2
PERFORM CHANGE-IT
MOVE -7 TO SECTION-NUMBER
PERFORM CLEAR-SECTION
MOVE -8 TO SECTION-NUMBER
PERFORM CLEAR-SECTION
ELSE
COMPUTE IND-3 = FIRST-RANGE-NUM + 2
COMPUTE MAX = FIRST-RANGE-NUM + NUMBER-OF-FIELDS
PERFORM CHANGE-R-CHANGE THRU CRC-EXIT-IT
VARYING IND FROM IND-3 BY 2
UNTIL IND = MAX.
MOVE CH-RANGE-CHK-2 TO CURRENT-RANGE.
CHANGE-IT.
MOVE 0 TO EC.
MOVE 25 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 27 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 29 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 31 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 33 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 35 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 37 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 39 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 41 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 43 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 45 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 47 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
MOVE 49 TO FIELD-NUMBER.
PERFORM CHANGE-IT-NOW.
CHANGE-IT-EXIT. EXIT.
CHANGE-IT-NOW.
COMPUTE IND-1 = (FIELD-NUMBER - 23) / 2.
IF IND-2 = 1 AND LEGAL-TYPE (IND-1,CURRENT-TYPE) = 'Y'
PERFORM CIN.
IF IND-2 NOT = 1 PERFORM CIN.
CIN.
ENTER MACRO TFRCHG USING FIELD-NUMBER, THE-ATTRIBUTE, EC.
MOVE EC TO CH-ER (IND-1).
COMPUTE SECTION-NUMBER = FIELD-NUMBER + 52
PERFORM WRITE-SECTION.
COMPUTE IND-3 = FIELD-NUMBER + 25.
IF EC = 0 AND IND-2 > 0
ENTER MACRO TFRCHG USING IND-3, THE-ATTRIBUTE, EC
ADD 1 TO IND-3
ENTER MACRO TFRCHG USING IND-3, THE-ATTRIBUTE, EC
MOVE THE-VALUE TO CHST (IND-1, IND-2)
COMPUTE SECTION-NUMBER = FIELD-NUMBER + 51
PERFORM WRITE-SECTION.
CHANGE-RANGE.
* FIRST PRINT ALL THE RANGE VARIABLES
MOVE -7 TO SECTION-NUMBER.
PERFORM INIT-SEC-CH.
MOVE -8 TO SECTION-NUMBER.
PERFORM INIT-SEC-CH.
* CHANGE THE RANGE VARIABLES FROM PROTECTED TO NON-PROTECTED
* AND READ EACH ONE.
MOVE FIRST-RANGE-NUM TO IND.
ADD FIRST-RANGE-NUM NUMBER-OF-FIELDS GIVING MAX.
PERFORM CHANGE-R-LOOP THRU CHANGE-R-EXIT.
CHANGE-R-LOOP.
PERFORM CHANGE-R-DO THRU CHANGE-R-DO-EXIT.
ADD 1 TO IND.
PERFORM CHANGE-R-DO THRU CHANGE-R-DO-EXIT.
ADD 1 TO IND.
PERFORM CHANGE-R-CHANGE THRU CRC-EXIT-IT.
IF IND = MAX GO TO CHANGE-R-EXIT
ELSE GO TO CHANGE-R-LOOP.
CHANGE-R-EXIT. EXIT.
CHANGE-R-DO.
ENTER MACRO TFRCHG USING IND, 'UNPROTECTED', ERROR-CODE.
ENTER MACRO TFRRD USING IND, END-INDICATOR, ERROR-CODE.
ENTER MACRO TFRCHG USING IND, 'PROTECTED',ERROR-CODE.
CHANGE-R-DO-EXIT. EXIT.
CHANGE-R-CHANGE.
MOVE 0 TO EC.
COMPUTE IND-1 = ( IND - FIRST-RANGE-NUM ) / 2.
COMPUTE TEMP-FIELD-NUMBER = FT-FNUM-2 * 2 - 1.
IF DESIRED-TEST = 23 IF FT-FNUM-2 < 9
COMPUTE TEMP-FIELD-NUMBER = TEMP-FIELD-NUMBER
+ FT-FNUM-2 * 2 - 1
ELSE ADD 16 TO TEMP-FIELD-NUMBER.
ADD FIRST-FIELD-NUM TO TEMP-FIELD-NUMBER.
GO TO CR-01, CR-02, CR-03, CR-04, CR-05, CR-06, CR-07,
CR-08, CR-09, CR-10, CR-11, CR-12, CR-13
DEPENDING ON FT-FNUM-2.
CR-01.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-ALPHA-RL,UL,CH-ALPHA-RU,EC.
GO TO CRC-EXIT.
CR-02.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-AN-RL,UL,CH-AN-RU,EC.
GO TO CRC-EXIT.
CR-03.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-NUM-RL,UL,CH-NUM-RU,EC.
GO TO CRC-EXIT.
CR-04.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-DASH-RL,UL,CH-DASH-RU,EC.
GO TO CRC-EXIT.
CR-05.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-DEC-RL,UL,CH-DEC-RU,EC.
GO TO CRC-EXIT.
CR-06.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-JULIAN-RL,UL,CH-JULIAN-RU,EC.
GO TO CRC-EXIT.
CR-07.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-MILITARY-RL,UL,CH-MILITARY-RU,EC.
GO TO CRC-EXIT.
CR-08.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-SLASH-RL,UL,CH-SLASH-RU,EC.
GO TO CRC-EXIT.
CR-09.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-M4-0-RL,UL,CH-M4-0-RU,EC.
GO TO CRC-EXIT.
CR-10.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-M4-2-RL-X,UL,CH-M4-2-RU,EC.
GO TO CRC-EXIT.
CR-11.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-M4-7-RL,UL,CH-M4-7-RU,EC.
GO TO CRC-EXIT.
CR-12.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-SSN-RL,UL,CH-SSN-RU,EC.
GO TO CRC-EXIT.
CR-13.
ENTER MACRO TFRCHG USING TEMP-FIELD-NUMBER,
LL,CH-YN-RL,UL,CH-YN-RU,EC.
GO TO CRC-EXIT.
CRC-EXIT.
MOVE EC TO CH-ER (FT-FNUM-2).
MOVE -10 TO SECTION-NUMBER.
PERFORM WRITE-SECTION.
CRC-EXIT-IT. EXIT.