passing the records based on the division condtion

5 pts.
Tags:
Conditional expressions
a falt file containg 500 records so i need to pass the records based on the division condition to the 4 output files created i.e records divisible by 2 not by 4 means 2nd,6th,10th records must pass to file 2 and divisible by 4 pass to the file 4 and divisible by 3 passed to file 3 and remaining all pass to the the file one
ASKED: January 16, 2008  5:32 AM
UPDATED: January 17, 2008  2:32 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

<pre>Use a loop to read through the records

if (record is divisible by 4)
save D4 to a field (divby) in that record
elseif (record is divisible by 3)
save D3 to a field (divby) in that record
elseif (record is divisible by 2)
save D2 to a field (divby) in that record
endif

sort table on divby
loop through again
create file from start to change in divby
end report and start another
create file from start to change in divby

Not sure if this is what you are talking about, but this is pretty basic stuff from what I am seeing. It could all be done with one passthrough, but I don’t know enough to guess what you are doing it ‘with’ or ‘in’.
</pre>
HTH
Owen

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following