2006 Dec 12 5:16 AM
Hi all,
I have the requirement as below.
I have a File in Application Server, which is very BIG in size. My requirement is write a program(The input to the program is File Path) which reads the Dataset and Split that Dataset into Several SMALL Datasets.
EX:
Suppose A Dataset Contains 1000 records, then after the Execution of the program Single dataset will be splitted into 10 Datasets(Assume), and each Dataset contains 100 records.
waiting for u r replys..
Thanks in Advancve
Krish...
Hi all,
I have the requirement as below.
I have a File in Application Server, which is very BIG in size. My requirement is write a program(The input to the program is File Path) which reads the Dataset and Split that Dataset into Several SMALL Datasets.
EX:
Suppose A Dataset Contains 1000 records, then after the Execution of the program Single dataset will be splitted into 10 Datasets(Assume), and each Dataset contains 100 records.
waiting for u r replys..
Thanks in Advancve
Krish...
2006 Dec 12 5:20 AM
Hi Krish ,
A solution to this would be read the entire data set first and loop at the internal table containing the data and when ever your limit is reached , simply write it to the file on application server.
Regards
Arun
2006 Dec 12 5:25 AM
Hi krish,
try using this.
Create different files into which you want to split the input file.
say there are two oputput files. file1 and file2
use open dataset command to create these files in output mode.
then open input file (say in_file) in input mode.
then use a loop to read the data from input file
here you can split the data into different parts accounding to line count (sy-tabix)
do
READ DATASET dsn INTO line.
if sy-tabix < 60,0000.
transfer line TO file1.
else
transfer line TO file2.
endif.
enddo.
finally close all files.
i have used limit as 60000 you can use 100 as your criterion. and even you can increase the number of files according to your requirement
Hope this helps.. award usefull answers.
2006 Dec 12 5:30 AM
Hi Krish,
While storing big file you can split the data into smaaller dataset. What i am trying to say 'While storing the data you split no of small datasets' and while picking you can use Pattern (Contain Pattern) to pick the all files one by one.
Regards
Bhupal Reddy
2006 Dec 12 5:43 AM
Hi Reddy,
The Big file is already Existed in Application server. My requirement is Split that Large dataset into Smaller datasets .
Hop iam more clear now.
Regards
Krish...
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |