You can try using DBF utility from my old Cache-based framework:

https://github.com/logist/p6/blob/master/classes/p6/Dbf.xml

It has ReadFile/ReadStream & WriteFile/WriteStream methods

Usage:

set sc=##class(p6.Dbf).WriteFile(file,array)
sc - execution status %Status
file-file name
array - string containing a name of global with data,
 
for example: ^asd("asdf"),
^CacheTemp($job,"dbf")
this array has to provide the following structure
...,"header")=<header>
format $list($list(var1,length1,type1,dec1),...,$list(varN,lengthN,typeN,decN)); type is D for date N for number anything else for string
...,"row",<row number>)=<data>

data format $list(var1,...,varN)

This is what I do to generate JWTs.

ClassMethod GetJWT(username As %String) As %String
{
// Calculate the issued at and expiration dates
set iat = ##class(%OAuth2.Utils).TimeInSeconds($ztimestamp,0)
set exp = ##class(%OAuth2.Utils).TimeInSeconds($ztimestamp,3600*24*7)
 
// Define token payload
set payload = {
"iat": (iat),
"iss": "zpmhub",
"exp": (exp),
"user": (username)
}
set secret=$get(^JWTSecret)
if secret="" {
set secret=##class(%PopulateUtils).StringMin(64,64)
set secret=$tr($p($SYSTEM.Encryption.Base64Encode(secret,1),"=",1),"+/","-_")
set ^JWTSecret=secret
}
set JOSE("sigalg")="HS256"
do ##class(%OAuth2.JWKS).AddOct("HS256",secret,.RemotePrivate)
do ##class(%OAuth2.JWT).ObjectToJWT(.JOSE,payload,,.RemotePrivate,.jwt)
quit jwt
}

Hi Sai Sai,

One thing you might look into in regards to distribution and deployment is ZPM Package Manager https://github.com/intersystems-community/zpm . It's still under active development, but is already very usable at the moment, you can use it with a self-hosted open source private registry https://github.com/intersystems-community/zpm-registry/ and my consultancy is currently developing a commercial hosted version which will be announced at Virtual Summit next month.

There is an example of an Interoperability packaging at GitHub: https://github.com/intersystems-community/iris-interoperability-template

In terms of deployment, unless you have MASSIVE productions, I would recommend to deploy the whole thing at once even if not everything has changed -- it's just a lot less moving parts and options for errors this way, and you can test deployments on your test server as many times as you like.

Hope this helps!

Sergei Shutov
Managing Director, Banksia Global
https://banksiaglobal.com

Try this way

K  $ZT="^%ET"   
  id="{id}"
  set httprequest = ##class(%Net.HttpRequest).%New()
 set httprequest.SSLConfiguration = "HTTPS"
  set httprequest.Server = "anypoint.mulesoft.com" /// CHANGED
 set httprequest.Https = 1
 set httprequest.ContentType="json"
set sc=httprequest.SetHeader("Connection","close")
set status = httprequest.Get("/mocking/api/v1/links/03a74865-d7fb-4318-a310-7ad2b95361f6/v1/receivables/"_id") /// CHANGED
if status {
response=httprequest.HttpResponse //IS JUST RETURNING PAGE
     do response.Data.Rewind()
     do {
     write response.Data.Read()
     while 'response.Data.AtEnd 
}
 quit