theotyflos
Programmer
Hi group,
I would like to share my thoughts with you and ask for your suggestions and/or thoughts on the following situation:
Language is Rm/Cobol v7.10 on Sco Unix 5.0.5.
I have a file that looks like this:
Facts:
a) The file is automaticaly and continuously updated (without any user intervention) with about 60 new records per minute.
b) New records writen, always have the current date and time in the corresponding fields, which furthermore never change.
c) Users can also update the file (rewrite only, no write/delete).
d) All three keys are necessary for gaining information.
e) Records older than 3 months can be transfered to a "history" file, as a last solution.
f) There is a program that runs every minute (through cron), which checks for some records of (some) specific customers and accordingly updates some other files if necessary. This program must do it's job in less than a minute.
Problems:
a) Up to now, the file has grown to a size of almost 3.5GB and is about to reach the language/OS limits.
b) Since the file is continuously updated, it can't be backed-up correctly with tar or cpio.
Thoughts:
a) Upgrade to newer lang/os version with very large file support. (Not sure if the customer wants to pay for the upgrade, doesn't solve problem b).
b) Transfer records older than 3 months to a "history" file - users won't have access to "current" and "history" data simultaneously, they will have to "switch" files somehow. (Solves problem a, doesn't solve problem b).
c) Split the file to smaller ones - one file per month:
Signal-Path must change at runtime to "sig200512", "sig200601", "sig200602" and so on for example.
Files should be opened and closed according to user's request:
Case 1: User wants to see all signals from "2005/11/01" to "2006/01/31". I'll have to start from file "sig200511" and at the end of it, close it, open "sig200512" and so on.
Case 2: User wants to see signals for customer "1234" from "2005/11/01" to "2006/01/31". Same as Case 1.
Case 3: User wants to see all signals for customer "1234". Don't know which file to start from, because don't know the date of the customer's first signal. If I start from the very first file, I may end up opening/closing/starting a lot of files for nothing. I could keep the date of the customer's first and last signals to the customer's master file. In that case how should I deal with out-of-sync dates between the signals files and the customer's master file?
If I split the file, would the program from fact#f be able to finish ?
Questions:
a) Has any of you ever faced a similar problem?
b) If yes, how did you confront it?
c) If you were facing this issue, which solution would you prefer and why?
d) What do you think about thought#c ?
Any reply is appreciated.
Theophilos.
-----------
There are only 10 kinds of people: Those who understand binary and those who don't.
I would like to share my thoughts with you and ask for your suggestions and/or thoughts on the following situation:
Language is Rm/Cobol v7.10 on Sco Unix 5.0.5.
I have a file that looks like this:
Code:
Select Optional Signals-Fil
Assign To Random Signals-Path
Organization Indexed Access Dynamic
Record Key Sig-N-A
Alternate Record Key Sig-C-D-T Duplicates
Alternate Record Key Sig-D-T Duplicates
File Status Flst.
:
:
FD Signals-Fil.
1 Signals-Rec.
2 Sig-N-A.
3 Sig-Number Pic 9(9).
3 Sig-AA Pic 9(2).
2 Sig-C-D-T.
3 Sig-Customer Pic x(4).
3 Sig-D-T.
4 Sig-Date.
5 Sig-YY Pic 9(4).
5 Sig-MM Pic 9(2).
5 Sig-DD Pic 9(2).
4 Sig-Time.
5 Sig-Hour Pic 9(2).
5 Sig-Min Pic 9(2).
5 Sig-Sec Pic 9(2).
2 Sig-Some-Data Pic ...
:
:
1 Signals-Path Pic x(10) Value "signals".
a) The file is automaticaly and continuously updated (without any user intervention) with about 60 new records per minute.
b) New records writen, always have the current date and time in the corresponding fields, which furthermore never change.
c) Users can also update the file (rewrite only, no write/delete).
d) All three keys are necessary for gaining information.
e) Records older than 3 months can be transfered to a "history" file, as a last solution.
f) There is a program that runs every minute (through cron), which checks for some records of (some) specific customers and accordingly updates some other files if necessary. This program must do it's job in less than a minute.
Problems:
a) Up to now, the file has grown to a size of almost 3.5GB and is about to reach the language/OS limits.
b) Since the file is continuously updated, it can't be backed-up correctly with tar or cpio.
Thoughts:
a) Upgrade to newer lang/os version with very large file support. (Not sure if the customer wants to pay for the upgrade, doesn't solve problem b).
b) Transfer records older than 3 months to a "history" file - users won't have access to "current" and "history" data simultaneously, they will have to "switch" files somehow. (Solves problem a, doesn't solve problem b).
c) Split the file to smaller ones - one file per month:
Signal-Path must change at runtime to "sig200512", "sig200601", "sig200602" and so on for example.
Files should be opened and closed according to user's request:
Case 1: User wants to see all signals from "2005/11/01" to "2006/01/31". I'll have to start from file "sig200511" and at the end of it, close it, open "sig200512" and so on.
Case 2: User wants to see signals for customer "1234" from "2005/11/01" to "2006/01/31". Same as Case 1.
Case 3: User wants to see all signals for customer "1234". Don't know which file to start from, because don't know the date of the customer's first signal. If I start from the very first file, I may end up opening/closing/starting a lot of files for nothing. I could keep the date of the customer's first and last signals to the customer's master file. In that case how should I deal with out-of-sync dates between the signals files and the customer's master file?
If I split the file, would the program from fact#f be able to finish ?
Questions:
a) Has any of you ever faced a similar problem?
b) If yes, how did you confront it?
c) If you were facing this issue, which solution would you prefer and why?
d) What do you think about thought#c ?
Any reply is appreciated.
Theophilos.
-----------
There are only 10 kinds of people: Those who understand binary and those who don't.