Hi Yone.

Notice -- 4th argument is status code of conversion:

ENSDEMO>set fecha = "2021-08-18T07:44:14.180+0000"

ENSDEMO>set nuevaFecha = ##class(Ens.Util.Time).ConvertDateTime(fecha,"%Y-%m-%d%T%H:%M:%S","%d/%m/%Y",,.status)

ENSDEMO>zw status
status="0 "_$lb($lb("<Ens>ErrGeneral","Extra text 'T07' not parsed before end marker ':'",,,,,,,,$lb(,"ENSDEMO",$lb("e^zParseDateTime+102^Ens.Util.Time.1^2","e^zConvertDateTime+3^Ens.Util.Time.1^1","e^^^0"))))

Adjust format and you'll get expected value:

ENSDEMO>set nuevaFecha = ##class(Ens.Util.Time).ConvertDateTime(fecha,"%Y-%m-%dT%H:%M:%S.%N%z","%d/%m/%Y",,.sc)

ENSDEMO>write nuevaFecha
18/08/2021

You can redirect results to the file. If you specify csv format then data is TAB-delimited.

SAMPLES>>set displaymode=csv

displaymode = csv
SAMPLES>>set displaypath=c:\temp\

displaypath = C:\temp\
SAMPLES>>set displayfile=results.txt

displayfile = results.txt
SAMPLES>>select * from Sample.Person
4.      select * from Sample.Person


C:\temp\results.txt.csv
C:\temp\results.txtMessages.txt

Hi Lucas.

I'm confused in the URL on the screenshot you are correctly using IRISUsername [0]

Why in the "sudo google-chrome-stable ..." command you are using just "Username" parameter? Did you redefine GetCredentials to take username from URL parameter "Username" ?

[0] https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GC...

This works both way.

Consider class:

Class dc.TestArgs
{

ClassMethod AcceptArgs(x...)
{
    write "Got following params",!
    zw x
}

ClassMethod NormalMethod(a As %String, b As %String, c As %String)
{
    write "we got in a: ",a,!
    write "we got in b: ",b,!
    write "we got in c: ",c,!
}

ClassMethod SendArgs()
{
    set p = 3
    set p(1) = "first parameter"
    set p(2) = "second"
    set p(3) = "third"
    do ..AcceptArgs(p...)

    write "works with usual argument style",!
    do ..NormalMethod(p...)
}

}

Notice in SendArgs we are constructing p -- array of arguments. We can pass it both to method that accepts args..., and to normal method.

USER>d ##class(dc.TestArgs).AcceptArgs(1,2,3)
Got following params
x=3
x(1)=1
x(2)=2
x(3)=3

USER>d ##class(dc.TestArgs).SendArgs()
Got following params
x=3
x(1)="first parameter"
x(2)="second"
x(3)="third"
works with usual argument stylewe got in a: first parameter
we got in b: second
we got in c: third

Hi Mark.

I don't know where "undefined" word comes from on the trace, but when %XML.Reader reads empty element it reads it as character with code 0 -- $char(0), that corresponds to empty string in SQL:

Class Community.Test Extends (%RegisteredObject, %XML.Adaptor)
{

Property StatusLastChecked As %String(XMLPROJECTION = "element");

ClassMethod test()
{
        set xml = "<root><Test><StatusLastChecked></StatusLastChecked></Test></root>"
        set reader = ##class(%XML.Reader).%New()
        do reader.OpenString(xml)
        do reader.Correlate("Test","Community.Test")
        do reader.Next(.obj)
        zw obj
}

}

USER>do ##class(Community.Test).test()
obj=3@Community.Test  ; <OREF>
+----------------- general information ---------------
|      oref value: 3
|      class name: Community.Test
| reference count: 2
+----------------- attribute values ------------------
|  StatusLastChecked = $c(0)
+-----------------------------------------------------

So in your code you can compare with $C(0).

Also for details on handling empty strings, see following section in documentation:

Handling Empty Strings and Null Values

Hi David.

Source code for EnsLib.FTP.InboundAdapter is available in the installation.

EnsLib.FTP.InboundAdapter calls method %Net.FtpSession:List to get files. And that method uses "LIST" command.

EnsLib.FTP.InboundAdapter:OnTask executes following resultSet to get files:

Set tSC=..%CurrResultSet.Execute($this,..FilePath,..FileSpec,..SubdirectoryLevels,$S(..%isSFTP:"FileListSSH",1:"FileList"),..SemaphoreSpec)  Quit:$$$ISERR(tSC)

And in OnInit, ..%CurrResultSet is initialized as follows:

Set ..%CurrResultSet=##class(%ResultSet).%New($$$CurrentClass_":DeepList")

Query DeepList is defined in EnsLib.File.Common, and it's just a proxy for the query that is passed as 5th parameter to the Execute -- FileList in this case.

And EnsLib.FTP.Common:FileList calls %Net.FtpSession:List.

What Caché version do you have?

On my 2018.1.3 instance code is following:

// Look for pattern : version "1.8.0.1
// where the double quote may optionally be replaced with a single quote or ommitted
Set regex = "version\s['""]?(\d+(\.\d+)+)"
Set pos = $Locate(pOutput,regex,1,,versionWithPrefix)

// Get just the number from the previous pattern : 1.8.0.1
Set regex = "(\d+(\.\d+)+)"
Set pos = $Locate($Get(versionWithPrefix),regex,1,,version)

Notice -- $Get around versionWithPrefix.

Most likely Caché cannot find java home dir. Specify Java Home Directory in JDBC Gateway Server settings.