Robert Cemper · Oct 25, 2019 go to post

IN expects a series of  values  like In (1,5,23,7)

but  :portCode supplies a String as 1 single value "'AB','TS','SK','GM'"   which is useless

better use

SET portCode = $lb("AB","TS","SK","GM")

and 

SELECT STRING(Descrtiption,' (',Code,')'as Description,Code FROM Test.Codes 
WHERE Code  %INLIST  :portCode

Robert Cemper · Oct 13, 2019 go to post

As I see from code

^OPNLib.Game.CWLF

   

is just a Global variable to maintain the actual state of the display structured by Worlds and Display lines.
And it rebuilds the image in cyles.

It has nothing to do with the class definition but is an independent structure.
So you just see it in various methods.

Robert Cemper · Oct 9, 2019 go to post

Honestly, I never saw an <INVALID OERF> related to a lack of memory.

It typically happens if you do set obj=##class(MyClass).%OpenId(id,,.status)  and do not check for success.

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.Persistent#METHOD_%OpenId

so if you miss if '$isobject(obj)  {  .... error processing  using status....} or similar

then the next access to obj.MyProperty will throw  <INVALID OERF>

Only checking the status will tell you if  you really ran out of memory

Robert Cemper · Oct 7, 2019 go to post

The management portal has various screens with update features. (e.g Job status)

Íf IRIS service stops the update fails with a timeout.  This is your alert.

Robert Cemper · Oct 7, 2019 go to post

with

&SQL(SELECT MAX(ID) FROM Cinema.Film)

you eliminate the need of ORDER BY ... and save time

Robert Cemper · Sep 23, 2019 go to post

ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zCopyFrom+28^%Stream.TmpCharacter.1 *Rewind

Pls. add Version. (I couldn't identify any REWIND in CopyFrom)

Robert Cemper · Sep 23, 2019 go to post

If you don't have a similar drive you may need to update %installdir%\cache.cpf

[Journal]
AlternateDirectory=C:\InterSystems\Cache\mgr\journal\
BackupsBeforePurge=2
CurrentDirectory=C:\InterSystems\Cache\mgr\journal\
DaysBeforePurge=2

 

if this isn't enough 

startup Caché in emergency mode as described : 
 https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCAS_secmgmt#GCAS_secmgmt_emerg

and run  DO ^STURECOV from namespace %SYS

it allows you to disable Journal Checking for the next startup.
then restart Caché

Robert Cemper · Sep 22, 2019 go to post

almost done

do @aa

But be aware that variables you pass to your method are either explicit as in your example

or are variables in global scope.   eg. %par1, %par2, ...

Robert Cemper · Sep 16, 2019 go to post

WRC replied.

The *ENSTEMP databases are just like normal databases (non-journalled). So they are not in-memory databases like IRISTEMP or CACHETEMP.
Also note that transactions in *ENSTEMP will be journaled (like other non-journaled databases) but not like IRISTEMP.

Special thanks to @Mario Sanchez Macias   

Robert Cemper · Sep 14, 2019 go to post

a solution with NO $TRANSLATE

 set str="aN d.ef123$eR=xx?,yWz"
 for i=1:1:$l(str) s:$e(str,i)'?1(1AN,1".",1" ",1",") $e(str,i)=" " 

 aN d.ef123 eR xx ,yWz

Robert Cemper · Sep 12, 2019 go to post

I fear there is no such utility by default. 
You may need to do it manually to see if it is a real problem or a side effect from parallel compiling.

I just verify it by multiple runs on CompileAll to be sure.

 [ I'm  just  facing a list of ~100 including deployed classes    crying ] 

If you have private %classes mapped ito %SYS then you have to compile them manually.

compileAll doesn't include %SYS for good reasons. 

Robert Cemper · Sep 6, 2019 go to post
Insert into LISDB.State (short,long)
SELECT 'AL','Alabama'
Union All
SELECT 'AK','Alaska'
Union All
SELECT 'AZ','Arizona'
Union All
SELECT 'AR','Arkansas'
Robert Cemper · Sep 6, 2019 go to post

From docs.

A host variable is a local variable that passes a literal value ....

see: Host Variables

You are using instead object property references.==>    objSearch.StartIndex,  .....
Load your properties into local variables and it should work

Robert Cemper · Sep 5, 2019 go to post

for details on variable scoping see Summary on Local Variable Scoping

As the SQL Code generator dates from times where ProcedureBlock was unknown
any generated code for SQL access I've seen over decades just works with  [ ProcedureBlock = 0 ]

The 'automatic' you mention is the default if your class is set t to [ ProcedureBlock = 1 ] which is a default.

By changing the variable name you found the best solution yourself.   yes

Robert Cemper · Aug 27, 2019 go to post

Alexey,

you are perfectly correct. My intention was to demonstrate that the ancient approach of 
OPEN and USE command parameters dating from the previous millennium is still valid.

wink
$LB() is definitely the more general and flexible solution. 

yes

Robert Cemper · Aug 26, 2019 go to post

Before you try a re-install ation of Caché  emergency access could be your last chance.

Follow the guide very strictly there is a high risk to cause unrecoverable damage. 

Robert Cemper · Aug 26, 2019 go to post

Herman 

I think you have it in COS since Strings became almost endless.
Par #2) of my answer showed it:

the traditional style you may know from Caché I/O Device Guide  having also just 1 parameter
do  ##class(my.pieces).method("/SERVER=127.0.0.1:/PORT=1972:/NAMESPACE=SAMPLES")

and the method end:

ClassMethod method(parameter as %String(MAXLEN="") {
   for par="SERVER","PORT","NAMESPACE" 
   set @par=$P($P(parameter,par_"=",2),":") 
   zw @par 
   #; now do something ...   
}
SERVER="127.0.0.1" 
PORT=1972 
NAMESPACE="SAMPLES"
Robert Cemper · Aug 24, 2019 go to post

Log In over Terminal as Privileged User and move to Namespace %SYS   and fix your Security 

USER>ZN "%SYS"
%SYS>DO ^SECURITY
 
1) User setup
2) Role setup
3) Service setup
4) Resource setup
5) Application setup
6) Auditing setup
7) Domain setup
8) SSL configuration setup
9) Mobile phone service provider setup
10) OpenAM Identity Services setup
11) Encryption key setup
12) System parameter setup
13) X509 User setup
14) Exit
 
Option? 5
 
1) Create application
2) Edit application
3) List applications
4) Detailed list applications
5) Delete application
6) Export applications
7) Import applications
8) Exit
 
Option? 2
 
Application to edit? ?
 
 Num  Name                           Namespace
  1)  /api/atelier                   %SYS
  2)  /api/deepsee                   %SYS
  3)  /csp/samples                   SAMPLES
  4)  /csp/samples/docserver         SAMPLES
  5)  /csp/user                      USER
  6)  /isc/studio/usertemplates      %SYS
  7)  /TEST                          SAMPLES
  8)  /webShop                       USER
  9)  /csp/broker                    %SYS
 10)  /csp/docbook                   DOCBOOK
 11)  /csp/documatic                 DOCBOOK
 12)  /csp/sys                       %SYS
 13)  /csp/sys/bi                    %SYS
 14)  /csp/sys/exp                   %SYS
 15)  /csp/sys/mgr                   %SYS
 16)  /csp/sys/op                    %SYS
 17)  /csp/sys/sec                   %SYS
 18)  /isc/pki                       %SYS
 19)  /isc/studio/rules              %SYS
 20)  /isc/studio/templates          %SYS
 
Application to edit? 12 /csp/sys
Description? System Management Portal =>
Enabled? Yes => Yes
CSP/ZEN Enabled? Yes => Yes
DeepSee Enabled? No => No
iKnow Enabled? No => No
Inbound Web Services Enabled? Yes => Yes
Require resource to use application? No => No
Role to always add to application?
New match role to add to application?
Do you want to go back and re-edit any match roles or target roles? No => No
Allow Not authenticated access? Yes => NO
Allow Password authentication? No => YES
Accept Login Tokens created by other CSP applications? No =>
Robert Cemper · Aug 23, 2019 go to post

As you say:  your .EXE is on the server and NOT on the CLIENT.

Some terminal emulators (e.g. KEA) once had the feature to launch a LOCAL command triggered by an ESC sequence.
But this requires your .EXE to be already installed on your LOCAL client.

You may need to have a telnet or SSH connection to your client.

Browsers typically don't allow this. But they may run JavaScript (which isn't  your .EXE)

Robert Cemper · Aug 12, 2019 go to post

a simple example how it works:

I create a routine %BANNER.int  next in my terminal

%BANNER  ;mnemonic demo
TOP      ;
         write #,%mybanner,!
         quit

next in my terminal

USER>set %mybanner="HI I'm a BANNER"_$c(13,10)_"============="

USER>use $IO::"^%BANNER"  write /TOP,"my first line",!

and that's my screen

HI I'm a BANNER
=============
my first line

 

Robert Cemper · Aug 12, 2019 go to post

the DEFAULT function of # for a terminal window emulating a CRT ist hardcoded.

see Terminal I/O WRITE

"Issuing WRITE # to a CRT terminal clears the screen and sends the cursor to the home (0,0) position."

using a Mnemonic Definition you may supply the required escape sequence to cover your needs.

but instead of WRITE #  you may need to use  WRITE /TOP  (just as an example)

For all about Mnemonics see Controlling Devices with Mnemonic Spaces.