Read the data from PF between dates

160 pts.
Tags:
AS/400
AS/400 programming
DB2/400
RPGLE
I want to read the all the record from the pf which are between some dates Eg: A PF has one year data let say 2011 year data, I want to read all the records from that pf which are from 01/03/2011 to 05/06/2011 dates. the PF fields are DATE,NAME,ADDRESS,P_no. Can anyone help me how to do this in RPGLE Thanks

Answer Wiki

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

Create an LF by date YYYYMMDD and use that

Discuss This Question: 4  Replies

 
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
  • philpl1jb
    What is the type of DATE field and if numeric or character please show us examples of the data in the DATE field.
    51,355 pointsBadges:
    report
  • vzvzxvcx
    @Philp: the DATE field is created as DATE data type 'L' with date format "yyyy-mm-dd'
    160 pointsBadges:
    report
  • philpl1jb
    Then Charlie Brown's suggestion of a logical on date would be the first choice. In your logic you would setll to the beginning date and prcess until DATE > endding date.  Where beginning and ending date must be date types.   Or an SQL where DATE between ... Phil
    51,355 pointsBadges:
    report
  • vzvzxvcx
    Thanks for the help.....  now its working fine..
    160 pointsBadges:
    report

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