160 pts.
 Read the data from PF between dates
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

Software/Hardware used:
ASKED: August 22, 2012  1:06 PM

Answer Wiki:
Create an LF by date YYYYMMDD and use that
Last Wiki Answer Submitted:  August 22, 2012  2:16 pm  by  CharlieBrowne   32,835 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,835 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What is the type of DATE field and if numeric or character please show us examples of the data in the DATE field.

 44,150 pts.

 

@Philp: the DATE field is created as DATE data type ‘L’ with date format “yyyy-mm-dd’

 160 pts.

 

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

 44,150 pts.

 

Thanks for the help…..  now its working fine..

 160 pts.