Page 1 of 1

Trying to Append time stamp to file name!!

Posted: Wed Sep 08, 2010 1:04 pm
by allavivek
Hi All,

I was trying to generate file name as #filename#_#timestamp#.

I was generating timestamp in sequence using command as
date '+%y%m%d:%H:%M:%S'

while running sequence job is getting aborted and error is
When processing argument -fileWhen processing path: /home/xxxx/xxx/file_100908:14:58:00 .dat is not a valid path name

i tried removing ":" from timestamp but it was saying "controller problem code =-4 "
Then i tried passing timestamp using Erreplace(timestamp,@FM," ")
but still error is coming...

Any suggestions please...

Thank you

Posted: Wed Sep 08, 2010 1:24 pm
by anbu
Dont add space to the timestamp. Try this

Code: Select all

Erreplace(timestamp,@FM,"") 

Posted: Wed Sep 08, 2010 1:28 pm
by allavivek
anbu wrote:Dont add space to the timestamp. Try this

Code: Select all

Erreplace(timestamp,@FM,"") 
Hi anbu ,

Thaks for reply ..i did tried that option but still error persists..

Thnak you

Posted: Wed Sep 08, 2010 1:31 pm
by anbu
Can you post the pathname in this run?

Posted: Wed Sep 08, 2010 1:35 pm
by allavivek
anbu wrote:Can you post the filename in this run?
full file name is

#working_dir#/#param_DataFilename#_#Param_timestamp#.dat


param_timestamp is what iam trying to get from sequence..

Posted: Wed Sep 08, 2010 1:37 pm
by anbu
Can you post the value of filename from director?

Did you get the same error message after the erreplace change?

Posted: Wed Sep 08, 2010 1:42 pm
by allavivek
anbu wrote:Can you post the value of filename from director?

Did you get the same error message after the erreplace change?
yes anbu ,

But i tried changing the datatype of timestamp param to string in job parameters and it worked...

Do we should have a datatype of string for timestamp value??

I was unable to sort why does error came and why does error gone??

thank you..

Posted: Wed Sep 08, 2010 2:03 pm
by anbu
Timestamp data type is not available for the job parameter. You have to pass date and time separately or as a string