I have been trying to find the right place where I can increase the -TOK -INP parameter. Meanwhile, just giving some more information to know if I am missing out on some other important concept.
The query string, which I have given in this post is passed to a program file, which is on the server side. Call happens like below.
Is there any other way possible in the code, to get the huge query accommodated, instead of increasing the client session parameters ?
RUN order_fill.p ON SERVER aServer TRANSACTION DISTINCT
(INPUT Querystring,
INPUT iRecordLimit,
OUTPUT TABLE temp_order,
OUTPUT fiNum,
OUTPUT lMoreRecords) NO-ERROR.
In order_fill.p we have query-prepare and query-open
CREATE QUERY hQry. /* create query */
hQry:set-buffers(hTablBuffer). /* Sets the buffer to use for the query */
/* Open the query */
hQry:query-prepare(querystring).
hQry:query-open().
/* Get the first record */
hQry:get-first().
/* Like a for each block */
query1:
repeat while hTablBuffer:available:
/* Edit the Record Count Limit if set by user. */
iRecordCount = iRecordCount + 1.
if iRecordLimit ne 0 and iRecordCount > iRecordLimit then do:
lMoreRecords = TRUE.
leave query1.
end. /* iRecordLimit check */
create tt_ord.
hTTOrd = BUFFER tt_ord:HANDLE.
httOrd:buffer-copy(hTablBuffer).