Hi Pravin,

afaik this is not possible.

I would suggest revisiting the design. If you need custom code to be able to extend your production, then include code hooks that will be called if implemented.

e.g.

In your production class include code during processing that checks for classes inheriting froma specific abstract class you also defined and call the respective method. Now any customisation can be done by inheriting from the abstract class and overwriting the respective methods.

couple of options:

1. $order the global checking the list content as others have already mentioned

2. if there is a SQLIndex defined for the field. You can check the index location directly via objectscript, this would save you ordering through possibly billions of lines of data
3. define the SQL column to for Reference to use columnar storage, also single global retrieve to get a $list of rowids.

ahh now your question is getting a bit clearer.

If you look for a better management for your API endpoints might be worth looking into ISC API manager: InterSystems API Manager | InterSystems Components and Tools

Else you can use delegated auth to validate incoming IP addresses, also you can make use of Apache's virtual server config to server different content on different ports using Apache access controls for additional filtering and redirecting, which is essentially what you suggest here. 

Just a bit of thought, from your post i think 57772 is the port of the private webserver previously packaged with IRIS?

If so. don't use it for production workloads, its not configured or designed for that purpose, also due to security concerns the private web server has been deprecated and is no longer included in newer IRIS versions. (ref: Discontinue Apache web server installations (aka Private Web Server (PWS)) (intersystems.com) )

Hope i understood your problem correctly.

This sort of sounds like a "DataMigration" task, loading legacy information into the current IRIS database.

If you know an exact date where the value was available in the current messages, a onetime load based on an extract for legacy messages would be enough i think.

Then amend the messaging code to add the field if its not there, based on the lookup table, this should only happen for legacy messages, not new messages as they would already have the field.

 

Most annoying "feature" when i started to learn objectscript was the very strict left to right processing

e.g. if a>0 & b< 0 {} get evaluated as (((a>0) & b) <0) not as you would expect (a>0) & ( b<0)

also very strange variable casting from number to string.

e.g
set a=1
set b="7 dwarves"

w a+b

actually return 8 instead of e.g. concatted string "17 dwarves"  or a variable casting error as in other languages 
But meanwhile i love it :D

Just wondering my initial thought was that just use the master process to initiate the transaction check the returned stati and rollback if it has failed. 

This can be done with WQM easily enough.

  Set queue=$system.WorkMgr.%New()
  If (queue="") { 
  // Report Error, can check %objlasterror for %Status code
  }
  
  TSTART
  For i=1:1:100 {
  	Set sc=queue.Queue("##class(MyClass).ClassMethod",i) 
  	If $$$ISERR(sc) {
  	// report error
  	}
  }
  
  Set sc=queue.Sync() 
  If $$$ISERR(sc) {
    // A worker encounteres an issue
    TROLLBACK
  } and {
    // no errros reported by workers
    TCOMMIT  
  }


That should work just fine, i haven't tested it though.

Hi Anna,

this would iterate through a file line by line checking if the line contains a keyword and then outputting the line. also it will continue outputting until another condition resets the found variable to 0.

    Set stream=##class(%FileCharacterStream).%New()
    Set stream.Filename="c:\myfile.txt"
    set keyword="MyTestWord"
    set found=0
    While 'stream.AtEnd {
        Set line=stream.ReadLine()
        if (line [ keyword) {
            // the line contains the keyword out put line
            w !,line
            set found=1
            continue
        }
        if (found=1) {
            // keyword was previously found so continue outputting line
            w !,line
        }
    }