Hi Gregory Martin,
While we use preload, data should be sorted based on preloading ID otherwise preload get fail. Here My problem is I am copying required data from other datafile to new data file and using new data for preloading, before preloading I required to sort the data based on ID in external dictionary and copy it to new file otherwise preload get fails.
for example below are data in hhs.dat file
1921101010003
1921101010004
1121101010006
1921101010007
1121101010009
1921101010012
1321101010017
1921101010022
1321101010013
my external dictionary has :
intvid (len=2, start from 1)
hhid (len=11, start from 3)
I require to sort above (txt) data in to below format before preloading...
1121101010006
1121101010009
1321101010017
1321101010013
1921101010003
1921101010004
1921101010007
1921101010012
1921101010022
I have tried below line of command syntax but could not get success...
loadcase(intvhh_dict);
sort(hhid using intvid);
Could you please suggest me how can I achieve my requirement.
Thanks & Regards,
Ramesh Pradhan
How to Sort text Data using External Dictionary for Prelodding
-
- Posts: 38
- Joined: August 27th, 2017, 2:43 am
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: How to Sort text Data using External Dictionary for Prelodding
The sort function is for sorting groups/records with a single case. If you are interested in sorting multiple cases by ID, you should use the Sort Data tool: https://www.csprousers.org/help/CSSort/ ... _data.html
You can define your sort specifications using the tool. If you want to run the sort from within a data entry application, you can use the execpff function to launch the sort. Starting with CSPro 7.6, you can run Sort Data PFFs on Android.
You can define your sort specifications using the tool. If you want to run the sort from within a data entry application, you can use the execpff function to launch the sort. Starting with CSPro 7.6, you can run Sort Data PFFs on Android.
-
- Posts: 38
- Joined: August 27th, 2017, 2:43 am
Re: How to Sort text Data using External Dictionary for Prelodding
Thank you so much Gregory Martin