Author: Indrajit_57
Subject: Generate Cohort report using SORT
Posted: Wed Jun 01, 2016 9:41 am (GMT 5.5)
Hi,
I have a requirement to generate a monthly cohort report using data from the current and previous month. My sample data looks as below: -
Previous Month Data
Current Month Data
The length of the file is 1500 bytes.
The output should be as below: -
In the next month I will be using the above output as previous month data and the current month input will look like
The ouput should be as below: -
So basically I need to fill in the blanks by taking the data from previous months in the current months file and generate a report. B1, B2... etc are the keys by which we can identify. Each month the row and column will get increased by 1. I need to do this for 36 months.
Is this possible using SORT or a COBOL program is a better option.
Subject: Generate Cohort report using SORT
Posted: Wed Jun 01, 2016 9:41 am (GMT 5.5)
Hi,
I have a requirement to generate a monthly cohort report using data from the current and previous month. My sample data looks as below: -
Previous Month Data
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 ********************************* Top of Data ********************************** B1 LM <value> <value> ******************************** Bottom of Data ******************************* |
Current Month Data
Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 ********************************* Top of Data ********************************** B1 LM <value> B2 LM+1 <value> <value> ******************************** Bottom of Data ******************************** |
The length of the file is 1500 bytes.
The output should be as below: -
Code: |
***************************** Top of Data ****************************** ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- B1 LM <value> <value> <value> B2 LM+1 <value> <value> **************************** Bottom of Data **************************** |
In the next month I will be using the above output as previous month data and the current month input will look like
Code: |
***************************** Top of Data ****************************** ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- B1 LM <value> B2 LM+1 <value> B3 LM+2 <value> <value> **************************** Bottom of Data **************************** |
The ouput should be as below: -
Code: |
***************************** Top of Data ****************************** B1 LM <value> <value> <value> <value> B2 LM+1 <value> <value> <value> B3 LM+2 <value> <value> **************************** Bottom of Data **************************** |
So basically I need to fill in the blanks by taking the data from previous months in the current months file and generate a report. B1, B2... etc are the keys by which we can identify. Each month the row and column will get increased by 1. I need to do this for 36 months.
Is this possible using SORT or a COBOL program is a better option.