×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Problems selecting data

Problems selecting data

Problems selecting data

(OP)
Hi there, first post for me.  Below I have some sample data in a master file for employees and I would like some help with some code that will select/filter out the right data:

ID#     POS#     FUND     PERCENT     EFF.DATE
4366     Z1     20502       100       35796
4366     Z1     20502       100       36923     *
4306     Z2     20502        50       35796
4306     Z2     22018        50       35796
4306     Z2     20502        50       36192
4306     Z2     22018        50       36192
4306     Z2     20502        50       36514     *
4306     Z2     10003        50       36514     *
4307     Z3     20502       100       35796
4356     Z3     20502       100       36290
4323     Z3     20502       100       37270     *

I have a number of issues here.  Ideally, I'd like to select the line(s) of code that have the highest date for a particular POS#.  The PERCENT field, if not 100, needs to have more than one line produced.  I have put an asterisk next to the lines I would want to keep.  I hope I have been clear on this and I would really appreciate some ideas for the Focus code.

I'm thinking I need to have a complex WHERE statement in the TABLE FILE section.  Thanks in advance!!

RE: Problems selecting data

I think this will do it:

TABLE FILE yourfile
PRINT ID FUND PERCENT
BY POS
BY HIGHEST 1 EFFDATE
END

HTH

RE: Problems selecting data

(OP)
Thanks kiddpete!  You're answer worked!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close