Yes, I am familiar with this type of <PROTECT> and I'm sure I need read access for a system database. More narrowly, I think there might be 1 or a few queries that are run by the production configuration page that require that access, so perhaps full read access might not even be necessary. I was really only setting up this user to test for Carl, as I personally rely on the standard roles that don't have these problems.

Yes, probably WRC would be the next step.

I tested on HealthShare Health Connect so I did not have the MPRL resources, but I tried making a user with R/W database permissions and just the resources you listed and was able to navigate from the SMP home page to the production page. I did get a <PROTECT> error so there's probably something still missing, but I got further than you seem to be able to.

Hey Jeff,

I wrote up a quick sample that doesn't get quite what you wanted, but I think it's close enough that you'll be able to take it from there. If not, feel free to ask further.

My sample reverses the first FT1grps and leaves the last one in the final slot.

First I used * to get the count: Counting Fields

If you wanted to implement some more complex logic you could potentially do it here. Alternatively, you might want to write a custom utility function to perform the chunking and reversal. This keeps your code more compartmentalized and keeps too much from sitting in the DTL itself.

Defining Custom Utility Functions

Hi Yone,

I just wanted to mention that zf(-1) is deprecated in modern versions in lieu of zf(-100).

Also, you might find the %Library.File methods/queries useful.

This other developer community post about purging backups contains some sample code for working with files, as well as a link to the relevant class reference:

https://community.intersystems.com/post/looking-good-routineclass-purging-cach%C3%A9-backups

Hi Oliver,

Is your intent to have multiple productions in containers trying to pull the same types of files from the same directory to split the load? It sounds like you're not able to pull from different file paths, but would setting different FileSpecs be an option?

Perhaps setting different WorkPaths would be helpful, so that the file service(s) will move the file to another directory while processing.

Another possibility would be to have one production with a file service with a pool size >1 that routes to the various other productions.

Glad you were able to figure this out.  As an additional note, the syntax Kevin suggested is a bit unusual as it is concatenating parenthetical sections. It shouldn't be necessary to do that - when you try to concatenate "(1)" you are just concatenating "1".

The following both work identically:

msg.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(*)")
msg.GetValueAt("PIDgrpgrp("_(1)_").ORCgrp("_(1)_").OBXgrp("_("*")_")")

Hi Scott,

When I try and save a rule set with improper syntax it ends up saving but not compiling, which also removes the existing int code. The problem is "caught" in that a warning is shown, though it doesn't prevent you from proceeding. My guess at the rationale would be to not blow away any incomplete work - it would be a bit of an odd restriction if you could only save a rule set if the code was valid. When the compile fails the existing compiled code is removed, so the rule set is unusable.

Hi Scott,

Can you reproduce the compilation error not getting caught on save? When I try to save with a syntax error the rule set still saves, it does throw compilation errors however. Can you describe in more detail where the misplaced { was?

Re: your second question I'm not certain, but if the class failed to compile I'm not sure what kind of behavior we would expect from trying to use the rule set. Perhaps this is related to the particular state your environment was in.