|
3 if: - If you need this parameter to select some records only - if it does not appear in the header of the report - If dates are stored as number, not type date Then, use 32 for the day. It will do the job (the day 32 will always be after the last day of the month and before the first day of the following month) Otherwise, you can write an RPG program to calculate the date for you. It would be very simple in RPGIV: just substract 1 day of the 1rst day of the following month. Denis Robitaille Directeur service technique Cascades Inc 819 363 5187 fax 819 363 5177 >>> Brad McDaniel <BMCDANIEL@ABSBC.ORG> 10/13 9:31 AM >>> I am writing some CL's to automate some monthly jobs that are usually submitted through user menus. This particular CL submits a job with the prior month and year as the parms (let's say &YEAR (4) and &MONTH (2)). Then, the CL does a STRQMQRY with the year, month, and day of the last day of that month. Does anyone have a sample of the easiest way to figure out the last day of a particular month (i.e. if run today, the year and month would be 1999 09, and the CL would need to pass 19990930 to the query.)? I know the method for passing parms with STRQMQRY, I am just wondering if anyone has some code laying around that gives you the last day of the month (accounting for leap years also). Thanks Brad McDaniel Information Services Annuity Board, SBC http://www.absbc.org 214-720-6546 +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.