How to process sequential file with varying record formats?

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
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

is the pattern '*' found in the data also ? Otherwise you can define this character as the record delimiter.
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

Post by truenorth »

Unfortunately, yes, the data contains *.
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read each line as a single VarChar column, and effect your parsing in a Transformer stage. Use stage variables to track where you're up to in each logical record.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

truenorth wrote:Unfortunately, yes, the data contains *.
How will you, even manually differentiate the '*' in the delimiter and the data?

We have had a similar file once but we never got '*' in the data.

Maybe you can check with your source system and confirm if the delimiter can be changed to something which will not be in the data.
Arun
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

Post by truenorth »

ray.wurlod wrote:Read each line as a single VarChar column, and effect your parsing in a Transformer stage. Use stage variables to track where you're up to in each logical record. ...
Makes sense, Ray. I'll go that route.
arunkumarmm wrote:
truenorth wrote:Unfortunately, yes, the data contains *.
How will you, even manually differentiate the '*' in the delimiter and the data
As a matter of fact, that was exactly what I was saying. We couldn't differentiate the *s.
arunkumarmm wrote:Maybe you can check with your source system and confirm if the delimiter can be changed to something which will not be in the data.
Great idea. I'll pursue that, too.

Many, many thanks, everyone. I'll keep you posted.
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

Post by truenorth »

We've determined that the tilde character is not present in the data. We will replace all * in the first column of each record. I have assigned a developer for this task. Consider this resolved.
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
Post Reply