Question
· Nov 16, 2019

%RCHANGE - Cannot save routine.

I am getting this with %RCHANGE:

RPMS 28d1>D ^%RCHANGE

This routine changes all occurrences of a string in
routines/include files.

1. Change every: Cache to: IRIS
2. Change every:

Routine(s): %*
Routine(s):  

Then I get these types of messages: 

This routine is mapped to another database, are you sure you want to change it??
 No => yes%DIRFULL.INT

%BENCHLANG.INT

This routine is mapped to another database, are you sure you want to change it??
 No => yes%BENCHLANG %BENCHLANG ; Benchmark for IRIS ObjectScript
        ;+9     ; A benchmark to measure relative performance of IRIS ObjectScript
        ;+15    ; stored in a IRIS database, and then exported to a CSV file. This rou
        tine
 - Cannot save routine.

Discussion (5)0
Log in or sign up to continue

Are you sure you want to change system routine?

Is there any particular reason why you want to replace Cache for IRIS in code?

Anyway, is IRISLIB database writable?

Here's how you can make database writable.

  • Open System Management Portal
  • Go To: Menu (upper right corner) -> Databases
  • Choose database you want to modify
  • Set/remove ReadOnly flag
  • Saave

It's really not recommended for IRISLIB.

I am not 'sure' if I want to change system routines. IRISLIB is read only. Probably not change Cache occurrences in IRISLIB. I've made no effort yet to see where these routines actually reside and %RCHANGE doesn't tell me where. RPMS traditionally uses Cache and Ensemble which are no longer sold. Intersystems IRIS Adoption Guide seems to indicate that all Cache references be replaced by IRIS.  I use D ^%CD to use RPMS namespace before %RCHANGE. I do not know if that restricts %RCHANGE to that namespace.  I suspect from the messages I am getting that %RCHANGE tries to change all occurrences. 

Hi

I certainly concur that you do not want to go changing names in any InterSystems Library or System Classes. To be quite honest in my experience export the classes or project that contain all of the classes you want to manipulate and then open that XML export file in NotePad ++ .

Bear in mind that classnames, property names, method names, and storage definitions will all be modified and you should be certain that that is acceptable and desirable otherwise you will need to go through the painful task of working your way through the XML file instance by instance and confirm each replace.

Also bear in mind that if your Class Export references other IRIS classes other than your own application classes then you need to be careful that you don't change an IRIS classname/property name etc... as you may well find that your system no longer works.

Having done the search and replace I suggest that you create a blank database/namespace and import the modified xml file and check any error messages thrown up  by the import process before attempting to import into your proper DEV/UAT database/namespace(s)

Nigel