Muni Ganesh · Apr 11, 2020 go to post

Hi Evgeny,

Thanks for your response. I tried given  command, but I am getting error response as below. Could you please suggest me if I doing something wrong.

Muni Ganesh · Jun 9, 2020 go to post

Hi Raj,

I just tried answer for your question, I have given the code  below. I hope it helps you.

---------------------------------------------------------------------------------------------------------------------------------

   set array=[]
   set obj = {}
   set obj.title="For Whom the Bell Tolls"
   set obj.author="Hemmingway"
   do array.%Push(obj)    

   set obj = {}
   set obj.title="The Invisible Man"
   set obj.author="Ellison"
   do array.%Push(obj)    

   set obj = {}
   set obj.title="Tender is the Night"
   set obj.author="Fitzgerald"
   do array.%Push(obj)    

 set arraylen=0 
 set iter = array.%GetIterator()
   while iter.%GetNext() {
      set arraylen=$I(arraylen)
   }
   
   set MainObj={}
   set MainObj.results=arraylen
   set MainObj.items=array
   
   MainObj.%ToJSON()
----------------------------------------------------------------------------------------------------------------

Output:

{"results":3,"items":[{"title":"For Whom the Bell Tolls","author":"Hemmingway"},{"title":"The Invisible Man","author":"Ellison"},{"title":"Tender is the Night","author":"Fitzgerald"}]}

--------------------------------------------------------------------------------------------------------------------

Muni Ganesh · Jun 12, 2020 go to post

Hi,

We are using %Net.FtpSession to upload the file to SFTP, you can try with this.

Muni Ganesh · Jun 22, 2020 go to post

Hi Ewan,

Slightly I have modified you query, its working fine.

&sql(SELECT REPLACE(REPLACE(REPLACE(CONVERT(CHAR(16),DATEADD(mi,1,STUFF(STUFF(STUFF(STUFF(201906192359,11,0,':'),9,0,' '),5,0,'-'),8,0,'-')),120),'-',''),' ',''),':','') into :OutVal)

Muni Ganesh · Aug 2, 2020 go to post

Hi Dmitriy,

Thanks for your response. I will check with the information provided by you and let you know.

Muni Ganesh · Aug 22, 2020 go to post

Hi All,

Sorry for the delay in response, I have been far to the computer for few days, that's why I could not respond on this.

Regarding this post,  I have checked with our admin team they said that they keep last 2 days journal files after that those files will be purged. As per my understanding the global has been killed more than 10 days back , so I can't do anything to retrieve the global.

Thanks for all your replies, I will try all your suggestions just for my knowledge .

Regards,

Muni Ganesh G

Muni Ganesh · Sep 12, 2020 go to post

Hi,

As per my understanding "Native API" in IRIS is useful for cross platform like JAVA,Dot Net and Python technologies to exchange the data from IRIS instance,but I do not think any advantage of calling a class method of one IRIS instance from different instance of IRIS by using Native API.

Muni Ganesh · Nov 6, 2020 go to post

Hi Brian,

Could you please with below code.

----------------------------------------------------

Class Sample.TempUtil Extends %RegisteredObject
{

ClassMethod GetSecondUpperCase(pInput As %String) As %String
{
 ;w ##class(Sample.TempUtil).GetSecondUpperCase("GetSecondUpperCase")
 SET stsrtpos=$LOCATE(pInput,"[[:upper:]]{1}",2)
 SET endpos=$LOCATE(pInput,"[[:upper:]]{1}",(stsrtpos+1))
 SET result=$EXTRACT(pInput,stsrtpos,(endpos-1))
 
 quit result
}

}
----------------------------------------------------------------

Regards,

Muni Ganesh