Unzip in DS

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
urshit_1983
Participant
Posts: 73
Joined: Wed Jun 28, 2006 3:27 pm
Location: NJ

Unzip in DS

Post by urshit_1983 »

Can a file be unzipped in Datastage, installed on Client with OS=Windows? Is is possible without moving it to server, with OS=Unix?

Thanks
"Nobody is expert in Everything,
But Everybody is expert in Something."
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

yes.
In sequqential stage properties, where you define the file path. you can give the command gunzip. this will be executed before the file is read.

You also need to check "stage uses filter commands" before you can enable the filter command input box.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

All DataStage job files are relative to the server and not the client. You can execute command-line unzip program a part of a sequential file stage, but it must be visible from the Server.
urshit_1983
Participant
Posts: 73
Joined: Wed Jun 28, 2006 3:27 pm
Location: NJ

Post by urshit_1983 »

Thanks ArndW. That was my question. So first I need to FTP to Unix server then use unzip. Rite ?
"Nobody is expert in Everything,
But Everybody is expert in Something."
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Sure, if you have the appropriate unzip program on UNIX, or else unzip it on the PC and FTP it over, or perhaps you might have software that lets you mount a NTFS network drive from your UNIX flavor.

The unzip or other preprocessing can be done as a call from your sequential file stage once you've got the file on your DataStage server system.
urshit_1983
Participant
Posts: 73
Joined: Wed Jun 28, 2006 3:27 pm
Location: NJ

Post by urshit_1983 »

Thanks I got it. But I want to make this automated to unzip. Is there a way in Datastage?
"Nobody is expert in Everything,
But Everybody is expert in Something."
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Ofcourse you can. Look at the filter option in the sequential file stage, or you can even get it done as a before job subroutine by ExecSH and typing your unzip command there.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
urshit_1983
Participant
Posts: 73
Joined: Wed Jun 28, 2006 3:27 pm
Location: NJ

Post by urshit_1983 »

So I have to write a UNIX script rite ? That means that I need to do FTP from Unix and act Unix as my Local machine and my PC as remote rite ? But then when I use FTP in unix what shall i write in Open to ?
"Nobody is expert in Everything,
But Everybody is expert in Something."
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The word is "right".

A UNIX script rite is something too horrible to contemplate.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you use the DataStage FTP stage and filter your unzip command into your sequential file stage you do not need to write any scripts.
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

Krazykoolrohit wrote:yes.
In sequqential stage properties, where you define the file path. you can give the command gunzip. this will be executed before the file is read.

You also need to check "stage uses filter commands" before you can enable the filter command input box.
thats what i said :roll: No need to write a script. its just a command which can be passed and you may even zip it back if you have a output link from that sequential stage
Post Reply