查找

公告
· 九月 16, 2024

第2回 開発者コミュニティ・ミートアップ Python ワークショップの事前準備について

※ 本内容は随時更新予定です。ワークショップに必要な内容をご覧いただき、参加のご検討などしていただければ幸いです。

Pythonワークショップにご参加いただく場合は、事前に以下の環境をご用意ください。

  • IRIS 2024.1.1 for Windows Community Edition (※ これからダウンロードされる方は、バージョンが異なりますので下記コメントをご確認ください)
    • キットダウンロードはこちらの記事をご覧ください。
    • インストールオプションはデフォルト (インストールタイプ: 開発、初期セキュリティ設定: 最小)
  • Visual Studio Code (任意のバージョン) と ObjectScript用エクステンション
    • エクステンションのインストール方法はこちらの記事をご覧ください。
  • 以下のPythonライブラリを irispip (<IRISインストールディレクトリ\bin\irispip.exe) でインストール
    • flask, nicegui, sqlalchemy-iris,  scikit-learn,  numpy, pandas
8 Comments
讨论 (8)2
登录或注册以继续
问题
· 九月 16, 2024

What is the best way to do a silent install of an IRIS application?

We have an ObjectScript application that runs in Cache' and IRIS. Our typical installation involves a .zip file containing several files necessary for the installation and operation of the application. Steps are: expand the .zip file to a folder that will not be used by the application. Do ^%RI for the installation routines in the production namespace. Do the Installation routine. We have a customer that is trying to do a silent installation. He does not want to have to respond to any prompts on the installation. We do have a silent option for the Installation routine and that is working well. But he also does not want to have to respond to prompts for the Do ^%RI step. Currently we are doing set sc=$System.OBJ.Export(routineString,destinationPath.xml). And then we can do a set sc=$System.OBJ.Load(destinationPath.xml,"cuk",.errlog) in the installation script.

Is there a better way to do this?

3 Comments
讨论 (3)2
登录或注册以继续
文章
· 九月 15, 2024 阅读大约需 3 分钟

Comment trouver mon texte spécifique en ObjectScript

Vous connaissez probablement cette situation :
il y a quelque temps, vous avez trouvé une fonction $ZU très spéciale pour
un type de problème spécifique. Une sorte de formule mystique.
Elle est devenue populaire et a été utilisée par de nombreux programmeurs
dans tout votre code et toutes vos installations .

Plusieurs versions et updates plus tard, vous êtes informé par ISC que
votre $ZU mystique est déprécié et n'est plus supporté. Et on vous conseille
de le remplacer par un nouveau $something(). 

Alors, comment trouver et documenter l'utilisation de votre code mystère ?
Il pourrait se trouver dans les classes, dans le code MAC,  INT, INC.
Et il peut être distribué dans plusieurs namespaces.
Dans le passé, Studio n'était encore completé et peu adapté, mais lent et peu précis.

J'ai rencontré cette situation plus d'une fois dans différentes installations.
Source Control n'était pas disponible à l'époque
et n'a été que rarement utilisé lorsqu'il a été ajouté.

ObjectScript étant le seul choix possible pour relever ce défi, j'ai écrit mon propre outility.
Ma solution s'est développée au fil des ans et une fois que la migration vers IRIS a été planifiée,
j'ai vérifié une fois de plus à quel point elle était utile.
Et comme elle était écrite en ObjectScript pur, elle fonctionnait dans IRIS sans qu'aucun
caractère n'ait été modifié. Comme vous le savez peut-être, le problème de la recherche
d'un morceau de texte spécifique en ObjectScript n'a pas changé. 

Mon objectif personnel pour mon outility était

  • uniquement l'ObjectScript
  • pas de constructions fantaisistes, miraculeuses ou délicates
  • le moins possible de fonctions $advanced
  • préférer la lisibilité à l'élégance en faveur de la maintenance future
  • présenter le nombre d'occurrences comptées par espace de noms et par élément de code
  • pour les classes, diviser également 
    • parameter,
    • properties (si calculated)
    • methods
    • indices
  • une option pour montrer la ligne qui les contient
  • ne se soucient pas de la liste.
    • N'importe quel programme de terminal peut écrire un journal
    •  bash a son STDOUT à cet effet

Ce utility est donc disponible pour vous sur Open Exchange et GitHub
J'ai également créé une vidéo pour démontrer le péage en action.
Et il est également disponible sur Demo Server

Il vous suffit de démarrer depuis le terminal
user>DO ^rcc.find 

Et vous obtenez quelques questions

  •  quel est le texte que vous recherchez ?
  • verbose » ?
    • voulez-vous voir chaque ligne complète contenant votre texte ?
    • Attention, cela peut devenir une liste assez énorme
    • Un test récent a trouvé plus de 90000 résultats.
    • Avec verbose=1, on obtient plus de 90000 lignes.
  • Uniquement en majuscules ?
    • Cela résout le problème selon lequel une fonction peut être écrite
    • en majuscules, minuscules ou mixtes.
    • "Uppercase=1" garantit que vous ne manquez aucune occurrence
  • Quel type de code voulez-vous vérifier ? (CLS,MAC,INT,INC,ALL)
  • Quel namespace voulez-vous rechercher ?
    • Un namespace spécifique de votre liste ou ALL
    • pour ALL vous obtenez une liste condensée d'espaces de noms et de types
    • (non visible dans la vidéo)

La sélection de namespace lance la recherche.
Alors on danse !

USER>do ^rcc.find
----------------
 
enter search string [$ZU] <blank> to exit: RCC
          Verbose? (0,1) [0]:
          Force UpperCase? (1,0) [1]:
 
enter code type (CLS,MAC,INT,INC,ALL) [ALL]: CLS
 
select namespace (ALL,%SYS,DOCBOOK,ENSDEMO,ENSEMBLE,SAMPLES,USER) [USER]:
 
** Scan Namespace: USER **
 
** CLS **
** 2      User.ConLoad
** 15     User.Main
** 3      csp.form
** 3      csp.winner
** 2      dc.rcc.Contest
** 37     dc.rcc.Main
** 1      dc.rcc.Prize
** 63 CLS **
----------------

 

J'espère que vous avez apprécié mon histoire.
J'ai essayé d'éviter les séquences de code ennuyeuses. Il y a OpenExchange et Github pour cela.

Et s'il vous plaît, excusez mon français rouillé.
Je l'ai appris à l'école il y a 65 ans et il n'y était pas question de technologie
mais de Molière, Sartre, Queffélec, Anouilh, Ionesco, ... 

讨论 (0)1
登录或注册以继续
问题
· 九月 15, 2024

Have you tried the THROUGH command in IRIS 2024.2? How does it work?

Has anyone successfully tested the new THROUGH command in IRIS 2024.2 with a FOREIGN SERVER?https://docs.intersystems.com/iris20242/csp/docbook/Doc.View.cls?KEY=RSQ...

I have connected from a Docker instance to a VM. I was able to successfully set up the JDBC connection through the UI.

I then configured a foreign server with this connection:

But I am unable to send a SQL 'THROUGH' to the DB. I always get a:

I've get the same message if i try it via Management Portal.

I've also tried this:

and this

Always with the same error. According to the documentation, the syntax without ‘ and " should be correct.

Also a simple  

gives this error...

Any idea how this works?

Andreas

11 Comments
讨论 (11)2
登录或注册以继续
文章
· 九月 12, 2024 阅读大约需 2 分钟

Code Scanner - enhanced

During testing the added Multi-Namespace feature I met a challenge
that required intervention. This simple request created 1000 lines of output.

USER>do ^rcc.find
----------------
 
enter search string [$ZU] <blank> to exit:
          Verbose? (0,1) [0]:
          Force UpperCase? (1,0) [1]:
 
enter code type (CLS,MAC,INT,INC,ALL) [ALL]:
 
select namespace (ALL,%SYS,DOCBOOK,ENSDEMO,ENSEMBLE,SAMPLES,USER) [USER]: all
  • As for the verbose variant you my run a log on your terminal to keep the result in details
  • though a real summary was still missing.

So I decided to append a very condensed statistic to the summary line

;;; skipping ~1000 lines of output
** 0 INC in Namespace USER**
 
** 1206 ** ALL total in Namespace USER
 
** 90120 ** total in ALL Namespaces
sub("%SYS")=10975
sub("%SYS","CLS")=2631
sub("%SYS","INC")=1433
sub("%SYS","INT")=6911
sub("%SYS","MAC")=0
sub("DOCBOOK")=27
sub("DOCBOOK","CLS")=27
sub("DOCBOOK","INC")=0
sub("DOCBOOK","INT")=0
sub("DOCBOOK","MAC")=0
sub("ENSDEMO")=45924
sub("ENSDEMO","CLS")=172
sub("ENSDEMO","INC")=10
sub("ENSDEMO","INT")=45687
sub("ENSDEMO","MAC")=55
sub("ENSEMBLE")=31504
sub("ENSEMBLE","CLS")=172
sub("ENSEMBLE","INC")=10
sub("ENSEMBLE","INT")=31280
sub("ENSEMBLE","MAC")=42
sub("SAMPLES")=484
sub("SAMPLES","CLS")=475
sub("SAMPLES","INC")=0
sub("SAMPLES","INT")=6
sub("SAMPLES","MAC")=3
sub("USER")=1206
sub("USER","CLS")=11
sub("USER","INC")=0
sub("USER","INT")=1192
sub("USER","MAC")=3
----------------

This summary I attached to the end show how and where the
90000+ hits are distributed. 

It works with the ALL namespace selection also for single code types

enter search string [$ZU] <blank> to exit:
          Verbose? (0,1) [0]:
          Force UpperCase? (1,0) [1]:
 
enter code type (CLS,MAC,INT,INC,ALL) [ALL]: mac
 
select namespace (ALL,%SYS,DOCBOOK,ENSDEMO,ENSEMBLE,SAMPLES,USER) [USER]: all
 
** Scan Namespace: %SYS **
 
** MAC **
 
** 0 MAC in Namespace %SYS**
 
** Scan Namespace: DOCBOOK **
 
** MAC **
 
** 0 MAC in Namespace DOCBOOK**
 
** Scan Namespace: ENSDEMO **
 
** MAC **
** 1      Ens.BusinessMetric.G1
** 41     EnsMONLBL
** 13     build
 
** 55 MAC in Namespace ENSDEMO**
 
** Scan Namespace: ENSEMBLE **
 
** MAC **
** 1      Ens.BusinessMetric.G1
** 41     EnsMONLBL
 
** 42 MAC in Namespace ENSEMBLE**
 
** Scan Namespace: SAMPLES **
 
** MAC **
** 3      rcc.find
 
** 3 MAC in Namespace SAMPLES**
 
** Scan Namespace: USER **
 
** MAC **
** 3      rcc.find
 
** 3 MAC in Namespace USER**
 
** 103 ** total in ALL Namespaces
sub("%SYS","MAC")=0
sub("DOCBOOK","MAC")=0
sub("ENSDEMO","MAC")=55
sub("ENSEMBLE","MAC")=42
sub("SAMPLES","MAC")=3
sub("USER","MAC")=3
----------------

try on Demo Server

Demo Server SMP
Demo Server WebTerminal
 

讨论 (0)2
登录或注册以继续