Page 2 of 3

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 8:45 pm
by javivi
Well I don't know.... it deppend on the customer 1 year or 2 or 5....

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 9:07 pm
by BillyBoyo
Why do you need all these extra records? That's a lot of stuff just to indicate nothing has happened. Why are they needed (if you know).

I'm pretty sure you'll have exceeded the space allowed for control cards well before five years are up, even if you generate the control cards it won't work (over 1m slash operators, I think).

How many customers on the file?

Maybe a SORT exit. they can be written in COBOL, and the code would be simple.

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 9:25 pm
by javivi
I need every day because I have to calculate the average balance. But I will change the criteria and I will calculate the average balance in so far this month.

(I know that in COBOL is not difficult, but I want to prove to my boss the DFSORT power)

Thank you all for your interest.

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 9:28 pm
by javivi
Sorry to calculate the average. The balance is in a currency and it must be changed to euros using the equivalent of every day.

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 9:37 pm
by BillyBoyo
Mmmm... I thought I asked what you were trying to do in business terms. Why do your need a record for everything. Why not calculate? the relevant number of days? You're doing all this, the calculation, currency conversion, in another program?

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 9:41 pm
by javivi
No, once I have a file with every balance by date, I will crosse (by date) the file against another file who has the currency conversion for every day.

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 10:11 pm
by dick scherrer
Hello,

(I know that in COBOL is not difficult, but I want to prove to my boss the DFSORT power)

Properly used, sort solutions can save considerable development and operating $. So i believe these should be widely explored. Wearing my manager or system support hat, i concern myself with the issue of long-term maintainablilty.

Keep in mind that not only can many New requirements can be met using the sort, but someone will have to maintain "the code" when the author is no longer available. If the expanded capabilities are used, the organization needs to ensure several people are well-versed in the use of this "language".

Re: Repeat a record

PostPosted: Thu Nov 07, 2013 10:17 pm
by BillyBoyo
OK. Can you outline how much of the processing you are thinking of doing in DFSORT?

If you already have exchange rates by date (including weekends and holidays?) then you may be able to use that to create the daily balance records and do the calculation at the same time.

However, have you ensured that you know how to achieve the calculation results you need if you are intending any calculation in DFSORT?

I still think a sort exit or a program may work out better.

Re: Repeat a record

PostPosted: Fri Nov 08, 2013 6:15 pm
by skolusu
javivi wrote:No, once I have a file with every balance by date, I will crosse (by date) the file against another file who has the currency conversion for every day.



If you already have a file with date and currency values you do NOT have to repeat the account file for the date. It is easier to PUSH down the values for missing dates after the match on the date between the 2 files. Show me the layout and RECFM of

1. Account file
2. Currency file which has the dates and the equivalent currency value for that date.
3. What is the format and Length of Amount field and Date field in the account file?
4. What is the position of date field and currency value in the currency file?
5. What do you need to do finally? AVG? TOT? MIN ? ...

Explain in detail and I will show you a way to do it

Re: Repeat a record

PostPosted: Mon Nov 11, 2013 6:03 pm
by javivi
I skolusu

Here the files layout:

ACCOUNT FILE
ACCOUNT PIC X(18)
DATE PIC X(10) (format YYYY-MM-DD)
AMMOUNT PIC 9(10)V9(6)

CURRENCY FILE
DATE PIC X(10) format YYYY-MM-DD
CURRENCY-VALUE PIC 9(10)V9(5).

What I need is by one account, multiply the ammount by the courrency, but there are currency dates that don't exist in account file, for explame
ACCOUNT FILE
AAAAAAAAAAAAAAAAAA2013-11-010000001000000000
AAAAAAAAAAAAAAAAAA2013-11-040000000750000000

CURRENCY FILE
2013-11-01000000000200000
2013-11-02000000000210000
2013-11-03000000000220000
2013-11-04000000000230000
2013-11-05000000000240000
2013-11-06000000000250000
2013-11-07000000000260000

I want to generate the file
AAAAAAAAAAAAAAAAAA2013-11-010000001000000000 000000000200000
AAAAAAAAAAAAAAAAAA2013-11-020000001000000000 000000000210000
AAAAAAAAAAAAAAAAAA2013-11-030000001000000000 000000000220000
AAAAAAAAAAAAAAAAAA2013-11-040000000750000000 000000000230000
AAAAAAAAAAAAAAAAAA2013-11-050000000750000000 000000000240000
AAAAAAAAAAAAAAAAAA2013-11-060000000750000000 000000000250000
AAAAAAAAAAAAAAAAAA2013-11-070000000750000000 000000000260000
(onde I had this file I will multiply ammount by currency and divide it by the count of days. In the above example divide it by 07)


As you can see, my problem is geneating the dates 2013-11-02, 03 with the same ammount that 2013-11-01 and 2013-11-05,06,07 with the same am mount that 2013-11-04

Thanks a lot