View previous topic :: View next topic |
Author |
Message |
shashi Beginner
Joined: 25 Apr 2005 Posts: 4 Topics: 1
|
Posted: Mon Jul 18, 2005 2:20 pm Post subject: file read and write |
|
|
hi all,
I have Input file which will have data of around 6 different type of records,
here i have to extract data on the basis of three feild characteristics..,
then i have to write 6 different types in different sections and take the subtotal for each type,
finally i have to add all the sub totals to get the grand total..
can anybody tell the soln. for this situation....this is urgent..
|
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Mon Jul 18, 2005 11:25 pm Post subject: |
|
|
Please tell us what YOU have attempted already. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
shashi Beginner
Joined: 25 Apr 2005 Posts: 4 Topics: 1
|
Posted: Tue Jul 19, 2005 2:29 am Post subject: |
|
|
i tried using table (array), then i scared.. bcz if it exceeds number of records in the array, and i thought of to sort the feilds... and write one by one but the problem is it involves 3 feilds characterics, so i am thinking differently.. can anybody help me |
|
Back to top |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Tue Jul 19, 2005 8:14 am Post subject: |
|
|
Shashi,
Long long ago i faced a similar (dont know how much justice i am doing to the similar keyword) situation. I created some dynamic files through my cobol program (using BPXWDYN) and formatted the outputs based on the required criteria and then dumped it onto the output file.
You could take a clue from this.
Cheers
Brian |
|
Back to top |
|
|
shashi Beginner
Joined: 25 Apr 2005 Posts: 4 Topics: 1
|
Posted: Thu Jul 21, 2005 6:26 am Post subject: |
|
|
brian,
what is this BPXWDYN, can you please explain abt this...
thanks
shashi |
|
Back to top |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Thu Jul 21, 2005 6:40 am Post subject: |
|
|
Shashi,
BPXWDYN is a program that helps you allocate / de-allocate files dynamically from your application program. You need not allocate these files in the Job. The files are alive during the course of your program run.
Sometimes it is better off to go for such an approach against building internal tables (arrays) for processing like ones you have mentioned.
However i am just taking a first stab at your problem without knowing the complexities involved.
Hope this helps.
Cheers
Brian |
|
Back to top |
|
|
chandresha_t Beginner
Joined: 20 Jul 2005 Posts: 2 Topics: 0
|
Posted: Thu Jul 21, 2005 7:00 am Post subject: |
|
|
Brian ,
Could you please elaborate some more things on this BPXWDYN.
Is this program available in all system (mainframe) or is it program written specifically for the system in which you are working in ? |
|
Back to top |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Thu Jul 21, 2005 9:18 am Post subject: |
|
|
Hello,
This is available in all shops. This is an IBM provided utility. This is normally present in one of the SYS1.* datasets. You can check it out there.
Cheers
Brian |
|
Back to top |
|
|
rakshith Beginner
Joined: 26 Jul 2005 Posts: 32 Topics: 16 Location: bangalore
|
Posted: Tue Jul 26, 2005 5:51 am Post subject: |
|
|
hi all,
I also facing same problem but for different number of records.
In this scenario which one of these will be faster.
If we open and close the file six times for different types of records.
or
If we use tables for this assuming records will not cross the limits.
please help me
thanks
rakshith |
|
Back to top |
|
|
|
|