INTEGER-?. 



« NOW WE FIND THE JULIAN DATE FACTOR FOR THE DAY THE CAST 

 » WAS TAKEN. 



IF DATE-MONTH < 3 



THEN PERFORM JAN-FEB-FACTOR 



ELSE PERFORM MAR-DEC-FACTOR. 



» NOW WE FIND THE DIFFERENCE IN THE FACTORS, THE JULIAN DAY 

 COMPUTE ST-JULIAN-DAY = FACTOR - JAN-1-FACTOR ♦ 1. 



« MOVE THE REST OF THE FIELDS TO THE OUTPUT BUFFER. 

 MOVE DATE-YEAR TO ST-YEAR. 



MOVE STANDARD-DEPTH TO ST-ST ANDARD-DEPTH, 

 MOVE DYNAMIC-DEPTH TO ST-DYNAMIC-DEPTH, 



» WRITE OUT THE RECORD 6. READ IN DATA FOR THE NEXT LOOP. 

 WRITE STANDARD-DEPTH-REC. 

 ADD 1 TO REC-COUNT. 

 PERFORM READ-REC. 



MAIN-PROCESS-EXIT. 

 EXIT, 



JAN-FEB-FACTOR. 

 *■ THIS MODULE COMPUTES JULIAN DATE FACTORS FOR JANUARY AND 



* FEBRUARY. ALGORITHM FROM TEXAS INSTRUMENTS MASTER LIBRARY. 

 « N0TE...INTEGER-1 &. 2 WERE ALREADY CALCULATED WHEN 



* JAN-1-FACTOR WAS CALCULATED. 



COMPUTE FACTOR = (365 •«■ WS-YEAR) ♦ (31 « (DATE-MONTH - 1) 

 ) ♦ DATE-DAY * INTEGER-1 - INTEGER-2. 



MAR-DEC-FACTOR. 



* THIS MODULE COMPUTES JULIAN DATE FACTORS FOR MARCH THRU 



* DECEMBER. ALGORITHM FROM TEXAS INSTRUMENTS MASTER LIBRARY. 

 COMPUTE REAL-1 = (0.4 » DATE-MONTH) ♦ 2.3. 



MOVE REAL-1 TO INTEGER-1, 



COMPUTE INTEGER-2 = WS-YEAR / 4. 



COMPUTE INTEGER-3 = (WS-YEAR / 100) + 1. 



COMPUTE REAL-3 = INTEGER-3 « 0.75. 



MOVE REAL-3 TO INTEGER-3. 



COMPUTE FACTOR = (365 « WS-YEAR) ♦ (31 « (DATE-MONTH - 1) 



) ♦ DATE-DAY - INTEGER-1 ♦ INTEGER-2 - INTEGER-3. 



READ-REC. 



* THIS MODULE READS RECORDS FROM THE STD DATA TAPE. 

 READ STD-DATA-FILE AT END MOVE 1 TO EOF-FLAG. 



