When you installed Cache, what type of security did you specify?

Minimal

Normal

Locked Down

The following will count the number of data nodes under a given ^Location(country)

USER>S G1=$NA(^Locations("Canada"))
 USER>S G=$E(G1,1,$L(G1)-1)
USER>W G
^Locations("Canada"
USER>W G1
^Locations("Canada")
USER>F  S G1=$Q(@G1) Q:G1=""!($E(G1,1,$L(G))'=G)  S CT=$I(CT)
USER>W CT
2

Hi-

Heres something I did on a Windows system at one point to purge files in a directory that were older than a given time frame

ClassMethod PurgeFiles(Path As %String, OlderThan As %Integer)
{
    set Date=$zd($h-OlderThan)
    set cmd="forfiles /P "_Path_" /D -"_Date_" /C ""cmd /c del @path"""
    set sc=$zf(-1,cmd)
}

I'm pretty sure there is also ways to do this using something in %File or one of those classes also. I will poke around for an example there as well, but this should get you started.

Jen

is it possible that "par1" and "par2" don't contain the values you think they do.  I would start there and confirm that par1 = "2019" and par2 = "0912"

Jenna

Hi Thomas

Can I clarify your question, what you are really looking to do is each day start a process that will delete files in a given directory that are older than some period of time?

If so I may be able to help there.

Jenna

Hi Jimmy

The short answer is that the EnsLib.File.PassthroughOperation is a special operation that can take a stream and write it out to a file.  The operation expects you to pass in an instance of Ens.StreamContainer and you need to populate the Stream property which is what the PassthroughOperation is looking for.

An example might be:

set sc=##class(Ens.StreamContainer).%New()

set stream = ##class(%Stream.GlobalCharacter).%New()

do stream.Write("This is my text to go into the file")

set sc.Stream=stream

Once you have done this, you can send sc as the input to your operation using ..SendRequestAsync or ..SendRequestSync, or from a BP if that is where the message is coming from

My question is given your request message you created, what are you hoping the output in the file will look like?

Thanks

Jenna