WISD output stage

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

WISD output stage

Post by rahul8055 »

In the designing of my job I need to send three seperate responses to the service based on the conditions.

so for that reason can I use 3 WISD output stages because all the conditions are different



Regards,
Rahul
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

No.....do your log in the job but (if needed) bring the links back together using linkCollector or Funnel so that they use one WISDOutput with a single consistent output message signature.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

So If I use linkconnector or funnel stage I can get 3 outputs in a single wisd output based on three conditions.

my conditions are for ex:-

1.If ID = A then msg:- no records because A
2.If ID = B then msg:-no records because B

3.other than this any ID send all the records.

can I use these conditions in the transformer stage and then a funnel and then WISD output..


Regards,
Rahul
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Build the job and your logic with a single sequential file as the target......make sure you always write at least "one row" with a result to the sequential file, regardless of what happens upstream.....once you get it perfect as you want, replace the sequential file with wisdOutput.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

Actually, My input is a single field but there are two kinds of outputs ..............I mean one has 5 fields and the other one has 20 fields.

so Funnel will not help me with this issue?
does datastage has a stage which can send different outputs to single output........

I mean If input matches with one of the condition the output should have 5 diferent columns and if input matches with other condition the output should have 20 fields.


Thanks
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There's no such thing ...your service will be defined by a "contract", also known as a WSDL. It will have a particular result. That result is fixed...it could have variances "inside of it", but the overall possibilities will be fixed.

It sounds like your client tools are not expecting a single "row" of result columns.

What are they expecting?

If you can dictate the result, then just send them a single row with all the columns that are possible....when the logic says to send only 5, the other will be null...when it says to send 20, the other 5 can be null.

Otherwise, use xmlOutput and build a single xml document that contains all the possibilties, with nulls (or not) and then send that to WISDOutput in a single large varchar column.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

Thank you,

The request I get is unique_id

there are 3 tables in the database.

2 tables have active information and 1 table has inactive information.

when the unique_id comes in as a request I need to check whether it is in the 2 tables or the other table.

I used look-up for that...so the active unique_id does look-up with the fields of these two tables and gets the 20 fields as output.

coming to the inactive unique_id which goes by reject link from look up.
the took this inactive unique_id into a copy and then did again look-up with the 3rd table where I have 5 fields so the output has 5 fields .

how can I create null fields for 5 in the active and 20 in the inactive when there are no fields?
this is the description of my job.....
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

Is the below way better?

first output------>using a tranformer...lets say trans1 with 5 fields input and 5+ 20 fields output where 20 fields are Setnull().

secondoutput------->using a transformer.lets say trans2 with 20 fields input and 20+5 fields output where 5 fields are Setnull().


now funnel for these two outputs and a single output.....to WISD output....

Is this one good enough....or any changes needed.?

Thanks,
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Sounds good to me...does it work nicely to a flat file? [always FIRST test ISD jobs with a flat file or other type of source to a flat file target]

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

PS ...watch out for your null representation. SOAP tooling often doesn't like binary zeros.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

thanks ernie,

watch out for null representation.....so check for the null values whether the output has null values or not?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

no....I just mean, check carefully what the null representation is when it goes out to your flat file. Make sure it's not binary zeros. Blanks would be good. Find out what your client tools are expecting for "null".

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

I tried the same way two transformers.......into a funnel and then.....one link to output which is right now a sequential file.

But the problem is I cant view the data.
No records foun in view command
would you like to see the data
If yes

##I IIS-DSEE-TOSH-00002 12:43:21(001) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 12:43:21(002) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 12:43:21(003) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 12:43:21(004) <main_program> Parameter specified but not used in flow: DSProjectMapName
##I IIS-DSEE-TFSC-00001 12:43:21(010) <main_program> APT configuration file: /opt/IBM/InformationServer/Server/Configurations/default.apt
##I IIS-DSEE-TOIX-00163 12:43:21(000) <Sequential_File_188,0> Import complete; 0 records imported successfully, 0 rejected.
##I IIS-DSEE-USBP-00001 12:43:21(000) <APT_CombinedOperatorController,0> called postFinalRunLocally
**VIEWDATA ROW LIMITER HIT**
>##E IIS-DSEE-TFOR-00089 12:43:21(001) <_ABORT_IDENT_,0> The runLocally() of the operator failed.
##I IIS-DSEE-TFOR-00163 12:43:21(002) <_ABORT_IDENT_,0> Input 0 consumed 0 records.
>##E IIS-DSEE-TFOR-00089 12:43:21(003) <APT_CombinedOperatorController,0> The runLocally() of the operator failed.
>##E IIS-DSEE-TFPM-00040 12:43:21(004) <APT_CombinedOperatorController,0> Operator terminated abnormally: runLocally did not return APT_StatusOk
>##E IIS-DSEE-TFSC-00011 12:43:27(000) <main_program> Step execution finished with status = FAILED.
##I IIS-DSEE-TCOS-00026 12:43:27(001) <main_program> Startup time, 0:05; production run time, 0:01.


Thanks
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Could be lots of things. While you are debugging you might want to start a new thread on the techniques you are using in the Job, as this particular issue is not ISD related.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your "problem" is with stage Sequential_File_188 - is the file empty? Does this stage have a reject link?
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