export and import job on UNIX
Moderators: chulett, rschirm, roy
export and import job on UNIX
Hi
Can the datastage jobs be imported from UNIX box, i.e., if the .dsx file is placed on UNIX, is there a dsimport.exe like utility which can import the jobs in DataStage?
Thanks
Rishi
Can the datastage jobs be imported from UNIX box, i.e., if the .dsx file is placed on UNIX, is there a dsimport.exe like utility which can import the jobs in DataStage?
Thanks
Rishi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hmm...
There is 'dscmdimport.exe' and 'dscmdexport.exe' in DataStage client folder. You can use these.nkln@you wrote:Thanks. In that case, is there any command in Windows which we can put in Bat file which will call DS Manager and take the export of jobs using the input file containing all the jobs?chulett wrote:The 'DS Manager' is a client tool. Windows, not UNIX.
"dscmdimport"
usage: dscmdimport [/H][/U][/P][/O][/NUA] project|/ALL|/ASK filepaths [/V]
/H Host name.
/U User name.
/P Password.
/O Omit flag.
/NUA Suppress usage analysis.
project Specifies the project name.
/ALL Import the specified dsx files into all projects on the server.
/ASK Asks for project name.
filepaths Specifies the import file names.
/V Verbose. Default to false.
"dscmdexport"
usage: dscmdexport [/H][/U][/P][/O] project filepath [/V]
/H Host name.
/U User name.
/P Password.
/O Omit flag.
project Specifies the project name.
filepath Specifies the export file name.
/V Verbose. Default to false.
ZealCrash
This command will work for exporting just one job. If I have 20 jobs to export, is there any way I can put all these 20 jobs in a file and then pass this file as input to dsexport.exe which will take each job one by one and keep appending into the same dsx file.chulett wrote:You wouldn't call the Manager but rather dscmdexport.exe for an entire project or dsexport.exe for a single job.
Is there any way I can do this in unix? I mean run any command in Unix which will take the DS export into a file?
Aim high
No, you can't "pass the file" to the command but you can craft a script that reads the file and calls the export command for each record / job name. And from what I recall of previous conversations here, it does not support appending output so your script would need to create multiple output files and then concatenate them together as the last 'cleanup' step.
There's no server side export facility that I am aware of, it's all client-based. For the sake of completeness, it is worth noting that 'dsjob' can do job imports but I believe it only handles executables. There's no export capability in it.
There's no server side export facility that I am aware of, it's all client-based. For the sake of completeness, it is worth noting that 'dsjob' can do job imports but I believe it only handles executables. There's no export capability in it.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 232
- Joined: Fri Aug 04, 2006 1:20 am
- Location: Bangalore
Might be this script will help you.
Code: Select all
::****************Begin Export Loop
For /F "tokens=1" %%i in (C:\export\DsxList.txt) do (
echo **** Exporting Job %%i
C:\Progra~1\Ascential\DataStage7.5\dsexport /H=HOSTNAME /U=USERID /P=PASSWORD /JOB=%%i PROJECTNAME c:\export\aa.dsx
type C:\export\aa.dsx >> C:\export\dsfinal.dsx
)
ECHO *** Export completed successfully
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Possibly not, however, since it's notoriously difficult to run a BAT file on a UNIX system. The logic could be converted into a UNIX shell script however, and one would need dsexport to be available on the server machine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Does this mean the Script that has been posted by DW_USER can not be run on a DS Client machine.ray.wurlod wrote:Possibly not, however, since it's notoriously difficult to run a BAT file on a UNIX system. The logic could be converted into a UNIX shell script however, and one would need dsexport to be available on the server machine.
I just tried the dscmdexport in a client machine but it didnt give any outputs. I am not sure why. I used the following statement.
dscmdexport /H devds /U dsadm /P dsadm test "C:\test2.dsx"
Aim high
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: