AS400 IFS file rename

I am Running a process which read each month  control record by reading one record for each month from Physical file & that process create 3 csv files on each month in ifs (/home/one) for each month same name which I have this automated through CL.

Now I have to add another functionality so that will move the  files from /home/one/*.csv  to /home/two/Jan_2017_*.csv and read the next month control record.

I Have the prefix Jan_2017  to Dec_2017  also in the physical file.

How can I add this functionality into my CL for each month?

Thank you in advance as always.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MurpheyApplication ConsultantCommented:
I advise to use the Qshell option to rename the files

But is it's archive only you also can zip them from the as/400, with qshell

QSH CMD('jar -cfM /HOME/TWO/  *')

Or from CL:
CHGVAR     VAR(&CMD)  VALUE(' jar -cfM /home/tku/two/  *' )

of course you can create the &CMD parameter dynamically

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Phillip KnoxSenior Systems AnalystCommented:
"Now I have to add another functionality so that will move the  files from /home/one/*.csv  to /home/two/Jan_2017_*.csv and read the next month control record."

So you have a Jan_2017_.csv file in /home/one that you want moved to /home/two?
MurpheyApplication ConsultantCommented:
MOV OBJ('/home/one/*.csv')    
MurpheyApplication ConsultantCommented:
both are good options
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.