Move files from working to shared directory

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kunj201
Participant
Posts: 15
Joined: Tue May 03, 2005 8:02 pm

Move files from working to shared directory

Post by kunj201 »

Hi there,
I need to move file from working folders to a shared drive.

I need to look for all .xml files in 3 directories from data stage file directories..ie.. e:\data\dev\folder1, e:\data\dev\folder2...folder3
and move them to a shared directory outside datastage server.
I have a network shared location value as env variable where i should move all 3 files, archive them into an archive folder under same shared drive.
Datastage directories should be clean..no xml files should be there afrer this process...
What is the bestway to achive this?
Thanks for your help :)
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

A Sequence with Command stages, a Batch job with DSExecute API calls, make your choice.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kunj201
Participant
Posts: 15
Joined: Tue May 03, 2005 8:02 pm

Post by kunj201 »

kcbland wrote:A Sequence with Command stages, a Batch job with DSExecute API calls, make your choice. ...
A batch job.
Again, the file generation will be dynamic. ie.. For jan run, it will have one Ins_XYZ_1.xml...
but for march run, it will have Ins_XYZ_1.xml,Ins_XYZ_2.xml, Ins_XYZ_3.xml...
Also might have Del_XYZ.xml..
So I would like to search for all .xml file in FolderA, folderB, folderC and so the rest as above...
Thanks!!!

PS: I will see if we can change target directory so all xmls are under one folder..lets say XMLfolder.
Zet
Participant
Posts: 9
Joined: Wed Feb 14, 2007 3:44 am
Location: From Ukraine

Post by Zet »

kcbland wrote:A Sequence with Command stages, a Batch job with DSExecute API calls, make your choice. ...
Sorry
Can you give an example?
I have a network device J: and file on device D:, and try to copy it from D: (local disk) to J: (network shared)
I create file copy.bat with text "copy D:\file J:" and i start them with sequence execute command but file does not copy =(
If I start a file directly on server then everything OK.
Wolf
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

All files must be visible from the DataStage server, not your PC. Make sure the userid running the job has permissions to see all source/target drives, directories, and files.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Zet
Participant
Posts: 9
Joined: Wed Feb 14, 2007 3:44 am
Location: From Ukraine

Post by Zet »

kcbland wrote:All files must be visible from the DataStage server, not your PC. Make sure the userid running the job has permissions to see all source/target drives, directories, and files.
If I start a file start.bat directly on server by user dsadm then everything OK. All permission are granted.
But if i start this file by sequence execute command from client work station.
Maybe trouble in owner of process DataStage server (LocalSystem) in Windows Computer Management
Wolf
Zet
Participant
Posts: 9
Joined: Wed Feb 14, 2007 3:44 am
Location: From Ukraine

Post by Zet »

It is impossible! =(
Whether probably the DataStage 7.5 to write down a file on a network disk?
Wolf
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

All processes run on the DS Server as the userid running the job. That userid must have all permissions and accessibilities from the DS Server. Any network drives must either be mounted (map a network drive) or pathed using UNC syntax (\\remoteserver\shareddirectory). Nothing happens from the Client side PC ever.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply