RPC stripping the leading spaces from my fields?

Hi All,

I’ve written a Natural subprogram and generated an IDL from it. It brings back data from my Adabas file just fine, with one small problem. Nine of the records have descriptor values that begin with a space.

“(space)ALTOONA SHOE DEPOT” exists at the beginning of the file and “ALTOONA SHOE DEPOT” as a nearly-duplicate record following “AARDVARK BEAUTY AND PLUMBING SUPPLIES”, which itself follows all of the records with a leading space in the descriptor.

The IDL tester is showing that the leading space has been trimmed in the subprogram output. This is a problem when I try to get back to the “ALTOONA SHOE DEPOT” because without the leading space my read statement starts with the other ALTOONAs and not at the extreme beginning of the file.

I’ve run my subprogram via CALLNAT in TN3270 emulation to verify that the leading space is preserved on the Natural side. The IDL tester and the soap web service I generated show that the leading space to be stripped or trimmed from the field somewhere after the callnat for the RPC.

Where exactly is this happening, and how can I turn this arguably desirable TRIM feature on or off as needed? I’ve stumbled through all of the documentation I could Google, but so far I have found no reference to this trimming or stripping feature or where it might be happening.

I should mention that I did all of this on NaturalONE, and that the data and subprogram reside on an IBM mainframe. My Natural Administrator talked me through defining my RPC environment to access the mainframe subprogram in the IDL. I am very new at all of this, and am timidly stepping off of the green-screen for the first time.

Thank you much for any enlightenment you can provide!

David

Missing a bit of information here, what is the client consuming the service ?

If you edit the XMM file, then go the the XML Request (or Response) tab, you can right-click and select “New Child Node” from the context menu. There’s a checkbox on the pop-up “Generate xml:space attribute”. Check that, OK, etc and it will add xml:space=“preserve” attribute to that node.

1 Like

Thank you Douglas Kelly for exactly what I needed!!! Thank you also to Wolfgang Winter. Though I no longer need a response, here’s the detail on my client. The phenomenon presented within NaturalONE, using the IDL tester and I am still blissfully unaware of the underpinnings of that client’s implementation. My intended client is Javascript running in IE 9 and above initially, though I would ultimately like to support a wider variety of browsers and browser versions once I’ve learned a little more. This is all still very new to me.

Thank you both for jumping in, and thanks to Software AG for the forum!

David