Don't know how to Include & Sample the same time cause from the result i understand that Sampling is happening first & then Include condition is applied.
Code'd and shifted data
What i am looking at is first it created the list based on include condition and then it performs the sampling....
so that for example for X1 is filtered and then out of 25 records it pics based on the sample...
i know it can be done in 2 passes first creating a temporary file based on Include condition and then perform sampling on that..
i was thinking if we can perform in 1 PASS.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
ramprakashn wrote:
Pandora,
I couldn't test it as I am on leave today . But I hope that the solution would work.
ramprakashn,
Please do not post the solutions without testing. If you do feel the urge to post a solution please notify that you haven't tested the solution.
Your solution will not work as INREC is processed before the SORT and hence your sequence numbers are off. Also remember that this is a DFSORT forum and the syntax you have posted is of syncsort which is not valid with DFSORT. You also need to understand how SAMPLE=10 works, Sample =10 will pick records 1, 11,21,31,41..., but your code will select 1,10,101,110,201,210,301,310.... records which is not what OP wanted.