If you are using AS400 query, you can define a result field to use for you selection.
You can retrieve todays date using using teh keyword CURRENT.
Then you can create other result fields using that and values to determine the begining of the previous month.
I have done this in the past but cannot find a sample for you.
If you do F1 to get the HELP text on the field EXPRESSION in the Define Result Field, you will see what other options to use.
If you need the last day of last month you could use the following in your query:
LSTMTHEND CURRENT(DATE)-(DAY(CURRENT(DATE))) DAYS
It takes today’s date and subtracts today’s day to get the last day of last month.