Page 1 of 1

Use of SORTED in SORT FIELDS allowed?

Posted: Fri Apr 21, 2017 11:58 pm
by Vipin Verma
Hi,

Is the use of SORTED in SORT FIELDS allowed, like this:

Code: Select all

SORT FIELDS=(...),SORTED
I see that this is usually used in JOINKEYS and could not find out an example using it with out JOINKEYS.

Re: Use of SORTED in SORT FIELDS allowed?

Posted: Sat Apr 22, 2017 2:20 am
by nicc
SORTED in JOINKEYS tells DFsort not to sort the data because it is already sorted. Why would you want to use SORTED when you are sorting? If you want the syntax of something look it up in the manual.

Re: Use of SORTED in SORT FIELDS allowed?

Posted: Sun May 21, 2017 7:55 pm
by Vipin Verma
I just wanted to copy the records as is while removing the duplicates on key so I asked about the use of SORT. I should have asked about COPY FIELDS but COPY FIELDS will have just same effect as SORT as far I know??

Re: Use of SORTED in SORT FIELDS allowed?

Posted: Mon May 22, 2017 3:22 pm
by nicc
as far I know??
So you have not even experimented to try and determine the difference, if any? Or read the manual? Do not know the difference between the meaning of COPY and SORT?

Re: Use of SORTED in SORT FIELDS allowed?

Posted: Mon Apr 30, 2018 12:57 pm
by Vipin Verma
COPY does not really sort but SORT does sort operation. But for simple copy operation SORT and COPY are same. SORTED means the files are already sorted.

This is what I understood.

Re: Use of SORTED in SORT FIELDS allowed?

Posted: Mon Apr 30, 2018 3:30 pm
by nicc
Have you actually referred to the manual? SORTED is not an option of COPY or SORT but of JOINKEYS.

Re: Use of SORTED in SORT FIELDS allowed?

Posted: Tue May 01, 2018 9:56 am
by Vipin Verma
:shock: need to recheck..