I need to extract data from Master file using some conditions.
The trick part is that, I have to check another file to built the conditions.
Is this possible with Sort? If not, any other alternatives?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
If you have a single-record file with your selection criteria, it is easy to generate a symbol for the SYMNAMES file in one short step, then use the symbol for selection in the main step.
If you have a search with SYMNAMES, you should find some examples, often with a date for selection.
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
Bill Woodger wrote:
Or, if you don't want to sort the file, which the JOINKEYS does, you can start with this SYMNAMES-generating example.
Not sure if I take the inference correctly or it's because of Monday -- if you mention SORTED with JOINKEYS - it won't sort and assume inputs are in sort order, no?
Okay, if my assumption was wrong - consider Monday was in effect...
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
With the SYMNAMES the requirement can be satisfied without sorting the data.
With the JOINKEYS solution the data will be automaticallly sorted as part of the process, unless, as you say, SORTED is specified on the JOINKEYS, meaning the data is already sorted. As the data is unsorted, using the JOINKEYS,SORTED may not produce the required output, if anyone was thinking of trying that.
Even if the input is sorted, conveniently, on the key for matching, the JOINKEYS will still require more resources for it's main and two sub-tasks and just an OPTION COPY/SORT FIELDS=COPY.