Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Thu Feb 17, 2011 8:10 am Post subject:
Arvind,
there is an amazing amount of 'filtering' (INCLUDEing and EXCLUDEing) that can be accomplished by DFSORT.
BUT, my friend, I am lost after reading your description.
provide some input (which would contain alls possible situations)
and provide your expected output.
attempt a better explaination, (short of that, and explanation of the different fields in your record). _________________ Dick Brenholtz
American living in Varel, Germany
For an Account number and a particular Lot
a. If there is a NEW, ADJ, DEL ( based on Lot Type ) we need to filter that. In this example First 3 should be filtered.
b. If there is a New, DEL - filter ( Records 4 and 10 )
c. If there is a Adj and DEL - filter ( Records 6 and 8 )
But I am sorry for not giving correct requirements.
If there are a NEW and ADJ ( No DEL ), it should not filter.
One more req came today is If there are only NEW and ADJ for a particular Acct and lot, the NEW record shud have 30 at position 25 and ADJ record shud have 40 at position 25. ( is this too much for a utility )
Thanks _________________ Arvind
"You can make a difference with your smile. Have that with you always"
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
Posted: Fri Feb 18, 2011 11:35 am Post subject:
arvibala,
*Sigh* I feel like a dentist trying to pull teeth. How hard is it provide all the details? You have been on this board for 3 years and by now you should be able to explain your requirements clearly. We canNOT read your mind or your data. Please provide detailed/complete information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.
You changed the requirement and you did not even provide a sample output.
What is the LRECL and RECFM of the file?
What happens if you have a records with just NEW and DEL ? Do you need to keep it or delete it ? If you need to keep it , what other values need to populated?
Cover all the possible scenarios and last minute requirement changes and explain them so that we can provide an optimal solution.
Quote:
( is this too much for a utility )
DFSORT has now become *almost* equivalent to a programming language instead just being an utility , so it can do a lot more than you think. _________________ Kolusu
www.linkedin.com/in/kolusu
For an Account number and a particular Lot
a. If there is a NEW, ADJ, DEL ( based on Lot Type ) we need to filter that. In this example First 3 should be filtered.
b. If there is a New, DEL - filter ( Records 4 and 10 )
c. If there is a Adj and DEL - filter ( Records 6 and 8 )
If there are matchin NEW and ADJ ( No DEL ), it should not filter, The NEW record shud have 30 at position 25 and ADJ record shud have 40 at position 25.
unmatched NEW, ADJ and DEL records should be retained.
LRECL = 850, RECFM=FB
Only for NEW and DEL we need to populate values at position 25. Others just retails the original record values.
Thanks _________________ Arvind
"You can make a difference with your smile. Have that with you always"
Pls note Values at position 41 is just to denote the record numbers .... they are not part of data _________________ Arvind
"You can make a difference with your smile. Have that with you always"
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum