Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please check the attached data and app. Now as per the data we have FACT file and two external Flat.For one flat file we have common key field with FACT so we are simply joining the Flat file data with FACT file but one more flat file does not have any link or key field with FACT. Now I have to calculate NPDate and the logic is ,
If RETIREMENT_DATE first of the next month of current date or in past from current date then , we have to create NP date with CurrentDate and FLATFILE2_DATE, Year and month have to be taken from Currentdate or today date and for day part please follow below the logic mentioned,
If FLATFILE1_MAIL_DAY part exist in any of DAY field present in FLAT FILE 2 i.e. FLATFILE2_MAIL_DAY1 or FLATFILE2_MAIL_DAY2 or FLATFILE2_MAIL_DAY3 or FLATFILE2_MAIL_DAY4 or FLATFILE2_MAIL_DAY5 or FLATFILE2_MAIL_DAY6 and FLATFILE2_DATE is 6 byte field and the format is YYMMDD so apart from day field we have to check current date year(2016) and month(10) is matching with FLATFILE2_DATE YY and MM part then if it satisfying the condition then we have to populate the day from FLATFILE2_DATE last two digit or DD part.
Example:
FOR EMP_ID 1449641 RETIREMENT_DATE is first of the next month i.e 11/01/2016 and for that record FLATFILE1_MAIL_DAY is 32 so now we have to check in the FLATFILE2_DATE year and month part that is 16 and 11 and for the 6 dates field 32 is present or not. As per the data for this combination FLATFILE2_DATE is '161025'. So NPDate will be '10/25/2016'.
Kindly check and send me resolution. Waiting for the response.
Regards,
Koushik