Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Splitting the Dataset

Former Member
0 Likes
985

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...

4 REPLIES 4
Read only

Former Member
0 Likes
782

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

Read only

Former Member
0 Likes
782

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.

Read only

Former Member
0 Likes
782

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

Read only

0 Likes
782

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...