go to post Rod Dorman · Jan 14, 2022 In that case you'll want to use %Net.SSH.Session to connect to the site and once signed in use the OpenSFTP method to open a SFTP session to be able to make %Net.SSH.SFTP calls, in particular the Put or PutStream method
go to post Rod Dorman · Aug 13, 2021 If you want to get rid of spaces the simplest way is use $TRANSLATE SET NoSpaces=$TRANSLATE(line," ")
go to post Rod Dorman · Oct 27, 2019 The value we wanted should have been a simple string, and we did not know how to convert the output to string##class(%SYSTEM.Encryption).MD5Hash() does return a string, what do you mean by 'simple'? If you mean 'displayable' that will depend on what you're trying to display on.Take a look at ##class(%SYSTEM.Encryption).Base64Encode() that will return a string with only non-control ASCII characters.
go to post Rod Dorman · Jul 18, 2019 Use $ZDATEH() to convert to internal $HOROLOG format, and $ZDATE() to convert to your desired format WRITE $ZDATE($ZDATEH("14JAN1991",8),8)
go to post Rod Dorman · Feb 25, 2019 The question was about alternatives to using % which is what I answered.
go to post Rod Dorman · Nov 1, 2018 Are the %occLibrary entry points documented anywhere as being available for use by applications?
go to post Rod Dorman · Oct 25, 2018 If its OK for the DB to be off line for a little bit a simple kludge would be to use the SYS.Database DismountDatabase class method to dismount it and then when the copy is done use MountDatabase to mount it.
go to post Rod Dorman · Oct 16, 2018 type KILL DO ^%IS hit Enter twice WRITE and look at what IOF and IOST are set to
go to post Rod Dorman · Sep 19, 2018 SET Command="wmic useraccount get name,sid" SET $ZT = "CommandErr" OPEN Command:"QR" FOR { USE command READ Text USE $P SET Array($I(Array))=Text } CommandErr ; SET $ZT="" SET ZE=$ZE USE $P CLOSE command IF $P(ZE,">")'="<ENDOFFILE" { ; some error other than end of file } ELSE { ; parse contents of Array() }
go to post Rod Dorman · Jul 16, 2018 If the command you're using doesn't support redirection to a file use a command pipe e.g. SET $ZT="CommandErr" OPEN Command:"QR" FOR { USE Command READ Text USE $P ; do something with the text } CommandErr ; SET ZE=$ZE SET $ZT="" USE $P CLOSE Command IF $P(ZE,">")="<ENDOFFILE" { ; successful completion } ELSE { ; something happened }
go to post Rod Dorman · Jul 16, 2018 Figure out how you'd do it at a command prompt and then issue that command with $ZF(-1)
go to post Rod Dorman · Jun 3, 2018 You could put an entry in /etc/sudoers to allow them to run ccontrol.
go to post Rod Dorman · Apr 12, 2018 You could try using $QUERY to iterate the global and use $QLENGTH to determine how deep you are and $QSUBSCRIPT to determine what the subscripts are.