How can I insert the system variable @date and @time in the name of a file ? Hope it is possible.
Thanks.
sequential file name with system date and time
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
luca -
I don't *believe* you can do this in a server job without leveraging a job parameter. Meaning, typically this would be set by job control and then passed in as a parameter. Or another (pre/controlling) job could generate the information and then stash it in a manner that a followup job could grab it and bring it in as a parameter. We date/time stamp filenames in this manner all the time.
Be happy to be proven wrong. [:)]
-craig
I don't *believe* you can do this in a server job without leveraging a job parameter. Meaning, typically this would be set by job control and then passed in as a parameter. Or another (pre/controlling) job could generate the information and then stash it in a manner that a followup job could grab it and bring it in as a parameter. We date/time stamp filenames in this manner all the time.
Be happy to be proven wrong. [:)]
-craig
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Another excellent suggestion from Ray! [:D] You could even use a 'generic' script that takes the filename as a parameter and stamps it in some standard manner, which may give you a little more control and the ability to report errors more gracefully.
Don't forget you have control over the formatting of the date command, and can include the time as well. For example:
`date +%m%d%Y_%H%M%S`
`date +%Y%m%d`
-craig
Don't forget you have control over the formatting of the date command, and can include the time as well. For example:
`date +%m%d%Y_%H%M%S`
`date +%Y%m%d`
-craig