FILE SECTION. 



FD DYNAMIC-HEIGHT-FILE LABEL RECORDS STANDARD 

 RECORD CONTAINS IB CHARACTERS 

 BLOCK CONTAINS 3S4 RECORDS. 

 01 DYNAMIC-HEIGHT-RFC. 

 03 RECORD-KEY. 



05 STANDARD-DEPTH PIC 9(5) USAGE COMP-3 SYNC. 



05 JULIAN-DAY PIC 9(3) USAGE COMP-3 SYNC. 



05 YEAR PIC 9(2) USAGE COMP-3. 



05 LATITUDE PIC 999V999 USAGE COMP-3 SYNC. 

 05 LONGITUDE PIC 999V999 USAGE COMP-3 SYNC. 

 03 DYNAMIC-HEIGHT PIC S99V999 USAGE COMP-3. 



WORKING-STORAGE SECTION. 



01 EOF-FLAG PIC S9999 USAGE COMP SYNC, 



01 GENERIC-KEY. 



03 NOM-STD-OEPTH PIC 9(5) USAGE COMP-3 SYNC. 



03 NOM-FIRST-JULIAN-DAY PIC 9(3) USAGE COMP-3 SYNC. 



LINKAGE SECTION. 



* THESE ARE USED WHEN SETKEY IS CALLED. 



01 FIRST-JULIAN-OAY USAGE COMP-1 SYNC. 



01 LAST-JULIAN-DAY ' USAGE COMP-1 SYNC. 



01 STARTING-STD-OEPTH USAGE COMP-1 SYNC. 



01 KEY-ERROR PIC S9999 USAGE COMP SYNC. 



* THESE ARE USED WHEN READER IS CALLED. 



01 LINK-LATITUDF USAGE COMP-1 SYNC, 



01 LINK-LONGITUDE USAGE COMP-1 SYNC. 



01 LINK-DYNAMIC-HEIGHT USAGE COMP-1 SYNC, 



01 LINK-EOF-FLAG PIC S9999 USAGE COMP SYNC, 



»SETKEY ROUTINE 

 PROCEDURE DIVISION USING FIRST-JULIAN-DAY* LAST-JULIAN-DAY* 



STARTIN6-STD-DEPTH, KEY-ERROP. 

 MOVE ZERO TO EOF-FLAG, KEY-ERROR. 

 OPEN INPUT DYNAMIC-HEIGHT-FILE. 

 MOVE STARTING-STD-DEPTH TO NOM-STD-DEPTH . 

 MOVE FIRST-JULIAN-OAY TO NOM-F IRST-JULI AN-DAY. 



START DYNAMIC-HFIGHT-FILE USING KEY RECORD-KEY = GENERIC-KEY 

 INVALID KEY MOVE 1 TO KEY-ERROR 



CLOSE DYNAMIC-HEIGHT-FILE. 

 GO TO SETKEY-EXIT. 



SETKEY-EXIT. 



EXIT PROGRAM. 



READER-ROUTINE. 



ENTRY •READER' USING LINK-LATITUDE* LINK-LONGITUDF . 



LINK-DYNAMIC-HEIGHT* LINK-EOF-FLAG. 

 MOVE EOF-FLAG TO LINK-EOF-FLAG. 



