I am new to this GTM mump's technology.I like to open a TCP port on the UNIX server and send the data over it , then one cache application will read this data from GTM-server port.

Can any one help/assist me, how to write the code or if any one having such kind of ready made code then please share it?

Following code I am trying to execute on the GTM server s tcpdev="TCP|9230" o tcpdev::2 u tcpdev r tcpdev ; this command will read the data from TCP. u tcpdev w tcpdev ; this line will write the data to TCP.

Just to update this topic, EWDjs nicely implements json messages passed from browser-client to server-nodejs-gtm and gtm database on the server. These are Rob Tweeds work and Dave Wicksell's nodem to connect the nodejs and gtm on the server linux machine.

I am not sure if this is the right place for this, but I had no idea about this webpage until recently and have enjoyed exploring. I work with Mumps (cache script) in relation to Epic Systems EMR, and sometimes I need to do some custom programming to do something I really want to do. I came here looking for some code to parse JSON from an http get request and didn't find it anywhere. Since I didn't find it I went ahead and wrote it myself, and I figured I would give back to the community by posting it here. It is all in line programming, just because sometimes my clients don't want new Routines written, so I bend the rules a little and create what Epic calls an Extension, which can have one line of code.

First you have to get the JSON request. I thought it would be fun to show some weather conditions as a test. So start by setting the response variable to the JSON response of the wunderground API...

The JSON is stored in the ^ZZJSON global, respecting the child and parent structure.

Now, you can retrieve the current temp in Baltimore by writing the global ^ZZJSON("current_observation,estimated,temp_f")

Code:

w !,"Temp: ",^ZZJSON("current_observation,estimated,temp_f")

I just finished writing it, so it could possibly use some optimization, but it works. When I have time later I am going to clean up the root nodes that don't have a value to be just set to 1, but I really don't need them set to anything anyway.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum