I want to copy the records till xyz ( position is fixed 1 to 3) , but i dont know record number of xyz , it can be record number 5 or can be record number 10 , can be anything .
********************************* TOP OF DATA **********************************
AAA
BBB
CCC
XYZ
******************************** BOTTOM OF DATA ********************************
if You are sure that there are no more than 9 XYZ occurrences
than You can be stingy and instead of a 4 chars group id use a 1 char group id
in other words use a group id with enough digits to take care of the maximum number of occurrences of XYZ
This technique is described in the "Include or omit groups of records" Smart DFSORT Trick at:
Thank you verymuch for sort card you have provided , it is working fine
glad that it helped,
but I still strongly suggest that You meditate a bit or better ( given the trend ) 64 bits
on the document pointed by the link posted