Hi,
I have one file:201304040048.SDP101.00011.7190054(Today file)
tomorrow may be i will get same file like
201304050048.SDP101.00011.8040073 and dayafter tomorrow i will get like 201304060048.SDP101.00011.8140813....
In the above example 2013(Year),04(month),04(day),0048( time),SDP101.00011(Filename)7190054(No.of Records).
In the above example year,month,day,time and number of records will change daily.I don't want to change paramer file and aut
omatically it has to pick latest file.
In which basis i have to take file and run the same job daily?(means daily file name is changing.so,How can i take file)
Please suggest me how can i rename and run jobs daily?.....
How to rename and run daily basis jobs?
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
I think you know the commands to check the files in directory or other unix commands by now.
Start writing them in a sequence. For a starter i would say you can use
ls -1 or ls -lt to list the files/files in order. If you are using ls -lt you need awk command to get just the file name.
Take the first file name using head -1. And you have the file name.
Now run dsjob command and use -param and assign the value of file name to file name parameter.
Once the job is complete move that file already processed to some other directory as archive.
and you are done. Check for syntax using man page in UNIX. You can run this in loop if you expect multiple file.
If you do not care which file is processed first, just you file pattern in the sequential file stage. Be sure to move the files to another folder once the job is done. So that its ready for next day.
Start writing them in a sequence. For a starter i would say you can use
ls -1 or ls -lt to list the files/files in order. If you are using ls -lt you need awk command to get just the file name.
Take the first file name using head -1. And you have the file name.
Now run dsjob command and use -param and assign the value of file name to file name parameter.
Once the job is complete move that file already processed to some other directory as archive.
and you are done. Check for syntax using man page in UNIX. You can run this in loop if you expect multiple file.
If you do not care which file is processed first, just you file pattern in the sequential file stage. Be sure to move the files to another folder once the job is done. So that its ready for next day.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
Hi Chulett,
Filename is a standalone parameter(in my example file is SDP101.00011)daily the filename will be change(means date or month and records also).
In the above example date has been changed(04 to 05) and record count is also incremented 7190054 to 8040073).
And latest data need to store one folder and remaing data(old data) need to move another folder).
Filename is a standalone parameter(in my example file is SDP101.00011)daily the filename will be change(means date or month and records also).
Code: Select all
Ex:today file is=201304040048.SDP101.00011.7190054
tomorrow file is like=201304050048.SDP101.00011.8040073
And latest data need to store one folder and remaing data(old data) need to move another folder).