how to add timestamp to a file name ?



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

how to add timestamp to a file name ?

Postby richagoyal » Wed Sep 28, 2011 11:14 am

Hi,

I have a file name , i want to suffix the file name with time stamp ! i prefer to do through sort/icetool !

Can anyone help me in this ?
eg :
file name : as.dbx.bd
time stamp : 2011-09-28-01.32.04.623397
new file name should be as.dbx.bd.2011-09-28-01.32.04.623397
richagoyal
 
Posts: 20
Joined: Thu May 27, 2010 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to add timestamp to a file name ?

Postby BillyBoyo » Wed Sep 28, 2011 11:44 am

First, look at the rules for forming dataset names (on common mainframe operating systems...). Your desired name breaks several. Is the "file" under a different operating system?

Second, why do you want this (or what you could get with valid names) on your dataset name? We might have suggestions if we know the purpose.

Third, how were you thinking you might be able to do it in sort/icetool?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: how to add timestamp to a file name ?

Postby richagoyal » Wed Sep 28, 2011 12:54 pm

Hi,
i have a file that is generating every week the file is not containing any date value so by looking the file we cant make out this is which run file.
Requirement is the file name should have timestamp added to it as suffix.

please let me know how we cant do it !
richagoyal
 
Posts: 20
Joined: Thu May 27, 2010 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to add timestamp to a file name ?

Postby richagoyal » Wed Sep 28, 2011 1:19 pm

yes the file is in different operating system , I am getting the file to mainframe and then I need to change the file name
richagoyal
 
Posts: 20
Joined: Thu May 27, 2010 11:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: how to add timestamp to a file name ?

Postby steve-myers » Wed Sep 28, 2011 5:29 pm

How is the data getting to the MVS system? If you are using FTP it is very easy to create a valid MVS dataset name.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: how to add timestamp to a file name ?

Postby BillyBoyo » Wed Sep 28, 2011 6:41 pm

Your intended name is not valid for the mainframe.

Once you come up with a valid one, you can think about how to generate it. What is the source of your proposed timestamp? If it is weekly, do you need much beyond the actual date for recognitions, and then a look at the catalog when you need to know exactly? Nice if it was a business date, otherwise you end up in a pickle on a re-run.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post