Outline IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ O What is the Year 2000 problem? O What does "Year 2000 ready" mean? O Year 2000-ready products O How to solve the Year 2000 problem O Y2K conversion and language migration O How to make your applications Y2K ready O DFSORT and the century window O COBOL program samples O Testing your applications O Look out! O How to get more information ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 1 What is the Year 2000 problem? IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ * Date information stored with only 2 digits * Incorrect century - 04 assumed to be 1904 * Arithmetic calculation - A person born in 1950 calculated to be -50 years old - Due date of 30 year mortgage started in 1990 could be calculated to be 1920, paid off! * Sequence - 12/31/99 comes after 01/01/00 - IMS database updates will fail without V5 and fix * Leap Year - If divisible by 100, then not a leap year, right? - Except 2000 is a leap year ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 2 What is the Year 2000 problem? IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | For non-application code: | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| O Archiving and deleting of old datasets * They might not be old on Jan 1 2000! O Conventions of '99365' meaning keep forever * That date is only 3 years and 40 days away O Expiration dates on tape labels O Homemade dataset managers O Any and all system software that has not solved the problem ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 3 What does "Year 2000 ready" mean? IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Year 2000 ready Product | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| The Product, when used in accordance with its associated documentation, is capable of correctly processing, providing and/or receiving date data within and between the twentieth and twenty-first centuries, provided that all products (for example, hardware, software and firmware) used with the Product properly exchange accurate date data with it. O This can be applied to your applications as well O More simply, ask yourself: -> Will your applications run after 1999? -> Will they produce the correct output after 1999? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 4 Year 2000-ready products IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> See the supplied book, GC28-1251 -> Make sure that your hardware is ready -> Make sure that your system software is ready -> Examples: O CICS V3.3 or earlier will not run across midnight 12/31/1999 * Might be able to do a complete ice-cold rebuild/restart for V3.3 O IMS V4 and earlier will fail the first database update of 2000 * 2-digit year dates in IMS Log records * IMS V5 with maintenance uses century window O OS/VS COBOL and VS COBOL II are NOT Year 2000 ready ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 5 Year 2000-ready products IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> Languages are a whole different animal * Non-ready System Software will fail regardless of your applications -> We know of no problems with IBM languages running after 1999 * For COBOL, only COBOL for MVS & VM and Language Environment are ready -> They will run, but old languages only give you a 2-digit year date! * NO 4-digit year date COBOL language in: O OS/VS COBOL or O VS COBOL II -> Your applications need century window and 4-digit year date functions * With only 2-digit year dates and no window, then fail! -> Your applications need to be changed * 90% of financial applications need to be changed * 75% of other applications need to be changed ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 6 How to solve the Year 2000 problem IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1. Replace non-ready hardware 2. Replace non-ready system software 3. Fix all of your applications and data 4. Link and run applications with ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Language Environment for MVS & VM | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| 5. Test That's it! ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 7 Y2K conversion and language migration IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ * Share the same process, and most of the same steps -> Planning -> Inventory -> Ownership -> Status -> (Source conversion/Year2000 changes) -> Compile, link -> Unit Test -> System Test ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Combine and save money and time!| ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄ * "Collateral Benefit" ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 8 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 1. Field expansion * The best, more later 2. Century window * Temporary, not too bad, more later * Sliding or fixed window 3. Century encoding/compression * Can't read in dumps, listings * Must translate whenever externalized * Translation could be wrong * Maintenance more difficult 4. Integer format dates * Can't read in dumps, listings * Must translate whenever externalized * Translation could be wrong ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 9 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | More on integer format dates| ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄ -> Provided by COBOL Intrinsic Functions and by Language Environment date/time callable services -> Number of days from some point in the past -> PRO: Use only 4 bytes to store a date -> CON: Too many Integer format starting dates: * CICS, MVS, DB2 - start with Jan 1, 1900 * PL/I - no integer date values * C - start with Jan 1, 1970 * COBOL - start with Jan 1, 1601 * LE/370 - start with Oct 15, 1582 -> Solution for COBOL: Use COBOL for MVS & VM Install option * INTDATE(LILIAN) or INTDATE(ANSI) * Use INTDATE(LILIAN) to get LE/370 Lilian dates from Intrinsic Functions ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 10 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Long-term solution: Field Expansion | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| O You must eventually: ____ 1. Re-write applications * Use COBOL Intrinsic Functions to get 4-digit year dates OR * Use LE/370 callable services to get 4-digit year dates 2. AND Rebuild databases and files with 4-digit years O The above are the long-term solutions that will take you and your company through to the year 9999 O However, there is a short-term solution that is easier ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 11 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Short-Term solution: Century window | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| -> Use the LE/370 century window in old applications to interpret 2-digit year dates as 4-digit year dates -> Advantages: O Fewer program changes, no database change O Cheaper, quicker, easier -> Disadvantages: O Performance will be slower with the increased logic O This only buys you a few years, depending on the application O You still MUST change all date programs and databases eventually to use 4-digit years ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 12 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Short-Term vs long-term: which is better? | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| ÚÄÄÄÄ> ³ Field Expansion ³ M A ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ A ³ ³ ³ ³ ³ I ³ ³ ³ ³ N C ³ ³ ³ ³ T O ³ ³ ÚÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ E S ³ ³ ³ ³ ³ ³ N T ³ ³ ³ ³ ³ Century Window ³ A S ³ ³ ³ ÀijÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ N ³ ³ ³ ³ C ³ ³ ³ ³ E ³ÄÄÄÙÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ> ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Time Ä> 1996 2000 2020 O Not only will it not work forever: * It will cost more to maintain * You will have to do it all again later! ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 13 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | What to do with historical data with field expansion | | method? | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| -> Basically just two choices for data: * Expand all old files/databases * Keep copies of old data -> Which leads to choices for code: * Copies of old code to access the data as well or * Code needs to handle both 2-digit and 4-digit years O Could use conditional "bridges" when accessing old data ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 14 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Partitions and bridging | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ³ APP1 …ÄÄÄÄ>³ APP2 ³<ÄÄÄÄÄ' DATA3 ³ ³ (YY) ³ ³ (YY) ³ ³ (YY) ³ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄľÄÄÄÙ A A A ³ ³ ³ ³ ³ ³ ³ ³ V ³ ³ ÚÄÄÄÊÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ³ ÀÄÄÄÄÄÄÄÄÄ' DATA1 …ÄÄÄÄÄ>³ APP3 …ÄÄÄ>³ APP4 ³ ³ ³ (YY) ³ ³ (YY) ³ ³ (YY) ³ ³ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ³ A ³ ÚÄÄÄÄÄÄÄ¿ ³ ÀÄÄÄÄÄÄÄÄÄ… DATA2 'ÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (YY) ³ ÀÄÄÄÄÄÄÄÙ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 15 How to make your apps Y2K ready IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | | | | | | | | | | | | | | | | | | | Partitions and bridging | ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| | | | | | | | | ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ| ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ³ APP1 …ÄÄ>³ APP2 ³ÄÄ>³ BRDG ³<ÄÄÄ' DATA3 ³ ³ (YYYY)³ ³ (YYYY)³ ÀÄÄÄÄÄÄÙ ³ (YY) ³ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄľÄÄÄÙ A A A ³ ³ ³ ³ ³ ³ ³ ³ V ³ ³ ÚÄÄÄÊÄÄÄ¿ ÚÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ³ ÀÄÄÄÄÄÄÄ… DATA1 'ÄÄ>³ BRDG ³<ÄÄÄ… APP3 …ÄÄ>³ APP4 ³ ³ ³ (YYYY)³ ÀÄÄÄÄÄÄÙ ³ (YY) ³ ³ (YY) ³ ÚÄÊÄÄÄÄ¿ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÙ ³ BRDG ³ A ÀÄÄÄÄÄÄÙ ³ A ³ ³ ÚÄÄÄÄÄÄÄ¿ ³ ÀÄÄÄÄÄÄÄ… DATA2 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (YY) ³ ÀÄÄÄÄÄÄÄÙ -> Only changed APP1, APP2, DATA1 -> Burn bridges after DATA or APPS changed ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 16 DFSORT and the century window IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> Apply fix for APAR PN71337 (PTF UN90139) to DFSORT R13 -> To use the century window function in a COBOL SORT you need to tell DFSORT when your century window starts and which fields are to be sorted using the century window -> Use the following 2 control statements in JCL: 1. OPTION Y2PAST O OPTION Y2PAST=nn * Where nn=number of years back to start of window O OPTION Y2PAST=nnnn * Where nnnn=fixed window start date 2. SORT FIELDS=(n,n,Y2C,A,...) O Where Y2C, Y2Z, Y2P, and Y2D identify 2-digit year fields in character, zoned decimal, packed decimal, and decimal form -> For more information, see DFSORT documentation www.storage.ibm.com/storage/software/sort/srtmhome/htm ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 17 DFSORT and the century window IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> The OPTION statement can be coded in the IGZSRTCD DD statement ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //IGZSRTCD DD * OPTION Y2PAST=20 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> The SORT control statement must be coded in a DFSPARM DD statement -> To SORT records that start with mm/dd/yy as yyyymmdd: ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ //DFSPARM DD * SORT FIELDS=(7,2,Y2C,A, * sort C'yy' using CW 1,2,BI,A, * sort C'mm' ascending 4,2,BI,A) * sort C'dd' ascending ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> Other notes on SORT: * Use a local name if your installation changed the default name DFSPARM * A SORT statement can not be specified in IGZSRTCD * This will override the SORT FIELDS produced by the compiler, so you must make sure that you identify all fields that are to be sorted. * These are the ASCENDING/DESCENDING KEYS in the SORT statements in your COBOL program ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 18 COBOL program samples IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ IDENTIFICATION DIVISION. PROGRAMÄID. CURDATE. ENVIRONMENT DIVISION. DATA DIVISION. WORKINGÄSTORAGE SECTION. 01 FILLER VALUE 'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'. 03 MONTH PIC XXX OCCURS 12. 01 TODAY. 03 TÄYY PIC 99. 03 TÄMM PIC 99. 03 TÄDD PIC 99. LINKAGE SECTION. 01 DDMONCCYY. 05 DÄDD PIC XX. 05 FILLER PIC X. 05 DÄMON PIC XXX. 05 FILLER PIC X. 05 DÄCC PIC XX. 05 DÄYY PIC XX. PROCEDURE DIVISION USING DDMONCCYY. ACCEPT TODAY FROM DATE. MOVE SPACES TO DDMONCCYY. MOVE TÄDD TO DÄDD. MOVE MONTH(TÄMM) TO DÄMON. MOVE TÄYY TO DÄYY. MOVE 19 TO DÄCC GOBACK. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 19 COBOL program samples IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ IDENTIFICATION DIVISION. PROGRAMÄID. CURDATE2. ENVIRONMENT DIVISION. DATA DIVISION. WORKINGÄSTORAGE SECTION. 01 FILLER VALUE 'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'. 03 MONTH PIC XXX OCCURS 12. 01 TODAY. 03 TÄYYYY PIC 9999. 03 TÄMM PIC 99. 03 TÄDD PIC 99. LINKAGE SECTION. 01 DDMONCCYY. 05 DÄDD PIC XX. 05 FILLER PIC X. 05 DÄMON PIC XXX. 05 FILLER PIC X. 05 DÄCCYY PIC XXXX. PROCEDURE DIVISION USING DDMONCCYY. MOVE FUNCTION CURRENTÄDATE(1:8) TO TODAY. MOVE SPACES TO DDMONCCYY. MOVE TÄDD TO DÄDD. MOVE MONTH(TÄMM) TO DÄMON. MOVE TÄYYYY TO DÄCCYY. GOBACK. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 20 COBOL program samples IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ IDENTIFICATION DIVISION. PROGRAMÄID. CURDATE3. ENVIRONMENT DIVISION. DATA DIVISION. WORKINGÄSTORAGE SECTION. 01 FILLER VALUE 'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'. 03 MONTH PIC XXX OCCURS 12. 01 TODAY. 03 TÄYYYY PIC 9(4). 03 TÄMM PIC 99. 03 TÄDD PIC 99. 03 TÄHHMISS999 PIC 9(9). 01 SECONDS COMPÄ2. 01 LILIAN PIC S9(9) COMP. ********************************************** * Feedback code from the callable services ********************************************** 01 FC PIC X(12). ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 21 COBOL program samples IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LINKAGE SECTION. 01 CCYYMMDD. 05 CÄCCYY PIC 9(4). 05 SLASHÄ1 PIC X. 05 CÄMM PIC 99. 05 SLASHÄ2 PIC X. 05 CÄDD PIC 99. 01 DDMONCCYY. 05 DÄDD PIC XX. 05 FILLER PIC X. 05 DÄMON PIC XXX. 05 FILLER PIC X. 05 DÄCCYY PIC X(4). PROCEDURE DIVISION USING CCYYMMDD DDMONCCYY. CALL 'CEELOCT' USING LILIAN, SECONDS, TODAY, FC. MOVE SPACES TO DDMONCCYY. MOVE TÄDD TO CÄDD DÄDD. MOVE TÄMM TO CÄMM. MOVE MONTH(TÄMM) TO DÄMON. MOVE TÄYYYY TO CÄCCYY DÄCCYY. MOVE '/' TO SLASHÄ1 SLASHÄ2. GOBACK. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 22 COBOL example MAIN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ID DIVISION. PROGRAMÄID. MAIN. ENVIRONMENT DIVISION. CONFIGURATION SECTION. INPUTÄOUTPUT SECTION. FILEÄCONTROL. SELECT RUNDATA ASSIGN TO SYSINÄSÄFILE1DD FILE STATUS IS RUNDATAÄFS. DATA DIVISION. FILE SECTION. FD RUNDATA. 01 WORKÄRECORD. 03 CUSTÄNAME. 05 FIRSTÄNAME PIC X(10). 05 LASTÄNAME PIC X(15). 03 BIRTHÄDATE PIC X(10). 03 ACCOUNTÄNUM PIC 9(8). 03 CURRENTÄAGE PIC 999. 03 DUEÄDATE PIC X(10). 03 BENNYÄFACTOR PIC 9(3) COMPÄ3. 03 ADJUSTMENT PIC 9(3) COMPÄ3. 03 PAYOUT PIC S9(7) COMPÄ3. 03 PIC X(20). WORKINGÄSTORAGE SECTION. 01 RUNDATAÄFS PIC 99. 77 EOFÄIND PIC X. 88 EOF VALUE "Y". 88 NOTÄEOF VALUE "N". ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 23 COBOL example MAIN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PROCEDURE DIVISION. OPENIT. OPEN INPUT RUNDATA. IF RUNDATAÄFS NOT EQUAL TO 0 DISPLAY "** ERROR ** " "CAN'T OPEN RUNDATA FILE **" ELSE SET NOTÄEOF TO TRUE PERFORM LOOP CLOSE RUNDATA ENDÄIF STOP RUN LOOP. PERFORM UNTIL EOF READ RUNDATA AT END SET EOF TO TRUE NOT AT END CALL "SUBRTN" USING WORKÄRECORD ENDÄREAD ENDÄPERFORM. END PROGRAM MAIN. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 24 COBOL example SUBRTN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ID DIVISION. PROGRAMÄID. SUBRTN. DATA DIVISION. ************************************************** * IMPORTANT NOTE!!! * ************************************************** * This sample requires the compiler option * * INTDATE(LILIAN). To get this sample to work * * with INTDATE(ANSI), change all the references * * of CEEDAYS to CEECBLDY. * ************************************************** ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 25 COBOL example SUBRTN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ WORKINGÄSTORAGE SECTION. 01 CURRÄDATE. 05 CURRÄYEAR PIC 9(4). 05 CURRÄMONTH PIC 99. 05 CURRÄDAY PIC 99. 77 YEARSÄLEFT PIC 9(4). ************************************************* * Parameters for CEEDAYS and CEESCEN * ************************************************* 01 PICSTR. 05 PICSTRÄLENGTH PIC 9(2) COMP VALUE 8. 05 PICSTRÄSTRING PIC X(50) VALUE "MM/DD/YY". 77 LILIAN PIC 9(9) COMP. 77 STARTÄCW PIC 9(9) COMP. 77 FC PIC X(12). ************************************************* * Working Storage for DATEÄOFÄINTEGER * ************************************************* 01 4ÄDIGITÄDATE PIC 9(8). 01 4ÄDIGITÄREDEFINED REDEFINES 4ÄDIGITÄDATE. 05 YYYY PIC 9(4). 05 MM PIC 9(2). 05 DD PIC 9(2). ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 26 COBOL example SUBRTN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LINKAGE SECTION. ************************************************* * Linkage Section description of the record * * that is read by MAIN, and shared by SUB. * * Note that BIRTHÄDATE and DUEÄDATE * * are expanded to show formats. * ************************************************* 01 WORKÄRECORD. 03 CUSTÄNAME. 05 FIRSTÄNAME PIC X(10). 05 LASTÄNAME PIC X(15). 03 BIRTHÄDATE. 05 PIC 9(4) COMP. 05 BMONTH PIC 99. 05 PIC X. 05 BDAY PIC 99. 05 PIC X. 05 BYEAR PIC 99. 03 ACCOUNTÄNUM PIC 9(8). 03 CURRENTÄAGE PIC 999. 03 DUEÄDATE. 05 PIC 9(4) COMP. 05 DMONTH PIC 99. 05 PIC X. 05 DDAY PIC 99. 05 PIC X. 05 DYEAR PIC 99. 03 BENNYÄFACTOR PIC 9(3) COMPÄ3. 03 ADJUSTMENT PIC 9(3) COMPÄ3. 03 PAYOUT PIC S9(7) COMPÄ3. 03 PIC X(20). ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 27 COBOL example SUBRTN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PROCEDURE DIVISION USING WORKÄRECORD. ************************************************** * get todays date with 4Ädigit year. * ************************************************** MOVE FUNCTION CURRENTÄDATE(1:8) TO CURRÄDATE. ************************************************** * set century window to start with the current * * year (current system date). * ************************************************** MOVE 0 TO STARTÄCW. CALL "CEESCEN" USING STARTÄCW FC. ************************************************** * convert 2Ädigit due date year from input file * * into integer value using LE/370 service to get * * a Lilian date. CEEDAYS works only if this * * program is compiled with option INTDATE(LILIAN)* ************************************************** CALL "CEEDAYS" USING DUEÄDATE PICSTR LILIAN FC. ************************************************** * convert COBOL Lilian date into YYYYMMDD format * ************************************************** COMPUTE 4ÄDIGITÄDATE = FUNCTION DATEÄOFÄINTEGER(LILIAN). ************************************************** * find out how many years until due date * ************************************************** COMPUTE YEARSÄLEFT = YYYY Ä CURRÄYEAR. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 28 COBOL example SUBRTN IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ************************************************** * set century window to start 100 years before * * the current system date. * ************************************************** MOVE 100 TO STARTÄCW. CALL "CEESCEN" USING STARTÄCW FC. ************************************************** * convert 2Ädigit birthdate year from input file * * into integer value using LE/370 service to get * * a Lilian date. CEEDAYS works only if this * * program is compiled with option INTDATE(LILIAN)* ************************************************** CALL "CEEDAYS" USING BIRTHÄDATE PICSTR LILIAN FC. ************************************************** * convert COBOL Lilian date into YYYYMMDD format * ************************************************** COMPUTE 4ÄDIGITÄDATE = FUNCTION DATEÄOFÄINTEGER(LILIAN). ************************************************** * find the age Ä even after 1999! * ************************************************** COMPUTE CURRENTÄAGE = CURRÄYEAR Ä YYYY. GOBACK. END PROGRAM SUBRTN. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 29 Testing your applications IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> Regression test * Current production data * Regular test environment -> "Time Machine" test * Keep future date machines separate from others * Do not allow future dates to corrupt: O Networks O Datasets * Ideal "Time Machine": PC Server 500 System/390 -> Other future test * Data with future dates ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 30 Look out! IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> 25% of companies will go out of business in the year 2000 * Don't let yours be one of them -> Make sure your software vendors are fixing their Year 2000 problems * If not, you need to plan for replacements! -> Make sure all of your companies suppliers are also fixing their Year 2000 problems * Remember the GM brake division strike? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 31 How to get more information IBM ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ -> GC28-1251: The Year 2000 and 2-digit dates: A Guide For Planning and Implementation O The manual can be downloaded from the IBM Year 2000 website O http://www.software.ibm.com/year2000/index.html -> Year 2000 Technical Support Center Ask questions via: O YEAR2000 CFORUM * (Available though TALKLINK of IBMLINK) O Y2KTSC@vnet.ibm.com -> A non-IBM Year 2000 web site (de Jaeger) O http://www.year2000.com ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ GUIDE Fall 1996 AP850 IBM COBOL 32