through the java code
public static void main(String[] args) throws IOException, CASException, KeyManagementException, NoSuchAlgorithmException {
//-----------------------
CASClientInterface client = new CASClient("**.**.**.**", 5570, "****", "****"); // 1
String path = "CASUSER.HEART";
String table = "HEART";
String vars = "Status,sex,AgeAtDeath,Weight_Status,Smoking_Status";
//обращаемся к таблице
if (path != null){
LoadTableOptions lto = new LoadTableOptions();
lto.setPath(path);
client.invoke(lto);
}
//создаем настройки выборки
FetchOptions opt = new FetchOptions();
Castable tble = new Castable();
tble.setName(table);
String[] vrs = getStringArrayProperty(vars);
if(vrs != null){
tble.setParameter(Castable.KEY_VARS, vrs);
}
opt.setTable(tble);
opt.setSasTypes(false);
//выбираем данные
CASActionResults<CASValue> results = client.invoke(opt);
//выводим результат
if (results.getResultsCount() > 0){
dumpByRow((CASTable) results.getResult(0).getValue());
}
}
... View more