Runnig a script in datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 38
- Joined: Mon Feb 27, 2006 10:34 pm
- Location: Chennai
- Contact:
Runnig a script in datastage
I have a script for renaming the file ,when iam running the script in Unix command prompt it working fine,but when iam runing in Datastage
After job subroutine on ExecSH it is throwing error
The script is
mv /data/datastage/Data/EMEA/sampleV.txt /data/datastage/Data/EMEA/sampleV$(date '+%Y%m%d')".txt"
Plaese help me out
After job subroutine on ExecSH it is throwing error
The script is
mv /data/datastage/Data/EMEA/sampleV.txt /data/datastage/Data/EMEA/sampleV$(date '+%Y%m%d')".txt"
Plaese help me out
Mohammed Tausif Hussain Sheikh
Cognizant technologies,Perungudi
Chennai
Cognizant technologies,Perungudi
Chennai
Re: Runnig a script in datastage
You dont $. Thats to reference it inside the script. And note date is surrounded by ` and not '(quote). Just copy paste my code in the execsh.
Code: Select all
mv /data/datastage/Data/EMEA/sampleV.txt /data/datastage/Data/EMEA/sample`date +"%Y%m%d"`.txt
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 38
- Joined: Mon Feb 27, 2006 10:34 pm
- Location: Chennai
- Contact:
If you are trying to say that you don't know how to add a time portion to the already provided date solutions, it's just this:mdtauseefhussain wrote:I need to concatenate time stamp along with the date
Code: Select all
%H%M%S
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 38
- Joined: Mon Feb 27, 2006 10:34 pm
- Location: Chennai
- Contact:
For these unix comand help, type
from your unix command prompt. You will have the possible list of attibutes and parameters that need to be passed.
For HP-UX that I tried, gave me the following.
Code: Select all
>man date
For HP-UX that I tried, gave me the following.
Code: Select all
>date "+%Y%m%d%H%M%S"
20060714191923
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 38
- Joined: Mon Feb 27, 2006 10:34 pm
- Location: Chennai
- Contact:
It has a space in between. Who keeps a space in a unix file.
If you do, then good luck in opening it.
If you do, then good luck in opening it.
Last edited by DSguru2B on Fri Jul 14, 2006 7:36 am, edited 1 time in total.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 38
- Joined: Mon Feb 27, 2006 10:34 pm
- Location: Chennai
- Contact: