Repeat a record



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Re: Repeat a record

Postby javivi » Thu Nov 07, 2013 8:45 pm

Well I don't know.... it deppend on the customer 1 year or 2 or 5....
javivi
 
Posts: 47
Joined: Fri Jan 21, 2011 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repeat a record

Postby BillyBoyo » Thu Nov 07, 2013 9:07 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Repeat a record

Postby javivi » Thu Nov 07, 2013 9:25 pm

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.
javivi
 
Posts: 47
Joined: Fri Jan 21, 2011 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repeat a record

Postby javivi » Thu Nov 07, 2013 9:28 pm

Sorry to calculate the average. The balance is in a currency and it must be changed to euros using the equivalent of every day.
javivi
 
Posts: 47
Joined: Fri Jan 21, 2011 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repeat a record

Postby BillyBoyo » Thu Nov 07, 2013 9:37 pm

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Repeat a record

Postby javivi » Thu Nov 07, 2013 9:41 pm

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.
javivi
 
Posts: 47
Joined: Fri Jan 21, 2011 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Repeat a record

Postby dick scherrer » Thu Nov 07, 2013 10:11 pm

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".
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Repeat a record

Postby BillyBoyo » Thu Nov 07, 2013 10:17 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Repeat a record

Postby skolusu » Fri Nov 08, 2013 6:15 pm

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
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Repeat a record

Postby javivi » Mon Nov 11, 2013 6:03 pm

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
javivi
 
Posts: 47
Joined: Fri Jan 21, 2011 2:53 pm
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post