Help with FTP Multiple Files in DataStage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
yugee
Participant
Posts: 34
Joined: Fri Feb 04, 2011 5:54 pm

Help with FTP Multiple Files in DataStage

Post by yugee »

Hi,

I have a below requirement in one of my integration.
> Input is a file with File name and Folder name. It has multiple records.
> I have to read each record in this file and connect to a source system, get the file based on the folder and file name and place it to the target.
> the file is in Binary and doesn't require any content modification/validation.

Please let me know if there is any option in DataStage to achieve this.

Thanks,
Yugee
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

We can acheive through sequencer Looping activity
Srinu Gadipudi
yugee
Participant
Posts: 34
Joined: Fri Feb 04, 2011 5:54 pm

Post by yugee »

in my current environment, sequencers are not allowed. is there any way to achieve this in datastage job?
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

I don't mean to be sarcastic, but a sequence job with a loop is actually the best solution for this, and sequence jobs not allowed is much like being asked to run but being ordered to shoot yourself in one foot first.

One way I've seen: read each file name and path in sequential mode, and write it to a generic FTP script, then use some method to run each script. The script for each FTP is your output file, not an execution call.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Are Batch Jobs allowed in your shop? If yes, you can achieve the same thing using Batch Job ... it may be a little more work.
yugee
Participant
Posts: 34
Joined: Fri Feb 04, 2011 5:54 pm

Post by yugee »

I thought of creating a FTP script with all the input files and corresponding output files. and execute this script out of DataStage.

Other than that, is there any way I can use FTP Enterprise stage with column names as variables in the input and putput file names..
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Yes, your approach will work.

This can also be achieved by writing a subjob with FTP functionality and parameterized properties; Subsequently call the subjob in a loop from a BatchJob (or Sequencer) passing necessary parameters.
Post Reply