Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting Based on Date in Logical File 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
Hi RPG experts,

I am curious if anyone has been able to do this.

I created a LF - with a S SHIPDT RANGE(1030827 9999999)

so of course it selects records where SHIPDT is greater than
August 26 2003

This data gets imported into an Excel worksheet. Really the user needs to only see TODAY's data. With all the historical data getting selected, the user has to scroll down to see todays shipment data.

My simple question is: Is there any way to make the logical view be "dynamic" and always contain only records where SHIPDT = todays date? Maybe there is a new keyword that I can use on the S elect line?

I'm also exploring ways to do the selection within the Excel sheet or by Microsoft Query.... but the ideal method would be to perform he exact selection on the AS400.

Thanks for any ideas. John




 
This isn't really a good application for a logical. You should be using either a logical keyed on the date, SQL, or OPNQRYF. A logical would be the easiest, SQL would be my next recommendation. OPNQRYF can be tricky.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Thanks iSeriesCodePoet,

The LF is keyed on SHIPDT

K SHIPDT
K CESACD
S SHIPDT RANGE(1030827 1999999)

I've used OPNQRYF in the past, but not sure how to feed that
into the Excel sheet. I need to explore Excels capabilities some more.

John
 
SQL is the only way to go from remote sources (like Excel) if possible. I don't know what the capabilites of Excel are in that respect. And don't take any crap about SQL on iSeries being slow, I have SQL only report that prints out a 60 page report in under 5 seconds.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top