新しい投稿

検索

記事
· 2024年12月22日 3m read

Get your code over ODBC/JDBC

I recently met an ages old issue related to code maintenance:

  • You have access to your IRIS server just over ODBC/JDBC
  • no VSCode access, no Studio access
  • no (Web-)Terminal access

But you need to take a look on Classes or Routines or Globals !!
Anyhow SQL is your friend.

  • First you need a simple table as temporary text store.
CREATE GLOBAL TEMPORARY TABLE  arcc.txt (line VARCHAR(32000))

Not a thrilling action.

  • Next you export your code to local file and import it to your table
CREATE PROCEDURE arcc.show (IN code VARCHAR()) 
  RETURNS INTEGER
  LANGUAGE OBJECTSCRIPT 
 {
	set file="code.tmp"
	do $system.OBJ.ExportUDL($g(code),file) 
	open file:"R":0 else  quit 0
	kill ^||arcc.txtD 
	use file
	try { 
		for i=1:1 read line set ^||arcc.txtD($i(^||arcc.txtD))=$lb(line) 
	} 
	catch (e) { 
	   close file:"D"
	}
	quit 1
}

How to use it:

select * from arcc.txt where 1=arcc.show('arcc.txt.cls')

And you get:

Class arcc.txt Extends %Persistent [ ClassType = persistent, DdlAllowed, Final, Owner = {_PUBLIC}, ProcedureBlock, SqlRowIdPrivate, SqlTableName = txt ]
{
Property line As %Library.String(MAXLEN = 32000) [ SqlColumnNumber = 2 ];
Parameter SQLTABLETYPE = "GLOBAL TEMPORARY";
Storage Default
{
<Data name="txtDefaultData">
<Value name="1">
<Value>line</Value>
</Value>
</Data>
<DataLocation>^||arcc.txtD</DataLocation>
<DefaultData>txtDefaultData</DefaultData>
<IdLocation>^||arcc.txtD</IdLocation>
<IndexLocation>^||arcc.txt</IndexLocation>
<StreamLocation>^||arcc.txt</StreamLocation>
<Type>%Storage.Persistent</Type>
}
}
 
  • Or traditional if you prefer XML output over UDL use 
  • $system.OBJ.Export() as export method.
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="IRIS" version="26" zv="IRIS for Windows (x86-64) 2024.2.0L (Build 213U)" ts="2024-12-22 20:40:09">
<Class name="arcc.txt">
<Description>
</Description>
<Final>1</Final>
<ClassType>persistent</ClassType>
<DdlAllowed>1</DdlAllowed>
<Owner>_PUBLIC</Owner>
<ProcedureBlock>1</ProcedureBlock>
<SqlRowIdPrivate>1</SqlRowIdPrivate>
<SqlTableName>txt</SqlTableName>
<Super>%Persistent</Super>
<TimeChanged>67196,63061.387736</TimeChanged>
<TimeCreated>67196,63061.3543687</TimeCreated>
 
<Property name="line">
<Type>%Library.String</Type>
<Collection/>
<Required>0</Required>
<SqlColumnNumber>2</SqlColumnNumber>
<Parameter name="MAXLEN" value="32000"/>
</Property>
 
<Parameter name="SQLTABLETYPE">
<Default>GLOBAL TEMPORARY</Default>
</Parameter>
 
<Storage name="Default">
<Type>%Storage.Persistent</Type>
<DataLocation>^||arcc.txtD</DataLocation>
<DefaultData>txtDefaultData</DefaultData>
<IdLocation>^||arcc.txtD</IdLocation>
<IndexLocation>^||arcc.txt</IndexLocation>
<StreamLocation>^||arcc.txt</StreamLocation>
<Data name="txtDefaultData">
<Structure>listnode</Structure>
<Subscript/>
<Value name="1">
<Value>line</Value>
</Value>
</Data>
</Storage>
</Class>
</Export>

XML might be useful for Global Exports if required

select * from arcc.txt where 1=arcc.showxml('%ZPM.Client.ServerDefD.GBL')
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="IRIS" version="26" zv="IRIS for Windows (x86-64) 2024.2.0L (Build 213U)" ts="2024-12-22 20:50:01">
<Global>
<Node><Sub>^%ZPM.Client.ServerDefD</Sub>
<Data>1</Data>
<Node><Sub>1</Sub>
<DataBase64>NQF+JVpQTS5QYWNrYWdlTWFuYWdlci5DbGllbnQuUmVtb3RlU2VydmVyRGVmaW5pdGlvbn4KAXJl
Z2lzdHJ5AQEBAQMEAQEnAWh0dHBzOi8vcG0uY29tbXVuaXR5LmludGVyc3lzdGVtcy5jb20DBAED
BAECBA==
</DataBase64>
<Node><Sub>RemoteServerDefinition</Sub>
<DataBase64>AQIBAgEnAWh0dHBzOi8vcG0uY29tbXVuaXR5LmludGVyc3lzdGVtcy5jb20CAQIB
</DataBase64>
</Node>
</Node>
</Node>
</Global>
</Export>

And all this is just running over ODBC/JDBC

7 Comments
ディスカッション (7)2
続けるにはログインするか新規登録を行ってください
記事
· 2024年12月22日 1m read

Como mostrar suas Credly Badges

Ei Comunidade!

Nós sabemos que você adora exibir suas conquistas! Para tornar isso ainda mais fácil para você, nós implementamos o intercâmbio de dados com  Credly: todas os emblemas e certificações da InterSystems e Comunidade de Desenvolvimento que você tem no Credly ficarão visíveis no seu perfil CD após seus apps do Open Exchange e antes dos seus emblemas do Global Masters.

 

Tem uma página inteira no seu perfil dedicada às suas conquistas. Apenas clique na figura do seu perfil e escolha Certificações oficiais e emblemas Credly:

Ali, ,você terá todos os seus emblemas InterSystems Credly, incluindo, mas não limitados a:

  • seu ranking no Global Masters,
  • seus status de moderador na Comunidade,
  • treinamentos completos na plataforma Learning,
  • etc.

Esses emblemas são carregados automaticamente, mas caso você não encontre algum, clique em carregar minhas certificações & emblemas e siga as dicas.

Divirta-se!

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2024年12月21日

Obtener Studio

Saludos Comunidad,

Soy consciente que mis preguntas son irrelevantes en una Comunidad de especialistas en últimas tecnologías.

Estoy jubilado hace tiempo, ya tengo unos años a la espalda, pero sigo utilizando mis antiguos conocimientos para mantener la mente funcionando y hacer mis personales “programillas”, en argot antiguo, y mantener mis bases de datos antiguas.

Sé que inevitablemente he de pasar a IRIS, ya que mi versión 5.2 de Cache caduca en 2030, por ello me he puesto manos a la obra, NO tengo ganas de pasar mis antiguos programas a la nueva tecnología. He conseguido que funcionen en IRIS 2024.3, con algunas limitaciones técnicas de mis herramientas.

Hay una en particular que me supone un gran engorro que es la desaparición de Studio de esta versión. Soy consciente la sustituta VS Code.

No puedo acceder a WRC, para descargar Studio, en la descarga de la versión de la Comunidad no puedes acceder a versiones antiguas (por ejemplo, IRIS 2024.1), que si tendría Studio.

Agradecería el acceso a esta versión o anterior.

Gracias

1 Comment
ディスカッション (1)2
続けるにはログインするか新規登録を行ってください
記事
· 2024年12月21日 1m read

Obtenez une certification en technologie InterSystems

certification badge

Grâce aux examens de certification InterSystems conformes aux normes du secteur, vous et votre équipe pouvez obtenir une certification pour valider vos compétences et démontrer votre expertise dans la technologie InterSystems. Trouvez l'examen adapté à votre poste !

Les entreprises comptant quatre employés certifiés ou plus peuvent obtenir une certification organisationnelle !

Contactez-nous à l'adresse certification@intersystems.com ou visitez le site Web de certification InterSystems pour plus d'informations.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
記事
· 2024年12月20日 2m read

第五十四章 File 输入 输出 - OPEN 参数关键字

第五十四章 File 输入 输出 - OPEN 参数关键字

OPEN 参数关键字

下表描述了顺序文件的 OPEN 命令参数关键字:

顺序文件的 OPEN关键字参数

/PARAMS=str /PAR=str

No defaul

对应于 parameters 位置参数。(它提供了一种以与位置无关的方式指定参数字母代码字符串的方法)。

/RECORDSIZE=int /REC=int

无默认值

对应于 reclen 位置参数,该参数为固定长度记录建立记录大小。(目前仅针对 READ 操作实现。

/TERMINATOR=str /TER=str

无默认值

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください