Two Links from a Transformer; Missing Information

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
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Two Links from a Transformer; Missing Information

Post by ScottDun »

Hi,

I have a transformer in which I branch off two links. The first link is separating the text file so that the transformer is looking at the header of a file; it gets forwarded to a merge. The second link is looking at the trailer of the file. In the trailer, I need the first 11 characters of the column. Then I bring it to the merge and then to a final file. The number was populating. I got rid of the file and added another transformer and branched off two more files. I simply carried over the previous merge rows into the transformer and then to each of the files. The information does not show up anymore. I get rid of the two files and transformer and it populates. What would be the reason for this?
SCOTTDun
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:?

Honestly, I'm not following and I think it is going to take "eyes on" to understand your issue. Perhaps if you took screenshots of the two job variations and posted them here? Might give us a better starting point for this conversation. We might also need to see inside the transformer but let's start with the jobs.

You'd need to upload them to any of the free image hosting sites (like http://imgur.com/) and then use the image [img] tags here. Or post the URL.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

Image

The copy stage will spit out the answer I need just fine. But something may be wrong with the merge itself.
SCOTTDun
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...to better understand your process, are there "many rows" in what you describe as the "header" or the "trailer"? ...or just one row each, that you are then trying to put back together?

...and then what are you doing with the remaining body of the file?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

Company still is a month or so away from securing a membership. That being said, I have the text file that contains "X" amount of rows, 2 columns. The first and last row are simply HEADER and TRAILER and they are the ones that I am focused on in this certain pic. The transformer is separating into two links; the first link retrieving the HEADER and 2nd the TRAILER. I figured out the problem with the TRAILER count. The TRAILER count is in the 2nd column. Thanks for the response.
SCOTTDun
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... what problem still remains?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

So an example of the TABLENAME and CLOB columns :

HEADER PROVIDER20151223

The HEADER is the first row to populate in the file no matter what. We have a UNIX script that will be reading the file before it enters the job (which I took care of in the sequence job). There are errors that the UNIX looks for and will reject the file before it enters, however, that error code needs to be passed through to one of the columns. of the new file I am creating. Error code 1 says that there is no HEADER on the incoming file. So I create a test file and remove the word HEADER and replace it with SOCCER (it can be anything). I need that PROVIDER in one column and the 20151223 in another (which I use CLOB [1,8] and CLOB [9,8]). So to narrow the "X" amount of rows in the file to just one row, that transformer is set to the constraint "StripWhiteSpace(NYMMIS_TB_EXTR.TABLENAME) = 'HEADER'". The problem is that when I remove the HEADER, the constraint fails because it is literally looking for the word HEADER. The UNIX code gets to the transformer from the sequence job and the PROVIDER20151223 but since the transformer doesn't see HEADER, nothing populates. How can I set a constraint for the input sequential file to see just that 1st row so I can insert data?
SCOTTDun
ScottDun
Participant
Posts: 61
Joined: Thu Dec 10, 2015 9:51 am

Post by ScottDun »

Actually Craig, I figured it out. I inserted a new column "NUM" and then used the Row Number Column and used that in the transformer and it worked.
SCOTTDun
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

8)

Marking the topic as resolved for you. You can always mark any of yours yourself and also re-open them if you need to.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply