what I understand from your description:

  • you have an input file with records (rows) with delimited fields (columns)
  • you expect to see this file as a table (like in Excel)
  • you expect to sort your rows by various columns
  • you expect to include/exclude rows by various criteria

This is all standard  SQL and fully included IRIS  (MUMPS was almost stone-age) 
The only question left is your input format as Excel has a proprietary format,
but reads many others as well (CSV, HTML, XML, ..??)
 

suggestion

ClassMethod Login(ByRef streamReturn As %GlobalBinaryStream, user As %String, pass As %String) As %Status [ ProcedureBlock = 1 ]
{
 set streamReturn=##class(%GlobalBinaryStream).%New()
 set cswReturn={}
 set cswReturn.success=1
 ;
 set format=##class(%JSON.Formatter).%New()
 set format.Indent=0
 set format.LineTerminator=""
 set sc=format.FormatToStreamFromObject(cswReturn,.streamReturn)  
 quit sc
}

I have to add a few personal remarks.

This issue of the monthly reviews is exceptional as there is no package rated below 5*
In that sense, you may feel it be a Christmas edition.  And that's true for me.
It points out that the quality of contributions has significantly improved.
And as I try every package myself  I find problems and sometimes solutions too,
that I post as Pull Request on GitHub.
Pls understand, if I place Pull Request it is meant as help, suggestion but never as critics.

Some of you have already consumed this support as a kind of field testing.
And I offer it again to you to improve the quality of your package also before publishing.
My resources at home are of course limited and connections to external systems are not available.
I don't have medical devices or a machine park at home.

In addition, I'd like to thank you for your trust and your examples.
And over time I learned a lot about Docker configurations and various tricks to run them.
And there are areas where I just have no expertise. I skip these subjects.

Finally.
You are an exceptional society and I enjoy again and again to work with you

this is the method description  it seems that you should your call parameters differently

method ExecuteProcedure(ByRef pResultSnapshots As %ListOfObjects,
        Output pOutputParms As %ListOfDataTypes,
        pQueryStatement As %String,
        pIO As %String,
        pInputParms...)
 as %Status [ Language = objectscript ]

The pOutputParms list returns the output values of all scalar output and input/output parameters.
This would result in this order

SET tSC = ..Adapter.ExecuteProcedure( , .outparmSQLQuery2 , "io*"pRequest.StringValue )

>> 1st par  - skipped
>> 2nd par = output byRef
>> 3rd par = SqlQuery
>> 4th par = io
>>par 5 ... query input parameters
 

This explains the log

as official documentation tells you:
https://docs.intersystems.com/iris20211/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_langelements#GSQL_langelements_ops_precedence

 
USER>SET status=$SYSTEM.SQL.Util.SetOption("ANSIPrecedence",1,.oldval)
 
USER>do $system.SQL.Shell()
SQL Command Line Shell
---------------------------------------------------

[SQL]USER>>SELECT 1+2*3+4*5
1.      SELECT 1+2*3+4*5
Expression_1
27
^^^^-----------------------------------------------
[SQL]USER>>q
 
USER>SET status=$SYSTEM.SQL.Util.SetOption("ANSIPrecedence",0,.oldval)
 
USER>do $system.SQL.Shell()
SQL Command Line Shell
---------------------------------------------------
 
[SQL]USER>>SELECT 1+2*3+4*5
3.      SELECT 1+2*3+4*5
 
Expression_1
65 
^^^^----------------------------------------------
[SQL]USER>>

.

Even the possibility of changing this elementary rule after 60+years
has the power and the risk of breaking millions of lines of code worldwide.
It's for people like you that are not willing to accept these rules that
the introduction of Embedded Python is encouraged. 

With the same mindset,
you may demand to revert from Italian, French Spanish, Portuguese
to pure Latin as spoken by Cesar. Or for French to Occitan ?

Just another strong argument for embedded Python
Or calling Py over $ZF() or CPIPE  for older versions

The code to convert XML to JSON is quite simple, just two lines.
The xmltodict. parse() method will convert the XML to a python object
that can then be converted to JSON.

How to convert XML to JSON in Python – Step by Step guide
(found by Google)