If you have access to Caché database you can create custom query that accepts date as an argument and based on that returns specific table. It can be used via ODBC like this:

SELECT * FROM Package.Class.MyQuery(DATE)

or

Call Package.Class.MyQuery(DATE)

Here's a sample query that returns Ids from a table or a class and has an argument - class name (or table name):

Class Utils.CustomQuery2
{

/// Return ids from a table or a class
Query GetTable(Table) As %Query(CONTAINID = 1, ROWSPEC = "Id:%String") [ SqlProc ]
{
}

ClassMethod GetTableExecute(ByRef qHandle As %Binary, Table) As %Status
{
    #Dim Status As %Status = $$$OK

    If ##class(%Dictionary.ClassDefinition).%ExistsId(Table) {
        // Got a class, we need to calculate a table name and quote it
        #define ClassSQLTable(%c)    ($$$comClassKeyGet(%c,$$$cCLASSsqlschemaname)_"."_$$$comClassKeyGet(%c,$$$cCLASSsqltablename))
        Set Table = ##class(%CSP.UI.Portal.SQL.Home).Quoter2($$$ClassSQLTable(Table))
    }
    

    Set qHandle = ##class(%SQL.Statement).%ExecDirect(,"SELECT ID FROM " _ Table)
    If qHandle.%SQLCODE'=0 {
        Set Status = $$$ERROR($$$SQLError, qHandle.%SQLCODE, qHandle.%Message)
    }
    Quit Status
}

ClassMethod GetTableFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status
{
    If qHandle.%Next() {
        // Same as in ROWSPEC
        Set Row = $Lb(qHandle.ID)
    } Else {
        /// No more data
        Set AtEnd = 1
        Set Row = ""
    }
    Quit $$$OK
}

ClassMethod GetTableClose(ByRef qHandle As %Binary) As %Status
{
    Kill qHandle
    Quit $$$OK
}

}

Call samples from ODBC:

SELECT * FROM Utils.CustomQuery2_GetTable('Cube.Cube.Fact')
Call Utils.CustomQuery2_GetTable('Cube_Cube.Fact')

Code on GitHub.

You can use %Dictionary package to do that. Here's a method that sets selectivity of a specified class/property (assuming Default storage) to an arbitrary value:

/// w $system.Status.DisplayError(##class(User.Selectivity).ModifySelectuvity())
ClassMethod ModifySelectuvity(class As %Dictionary.CacheClassname = {$classname()}, property As %String = "field1", selectivity As %Integer(MINVAL=0,MAXVAL=100) = {$random(101)}) As %Status
{
    #dim sc As %Status = $$$OK
    set id = $lts($lb(class, "Default", property), "||")
    set strategy = ##class(%Dictionary.StoragePropertyDefinition).%OpenId(id)
    set strategy.Selectivity = selectivity _ ".0000%"
    set sc = strategy.%Save()
    quit:$$$ISERR(sc) sc
    
    set sc = $system.OBJ.Compile(class)
    quit sc
}

Do you sign \r\n on Solaris? In your previous post you wrote that you need to sign:

{Date}{newline}{Password}{newline}{etc}{Message Body}

Maybe {newline} can only be \r\n?

 

Also, compare (using hex compare tool) {Message Body} you sign and {Message Body} you actually send. It seems like in your case they should be identical (that is not always the case).

It depends on the signing method.  I'd try to sign a stream without new lines at all.

Do you know if openssl uses the line-end to know up the where to sign and does it line by line, or does it include the line endings in the value that should be signed?

openssl signs incoming byte stream, not a character stream, so there's no distinction.