SmartIcon code to display any open database's ReplicaID

This tip describes how to display any open database's ReplicaID for copying and pasting into formulas.

I wrote this smarticon code to display the open database's title, server name, then perform a lookup based on that info to the server's catalog.nsf database to find and display the ReplicaID enclosed in quotes provided the database is/has been "cataloged" otherwise it will simply error by default with "File Does Not Exist."

tmpserver := @Name([Abbreviate]; 
@Subset(@DbName; 1));
tmpDBREPLICAID := @DbLookup( "" : "
NoCache" ;tmpserver :"catalog.nsf";
"DatabasesBy Title";tmpKEY_DBTITLE ; 3 );
tmpReformatID :="""+tmpDBREPLICAID+""";
@Prompt([OKCANCELEDIT]; "Copy ReplicaID 
and paste where needed"; "Replica ID for "
+tmpKEY_DBTITLE+" is "; """+tmpDBREPLICAID+""")
This was first published in April 2003
This Content Component encountered an error



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...