How to remove stage data through Sequential file stage

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
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

How to remove stage data through Sequential file stage

Post by Krazykoolrohit »

Hi,

I am extracting a table and then loading it into another with a sequential stage in between.

i want to use the filter option in the sequential stage to delete this file once my load in over. Any suggestions?

Any other way i can delete the file? other than a after job routine?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Filter option is to facilitate the read operation. I belive its not possible to delete the read file using the filter option.
But what stops you to use after job subroutine?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

You can use an IPC stage instead of a Sequential File stage, if you are doing the whole process of extracting and staging in sequential file and then loading into another table in a single Job. Else, another way I could think of would be to use a Execute Command stage in Job sequence after the Job, but using an after job subroutine would be much simpler and easier. May I ask why you would want to avoid using an after Job subroutine?
Kris

Where's the "Any" key?-Homer Simpson
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

I want to avoid it because i already have a routine running for each job and i would have to modify them.

Can you guide me how to remove the sequential file in a routine? I would also like to know if i can run two after job subroutines
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

How about other suggestion I have mentioned.? Do they serve as other options?
Kris

Where's the "Any" key?-Homer Simpson
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

In the next job, you can do it in the before job subroutine.
Also, i would advise not to delete the file untill the end of the entire process. You might be needing to look at the file if something goes wrong. Basically for debugging purposes. If that is not an issue, then i would go with Kris's suggestion. Use an ipc stage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

thanx a lot . will try this
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

Topic Hijack -- Can I write to a sequential File which is present in some other share drive (LAN) and is not actually present in a physical drive on the ASCL server.

OS : Windows.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Yes, you can write to sequential file which is present on another shared drive which is mapped to your ascential server. You will have to use UNC(Universal Naming Convention) path as the path for the sequential file.

why would you want to hijack a thread? It is not adviced.
HTH
Kris

Where's the "Any" key?-Homer Simpson
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Hijacking is not permitted :evil:
Ops, that was a little harsh, just pulling your leg :wink:
Try browsing for the file server from within the sequential file stage. If the server is visible, then you can.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

DSguru2B wrote: Try browsing for the file server from within the sequential file stage. If the server is visible, then you can.
It doesn't have to be visible to be able to write to or read from. If the shared drive you wanted to write data to is mapped to the Ascential drive then that should be enough. You can just specify the UNC path of the mapped drive and sequential file stage is going to write to or read from that drive.
Kris

Where's the "Any" key?-Homer Simpson
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

When we say UNC path do we mean like if I create the share like H:\ , then I shoud say like h:\file.csv even if I am not able to see it in the browse button??

Sorry guys for hijacking the topic I was little Lazy to create a new one....:-(
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

You should give the filepath as

Code: Select all

\\servername\foldername\filename.csv
Kris

Where's the "Any" key?-Homer Simpson
Post Reply