Hi Anthony,

Look at the doc for the property EntityBody, you can do something like :

Set body = { "MyKey":"MyValue" }
Do httpRequest.EntityBody.Write(  body.%ToJSON() )

 property EntityBody as %GlobalBinaryStream;

When an Entity-Body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding. These define a two-layer, ordered encoding model.

This is a stream so to insert into this stream use:

	Do oref.EntityBody.Write("Data into stream")

Hi Yone,

what version are you using ? From Caché/Ensemble 2016.2 you could create your json directly like :

Set body = {
     "app_id""e47322de-64c8-43c5-a1b7-42aa6409eb48",
     "headings"{"en":"Cita Atencion Primaria","es":"Cita Atencion Primaria"},
     "subtitle"{"en":"C.P. ISORA","es":"C.P. ISORA"},
     "contents"{"en""Next appointment""es""Siguiente cita"},
     "data":{
                "centro""C.P. ISORA",            
                "fecha""yyyy/mm/dd",       
                "hora""hh:mm",
                "profesional""nombre del profesional",
                "nomUsuario""nombre del usuario",
                "codcita""idCita",
                "sepuedeborrar"1
     },
     "include_player_ids"["2b3a6be7-5475-4871-b3be-a50eb2ec6034"]
}
Do httpRequest.EntityBody.Write(body.%ToJSON())

Hi Raj,

I use different IDE's and combinations :

- Caché Studio without any extensions for development where i am self-employed and no other developers are involved

- Caché Studio with Serenji source control from Gerorge James for a particular customer where i am one of the developers

- Visual Studio Code with the vscode-objectscript extention from Dmitry Maslennikov for another customer where i am one of the developers.

I like Caché Studio since I use it from day 1, because it is build-in so no need to configure anything. I use the 'projects' feature a lot, and export my projects regularly as a sort of 'light' source control. (I even edit my html and js files in Studio, even when they contain no COS code at all.)

But when developing in teams  a good build-in source control is essential, so that's why i also use the other options. I am still learning Visual Studio Code but it seems the way for the future.

Hi Youness,

There is no direct way from within Caché to modify excel sheets.

I use .csv files, or generate a .txt file, and call an excel file that runs a macro to read the data, and set all the stuff using VB code in the macro.

You can look at this article that talks about different options :

https://community.intersystems.com/post/use-cache-write-excel-files
 

Hi Youness,

how are you exporting the data to excel : as a .csv file ?

I am not sure if this is your problem, but when exporting data (numbers) to excel,  you need to be careful on the decimal character you are using : if i export numbers with a decimal point, and my locale is set on comma as a decimal , the numbers are treated as strings, and no validation works.

It all depends from which backup and journal files you start the recovery.

You need to start from a backup  & all journal files from before your event that killed the data (and stop the restore just before that event, which i assume is  11/14/2019 15:18:56). What happened on this time : did you kill some data or remove the class ?

It seems that the restore did not fully restored the class definition : can you go into studio and recompile the class ?

In the class definition, you will find the actual global names where the data is stored (by default it will be ^User.MemberD and ^User.MemberI (and possibly ^User.MemberS). Do you have these globals after the restore ?

There is no general answer if it is possible : it depends on the application : I have done conversions in a few  hours, but had also conversions that took a lot longer or were impossible without heavy rewrite of code.

Depends on :

- use of OS-dependencies (VMS/VAX) like working with files/devices or print operations

- use of 'non-standard' Mumps syntax, or relying on specific formats of special variables

- use of  DSM-11 tools (like DASL) or OS tools

- available source code

- ...

Hi Everardo,

I have seen the error, but not in testing ensemble messages :

USER>Write _test1
 
<FUNCTION>GetProp+2^%CDCalBk
USER 3e1>

variables preceded by _ (underscore) are only to be used in Caché Direct (VISM) programs.

Are you running any code that uses too much underscores ?

For example :

USER>set var1=1
 
USER>set var2="a"_var1
 
USER>set var2="a"__var1  ;two underscores
 
<FUNCTION>GetProp+2^%CDCalBk
USER 3e1>

Are you pointing the filestream to the correct file : is there any data in the filestream (you are using \Temp\GaganTest : it will use the same drive as the one where your database is located, also no extension is mentioned)

You can set a timeout (Set ftp.Timeout = 100) if the ftp server times out when uploading big files.

The file size will not effect your cache.dat size.

Hi Robert,

take a look at the %SYS.Journal.File , %SYS.Journal.Record and %SYS.Journal.SetKillRecord classes.

It contains methods & properties to loop through the journalfiles, and get the information of all changes. You could then write this info in a (summarized) file and email it.

ClassMethod ShowJrn(file = "C:\InterSystems\Cache\mgr\journal\20190804.001")
{
  Set jrnforef = ##class(%SYS.Journal.File).%OpenId(file)
  set record = jrnforef.FirstRecordGet()
  While record'="" {
      If record.%ClassName()="SetKillRecord" {
        Write record.Type,! ;6 = SET, 7 = KILL
        Write record.GlobalReference,!
        Write record.OldValue,!
        Write record.NewValue,!
    }
    Set record = jrnforef.GetRecordAt(record.NextAddress)
  }
}