000100 Identification Division. 000200 Program-Id. OVN18TAB. 000300 Environment Division. 000400 Input-Output Section. 000500 File-Control. 000600 Select GRPFIL Assign to GRPDD 000700 Organization is Indexed 000800 Access Is Sequential 000900 Record Key is NYCKEL 001000 . 001100 Data Division. 001200 File Section. 001300 FD GRPFIL. 001400 01 Grpfil-Post. 001500 05 Nyckel Pic X(01). 001600 05 Grpfil-Beskrivning Pic X(79). 001700 001800 Working-Storage Section. 001900 01 Grp-Tabell. 002000 05 Grp-Tabellrad occurs 25 002100 Depending on Tabant 002200 Ascending Key is Grp-Nyckel 002300 Indexed by Tabindex. 002400 10 Grp-Nyckel Pic X(01). 002500 10 Grp-Beskrivning Pic X(25). 002600 002700 01 Raknare-och-Annat. 002800 05 Tabant Pic 99 Value 0. 002900 003000 01 Villkor1 Pic 9 Value 0. 003100 88 Tabklar Value 1. 003200 01 Villkor1 Pic 9 Value 0. 003300 88 GrpfilClosed Value 0. 003400 88 GrpfilOpen Value 1. 003500 Linkage Section. 003600 01 LS-Tabpgm-Post. 003700 05 LS-Grp-Nyckel Pic X(01). 003800 05 LS-Grp-Beskrivning Pic X(25). 004000 004100 Procedure Division Using LS-Tabpgm-Post. 004200 If GrpfilClosed 004300 Perform Initiera 004400 Perform Fyll-Grptabell 004500 End-If 004600 Perform Sok-Grp-Tabell 004700 GoBack 004800 . 004900 Initiera. 005000 Open Input GRPFIL 005100 Display 'OPEN av GRPFIL ok...' 005200 Set GrpfilOpen to True 005300 . 005400 Fyll-Grptabell. 005500 Perform Until Tabklar 005600 Read Grpfil 005700 At End 005800 Set Tabklar to True 005900 Not At End 006000 Add 1 to Tabant 006100 Move Grpfil-Post to Grp-Tabellrad(Tabant) 006200 End-Read 006300 End-Perform 006400 . 006500 Sok-Grp-Tabell. 006600 Search All Grp-Tabellrad 006700 At End 006800 Move '*** I/U ***' 006900 to LS-Grp-Beskrivning 007000 When Grp-Nyckel(Tabindex) = LS-Grp-Nyckel 007100 Move Grp-Beskrivning(Tabindex) 007200 to LS-Grp-Beskrivning 007300 End-Search 007400 .