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

regarding creation files on app servers programatically

Former Member
0 Likes
626

Hi All,

I have a requirement where I have to copy data from one struc to other. The algo implemented is something as under:

1. Select data from source acc to package size.

Total_records = total_records + number of records fetched.

2. move data to target structure.

3. write this data to a file on app server

3. If tota_records >= some number 'XYZ', then

4. call a report in background to read data from file specified in step3, and put this data in target table.

5. end select.

Now, since I have to split the complete data into multiple tasks for updation, I want to create separate files on the app sever for diff set of records.

For ex, for the first10000 records file name shud be X1 . Using this file step4 would be processed.

For next 10000 records file generated is X2. Using this file the 10000 records selected are processed using step4.

MY QUERY IS: HOW CAN I GENERATE FILENAMES SUCH AS X1 ,X2 ETC ON THE APPLICATION SERVER. CAN I DO THAT DIRECTLY USING OPEN DATASET <FILENAME>?

Thanks-

HS.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
595

hi,

yes you can directly download data into application server using

OPEN DATASET

6 REPLIES 6
Read only

Former Member
0 Likes
596

hi,

yes you can directly download data into application server using

OPEN DATASET

Read only

Former Member
0 Likes
595

HI,

Yes you can do with the open dataset...before calling the Open Dataset generate the file name dynamically.

Read only

che_eky
Active Contributor
0 Likes
595

Hi Harmeet,

It maybe an idea to create all your files first before you start to process them. This way you know you have considered all the source data.

Che

Read only

Former Member
0 Likes
595

Hi ,

Yes this can be done .You can mention file path name and use OPEN DATASET and transfer records according to your requirement

Read only

Former Member
0 Likes
595

I need to know that if a file name is non existent on app server, then will it be created when i use it.

for ex: dir_temp is the dir name.

in my report I use filename as dir_temp/X1 , then will this file X1 be created on app server.

Read only

0 Likes
595

The file will be created if it does not already exist.

Have you even tried reading the help on the OPEN DATASET statement?