Sequential FIle Scenario

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
ashish10mca
Participant
Posts: 9
Joined: Sat Oct 10, 2009 6:13 am

Sequential FIle Scenario

Post by ashish10mca »

Hi..

I am facing a problem to develop below scenarion in datastage 7.5.

SCENARIO:

How to catch a string pattern from sequential_file source (just like grep in UNIX) . and if able to catch a pattern then how to send as an parameter for next job on run time??

Please Suggest..??
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

Post by devesh_ssingh »

use index function to search 1st occurance of pattern then pass the same in jp.
search same in forum you will get more info
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

devesh_ssingh wrote:use index function to search 1st occurance of pattern then pass the same in jp.
Justice of the Peace?

Please don't use potentially ambiguous or unclear abbreviations.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Guess: You are going to check this value which is one of the col in the file.

Seq File > TFM

Write a routine and use that routine in TFM and pass that col as a param and find the result. So that it can be used as a param.

DS User
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

as suggested in earlier post. you can use index function to search for string and write it into sequential file in job1.

Then write a datastage server routine which accept file path and name and return you the value stored in file.

in job sequence use user variable activity add valriable and call datastage server routine , provide file level inputs. it will assign the value stored in file to user variable. which you use in any job next in sequencer.
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why re-invent the wheel? Your putative routine does precisely what the Index() function accomplishes.

To the OP, you could also use grep as a Filter Command in the Sequential File stage or in an External Source stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply