View previous topic :: View next topic
|
Author |
Message |
itzphaniz
New User
Joined: 02 Sep 2005 Posts: 39
|
|
|
|
Hi,
I have a file: "CountFile" with say some 10000 records [This count is not fixed]
I would like to split "CountFile" in to 104 files with same record count in each of this file.So now we have approximately 96-97 records in each of this 104 files.
Here only the number of records in "CountFile" is dynamic. And 104 is fixed.
Any help would be deeply appreciated. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Just curious,
this is one of the many posts were it is asked how to split a file based only on the record count
what is the business/application logic behind this
usually the record in a dataset have some common properties,
why , in this case, the 58th record should be treated in a different way from the 110th ??? |
|
Back to top |
|
|
itzphaniz
New User
Joined: 02 Sep 2005 Posts: 39
|
|
|
|
enrico-
104 = 2*52Weeks i.e. for two years. We are not treating the 58, 110th record differently. It is just that they will be in a separate file while loading in to our DB. After loading, 58 and 110th record will retain their significance . I'm not sure if i understood your question. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
so after all the common property of the records in a dataset is the week
and the 58th record has a different property from the 110th ( they belong to different weeks)
still, I feel it would be safer to split on the value of a field rather than on the number of the records... what if
in a standards/practices/process assurance/review, the auditors would certainly point it out
and make a strong suggestion to change the process ( seen it, done it ) |
|
Back to top |
|
|
itzphaniz
New User
Joined: 02 Sep 2005 Posts: 39
|
|
|
|
All,
With the help of DFSORT technique, I'm able to split the file.
Here is my SYSIN:
Code: |
SORT FIELDS=(24,10,CH,A)
OUTFIL FNAMES=(OUT1,OUT2,OUT3,OUT4),SPLIT |
Thanks for any effort you guys have put in!! |
|
Back to top |
|
|
|