Control-M overriding command script

147 views Asked by At

Can you override a command parameters in Control-M when ordering a job? For example, the command parameters -s %%YYYY-%%MM-%%DD. -e %%YYYY-%%MM-%%DD. will give me the dates output as s 2022-04-12 e 2022-04-12. Is there a way I can override this command using variables when ordering the job if I want to get the data for s 2022-03-01 e 2022-03-31. I do not necessarily want to change the command script, only overriding it in the variable section when ordering the job for dates s 2022-03-01 e 2022-03-31.

1

There are 1 answers

0
Mark On

Well the variables called are usually the variables you want. However, if I understand the aim of the question, you should be aware that the variables listed in the variable section of the job def are sequential.

For example, if you keep all the variables as local in these fields and query today's date in the first one then you can manipulate as required -

%%my_date=%%CALCDATE %%DATE -1

then my_date is whatever you want.