User bio
404 bio not found
Member since Mar 22, 2023
Posts:
Replies:
Hi Preedhi,
You could use $ListUpdate to update your list in the for loop as follows.
set mylist = $ListBuild()
for i = 1:1:5 {
set item = "item"_i
set mylist = $ListUpdate(mylist,i,item)
}
zw mylist
This returns
USER>zw mylist
mylist=$lb("item1","item2","item3","item4","item5")
Additionally, non SQL, there is a built in function for this of
if ##class(Security.Users).Exists("John") {
// user exists
}
which confirms if the IRIS user exists using the users username (here, assuming username of John). Documentation on the Security.Users docs page.
Certifications & Credly badges:

Global Masters badges:




Followers:
Following:
Hannah has not followed anybody yet.
I have previously investigated a similar question, which came up when I was passing Content-Length in code headers but was seeing broker responses sometimes of Transfer-Encoding:chunked.
At an abstracted level, IRIS sits on the left with the code -> CSP gateway sits in the middle -> web service sits on the right.
Generally,
Web service will get and deal with headers as:
- If Content-Length is passed it will be used, and Transfer-Encoding will NOT be set
set %response.Headers("Content-Length") = %request.Get("FileSize",1)
- If there is no Content-Length, Transfer-Encoding will be determined and used
The CSP Gateway has settings which specify when to use Content-Length or Transfer-Encoding.
These can be changed to your specification.
For example, the Content-Length can be set to be always used, and never Transfer-Encoding.
In (my) CSP Gateway settings:
- Content-Length will be used if less than 0.005 GB
- If more, then Transfer-Encoding will be used
This can cause the broker response to sometimes have Content-Length and sometimes have Transfer-Encoding:chunked based on file size.
Another layer of complexity,
There is built in logic in the CSP Gateway for:
- Before Transfer-Encoding, recognize large files and gzip them to compress.
This throws away previous headers and replaces them. This means that even if Content-Length is set in the headers or as default in the CSP Gateway, if the file is large enough it will be gzipped and Transfer-Encoding will occur anyways.
To avoid Transfer-Encoding, solution is to force no gzipping in the CSP Gateway.
set %response.GzipOutput = 0 // Tell CSP gateway not to modify output, allows Content-Length header