Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Report having 12 months rolling history

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Tue Jul 22, 2008 1:03 am    Post subject: Report having 12 months rolling history
Reply with quote

Hi,

I have to create a report every month which will have 12 months rolling history.

The file for this report is generated every month and it has data of previous two months, my task is to produce a report every month which will have the data of all previous months. Like--

The report to be produced in August should have data of all the previous months till now. But the file which will be generated in August will have data of June and July only. I need to append the data to the file always.

Example--


F1--created in Feb; has Jan's data

F2--created in March; has Feb's and Jan's data

F3--created in April; has March, Feb's data; need to Append F2 to get Jan's data and eliminate duplicates

F4--created in May; has April's, March's data; need to Append F3 to get previous data and eliminate duplicates.

On the 13th month the oldest file would be deleted and there should be another job to purge it.

I am planning create a GDG of 12 limit.

Please let me know while coding what all steps i have to take.

Thanks.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jul 22, 2008 1:11 am    Post subject:
Reply with quote

Hello,

I'd suggest changing your plan to place data from 2 months in the same file. There is no good reason to do this.

If you correct this design, what you want to do becomes trivial.

"Things" that need one month's data use that file. Things that might need 2 or 3 month's data, use 2 or 3 files. The report that needs the rolling 12 months data would concatenate gerneration (0) thru (-11).

I would probably keep more than 12 generations.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Tue Jul 22, 2008 1:22 am    Post subject: Reply to: Report having 12 months rolling history
Reply with quote

Thanks for the prompt reply.

Could you please explain this in some other way, it's is not very clear to me.

I can change the design, requirement i have put before you.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jul 22, 2008 2:06 am    Post subject:
Reply with quote

Hello,

Create a file each month that has data from only one month.

Use them as needed in whatever processes will create reports.

If you create files with data from only one month, you do not need to be concerned with getting rid of the duplicates caused by the overlapping data.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Wed Jul 23, 2008 1:26 pm    Post subject:
Reply with quote

As dick scherrer said,
after getting all the data in different files according to the month. you may use the required month data for processing the reports as per the requirement by concatenating the files of those months.
Back to top
View user's profile Send private message
sedireswarapu

New User


Joined: 18 Jun 2008
Posts: 28
Location: India

PostPosted: Wed Jul 23, 2008 5:35 pm    Post subject:
Reply with quote

Hi Meenakshi,

I had a requisite where i had to create a report having current month' s data of individuals & their year-to-date data (total of their 12 months data in the current year).

I did it in the following way,
- Sort the input based on the key fields of the individuals (the input has only current month's data).
- Create a vsam file with those key fields and other required fields, and a TOTALS that occurs 13 times (one for each month & the 13th for year-to-date).
- Read the input file, accumulate the totals of all the records belonging to the same individuals in the appropriate occurrence of TOTALS (can be identified from the current month of the date). Write the output record in the vsam file when there 's a break in the key used, or update the data of the already existing individual for the appropriate month.
- Report the data using the vsam file created in the previous step as input.
- Set up an annual job to initialize the vsam file.

It may not be matching your requirement exactly, but i hope you will get some idea from it.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jul 23, 2008 8:33 pm    Post subject:
Reply with quote

Hello,

Quote:
It may not be matching your requirement exactly, but i hope you will get some idea from it.
Meenakshi should not need to add the system overhead and programming maintenance of a vsam file. Your requirement appended "this" month's data to the existing year-to-date file.

This requirement is to simply read the last 12 months (rolling 12 months) and create "the report".
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Thu Jul 24, 2008 3:14 pm    Post subject:
Reply with quote

Thanks all for giving me the suggestions.

One more requirement of this task is that there should be a purge Job(monthly job) which will delete any accounts that are 12 months old.


How shall i link these two jobs.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Jul 24, 2008 3:31 pm    Post subject:
Reply with quote

Hi,
if the GDG has a limit of 12, when creating the 13th entry, the oldest one should roll off automatically.

Gerry
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Fri Jul 25, 2008 1:08 am    Post subject: Reply to: Report having 12 months rolling history
Reply with quote

I am not creating files, i am receving files which will have data of previous 2 months only , and i have to generate a report every month which will have history of all previous months.
That's why i have to concatenate files.

Purge Job is dependent on previous job, i undersatnd that having 12 generations will remove the oldest one once 13th is reached.
But how to work programatically as this is dependent on first job.


I need approach for both, design and programing hints.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 25, 2008 1:17 am    Post subject:
Reply with quote

Hello,

Quote:
Purge Job is dependent on previous job
Please clarify this - i do not understand what this tells me.

If your incoming data file has data from 2 months, the first thing to do might be to create a new generation of the gdg with only the "current" month info from the 2 months on the file. Once you do this, you are back to the simple task of running "the report" with no concern of eliminating duplicates. Each generation will have only 1 month.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 25, 2008 3:42 am    Post subject: Reply to: Report having 12 months rolling history
Reply with quote

like pounding sand, huh?

have a good weekend, mine has already started. cold beer and this forum and i am on another planet.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 25, 2008 5:52 am    Post subject: Reply to: Report having 12 months rolling history
Reply with quote

Quote:
have a good weekend
You too icon_smile.gif

Beer:30 - what a great time of day. . . icon_wink.gif

As my old crew said about an early arrival at the pub. Time for a practice beer or so. The real drinking will soon commence.

d
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Fri Jul 25, 2008 12:27 pm    Post subject: Reply to: Report having 12 months rolling history
Reply with quote

Thanks all.

Dick,

If i create a generation from the input file being received that will have the data of past two months, then will the next generation have the data of past 3 months ? and will the next generation to it will have data of 4 months and so on...

Please let me know

Thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jul 25, 2008 2:28 pm    Post subject: Reply to: Report having 12 months rolling history
Reply with quote

just to stir up trouble and make people think about poor approaches

A is the data range for month n
B is the data range for month n+1
C is the data range for month n+2

transmission sequence A+B B+C
what if the B data range provided in the second shipping differs from the previous one

meditate and check ( I would * ) icon_lol.gif

* do the checking, the meditation having already been done
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Daily report to be extracted from CA ... polymathtarun DFSORT/ICETOOL 5 Mon Jul 11, 2016 4:33 pm
No new posts Report view in Mobile devices Robert Sample All Other Mainframe Topics 0 Thu Jun 23, 2016 7:05 pm
No new posts COBOL Report view in Mobile devices balaji81_k COBOL Programming 4 Thu Jun 23, 2016 6:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us