z/OS Connect Enterprise Edition

 Is there any material (documentation/samples) for the BAQPUTN-Call?

Wilhelm Purefuel's profile image
Wilhelm Purefuel posted Tue March 18, 2025 08:32 AM

For my API requester project I need to put some array-like data into my resquest structure. The generated COBOL request contains a XXX-dataarea field, so I assume, I have to do the opposite of the BAQGETN-Call. Guess this is a call to BAQPUTN. But I did not find any documentation or samples how to use  it. The only thing I see ist the BAQ-PUTN-NAME in the BAQHCONC copy book with the value BAQPUTN. Can someone push me in the right direction please? Thanx in advance.

Mark Hiscock's profile image
Mark Hiscock
 
Thanks for this questions and you're correct that when a request structure has an unbounded array, there is a need to dynamically add that data into a named Data Area for sending. You're also correct that to do this, you will need to use the BAQPUTN Host API verb.
 
The good news is the BAQPUTN functionality is about to be delivered in an upcoming z/OS Connect release. We are nearing the end of development for this new feature and we hope to deliver it in 2Q 2025.
 
When it is delivered you will be able to see a good example of how to use BAQPUTN in the sample COBOL and PL/I applications here https://github.com/zosconnect/sample-oas3-requester. We will, of course, update the documentation too.
 
In the meantime, to avoid using Data Areas in request structures, you can use the gradle plugin property "inlineMaxOccursLimit" to ensure the request structure is in-lined into the request copybook. More details on this property are here: https://www.ibm.com/docs/en/zos-connect/zos-connect/3.0?topic=requester-api-gradle-plug-in-properties-options. Also remember that to use this property, the array in the Open API spec document must specify maxItems.
 
Kind Regards,
 
Mark