Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
V7R1 TR11
Good morning:
Need some feed back/experience/suggestions with increating zhbBuffer > 99999 when using QzhbCgiParse. At times we get a large web order and the total length is > 99999 characters and causes the API error out. I do realise that there is a lot empty XML tags that repeat themselves in the XML coming over and trying to get the web people to recude that, but until that is corrected I am stuck with what I have.
The code example is below
C callb (e) 'QzhbCgiParse'
C parm zhbCmd
C parm zhbFormat
C parm zhbBuffer
C parm zhbBufLen
C parm zhbRspLen
C parm QUSEC
D zhbCmd s 6
D zhbFormat s 8 inz('CGII0200')
D zhbBuffer s 99999
D zhbBufLen s 9b 0 inz(%len(zhbBuffer))
D zhbRspLen s 9b 0 inz(0)
Thanks, Rich Wahlgren
Integrated Merchandising Systems
Why don't you increase the field length to something larger and change those goofy "9b 0" fields to proper 10i 0 fields that they're supposed to be? (Sorry, using the "b" data-types some 20-years after they were displaced with "i" data-types is one of those things that piss me off).
It isn't an API issue, it supports 16mb parameters. It is the way it is coded in your example--the 99999 limit is your doing.
Replace the 99999 with the LEN(xxx) keyword where xxx is the length of the field. For example: LEN(250000)