Page 1 of 1

Posted: Mon Mar 23, 2020 9:22 am
by chulett
Just a shot in the dark but to you have an opportunity to manipulate the result string before passing it back out, trim off the parts you don't need?

Posted: Mon Mar 23, 2020 2:28 pm
by DataStageRocker
Thanks for your reply. DataStage job is not populating the "results" key word. As per IBM support note - the "results" key is being populated for JSON format binding. Is there an option to drop/uncheck the "results" header in the Information Services Directory client?

Posted: Mon Mar 23, 2020 6:55 pm
by chulett
Ah. That should probably be a support question then.

Posted: Thu Mar 26, 2020 12:50 pm
by eostic
The JSON payload format is fixed --- meaning not very adjustable...and is a convenience of doing the binding.

The simplest thing to do is to have your developers who are receiving the payload use what they are getting and adjust things on their side after they receive it.

The reason the "result" is set up as you see is that it is allowing for the option to pass an entire "array" (the JSON square brackets []), because the Job might be sending 100 rows instead of just one.

Of course, there are lots of ways you could do this.....so....if you REALLY need a different payload, you might just want to build it yourself.

This is easier said than done, but if the payload you need is fairly simple like this one, and only one row, you can build it very easily in a Transformer Derivation.

It's been awhile since I've looked at the Application builder, but look in your bindings for the "Text over HTTP" binding. It was designed exactly for this purpose. It basically says "just blindly pass along, via HTTP, whatever DataStage gives me".

So.....you can have a Transformer stage as the last thing prior to ISDOutput, and in that Stage, pass out a longvarchar .....and in the derivation, bring in your columns from your upstream links and concatenate them any way you need and want to manually build the exact JSON string that you want ....and then feed ONLY that single longvarchar column into ISDOutput.

Ernie