Hello everyone !Might be helpful if you posted the error you are getting.
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
thank.
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
thank.Might be helpful if you posted the error you are getting.
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
thank.Might be helpful if you posted the error you are getting.
On Thursday, March 11, 2021 at 12:09:46 PM UTC-5, gont...@gmail.com wrote:Gateway).
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) {
document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText; document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (502 Bad
In Cache's native studio, this size of routine is recorded and compiled - everything works fine.Your problem isn't in %R, but in the AJAX mechanism you are using to transfer the routine. Are you using Weblink, CSP, or something else?
I got the impression that there is a limit on the size of the transmitted string.
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:Gateway).
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) {
document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText; document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (502 Bad
In Cache's native studio, this size of routine is recorded and compiled - everything works fine.
I got the impression that there is a limit on the size of the transmitted string.
четверг, 11 марта 2021 г. в 19:22:29 UTC+2, OldMster:Bad Gateway).
On Thursday, March 11, 2021 at 12:09:46 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) {
document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText; document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (502
I'm trying FCGI for now. https://github.com/informatik-aalen/FastCGI-for-GT.MIn Cache's native studio, this size of routine is recorded and compiled - everything works fine.Your problem isn't in %R, but in the AJAX mechanism you are using to transfer the routine. Are you using Weblink, CSP, or something else?
I got the impression that there is a limit on the size of the transmitted string.
I've tried writing without ^R%
I am writing in a simple global. The same result. Part of the code is written. Can't figure out where I am doing wrong ...
RtnSaveAS(head)
s $ztrap="error"
k ^gonUTILITY
s rtname=$p(head,"{~}",1),nms=$p(head,"{~}",2),code=$p(head,"{~}",3)
zn nms
f j=1:1 s routine=$p(code,$c(10),j) Q:routine="" d
. s ^gonUTILITY(j)=routine
q
;;
In YottaDB and GT.M everything works fine. It turns out that Ajax has nothing to do with it.
On Thursday, March 11, 2021 at 1:12:17 PM UTC-5, gont...@gmail.com wrote:Bad Gateway).
четверг, 11 марта 2021 г. в 19:22:29 UTC+2, OldMster:
On Thursday, March 11, 2021 at 12:09:46 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program? The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10) s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) {
document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText; document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (502
and the web server configuration is usually where my problem is.I'm trying FCGI for now. https://github.com/informatik-aalen/FastCGI-for-GT.MIn Cache's native studio, this size of routine is recorded and compiled - everything works fine.Your problem isn't in %R, but in the AJAX mechanism you are using to transfer the routine. Are you using Weblink, CSP, or something else?
I got the impression that there is a limit on the size of the transmitted string.
I've tried writing without ^R%
I am writing in a simple global. The same result. Part of the code is written. Can't figure out where I am doing wrong ...
RtnSaveAS(head)I'm not familiar with FCGI, but it appears it was written for GT.M (and by extension YottaDB). What operating system are you running Cache 5 on? Does FCGI use a web server, or is it direct? I make extensive use of REST API's to both YottaDB and Cache,
s $ztrap="error"
k ^gonUTILITY
s rtname=$p(head,"{~}",1),nms=$p(head,"{~}",2),code=$p(head,"{~}",3)
zn nms
f j=1:1 s routine=$p(code,$c(10),j) Q:routine="" d
. s ^gonUTILITY(j)=routine
q
;;
In YottaDB and GT.M everything works fine. It turns out that Ajax has nothing to do with it.
On Thursday, March 11, 2021 at 1:12:17 PM UTC-5, gont...@gmail.com wrote:Bad Gateway).
четверг, 11 марта 2021 г. в 19:22:29 UTC+2, OldMster:
On Thursday, March 11, 2021 at 12:09:46 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program? The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10) s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) {
document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText; document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (502
and the web server configuration is usually where my problem is.I'm trying FCGI for now. https://github.com/informatik-aalen/FastCGI-for-GT.MIn Cache's native studio, this size of routine is recorded and compiled - everything works fine.Your problem isn't in %R, but in the AJAX mechanism you are using to transfer the routine. Are you using Weblink, CSP, or something else?
I got the impression that there is a limit on the size of the transmitted string.
I've tried writing without ^R%
I am writing in a simple global. The same result. Part of the code is written. Can't figure out where I am doing wrong ...
RtnSaveAS(head)I'm not familiar with FCGI, but it appears it was written for GT.M (and by extension YottaDB). What operating system are you running Cache 5 on? Does FCGI use a web server, or is it direct? I make extensive use of REST API's to both YottaDB and Cache,
s $ztrap="error"
k ^gonUTILITY
s rtname=$p(head,"{~}",1),nms=$p(head,"{~}",2),code=$p(head,"{~}",3)
zn nms
f j=1:1 s routine=$p(code,$c(10),j) Q:routine="" d
. s ^gonUTILITY(j)=routine
q
;;
In YottaDB and GT.M everything works fine. It turns out that Ajax has nothing to do with it.
четверг, 11 марта 2021 г. в 20:39:56 UTC+2, OldMster:502 Bad Gateway).
On Thursday, March 11, 2021 at 1:12:17 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 19:22:29 UTC+2, OldMster:
On Thursday, March 11, 2021 at 12:09:46 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program? The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) { document.getElementById("myTextarea").value = "";
alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText;
document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (
and the web server configuration is usually where my problem is.I'm trying FCGI for now. https://github.com/informatik-aalen/FastCGI-for-GT.MIn Cache's native studio, this size of routine is recorded and compiled - everything works fine.Your problem isn't in %R, but in the AJAX mechanism you are using to transfer the routine. Are you using Weblink, CSP, or something else?
I got the impression that there is a limit on the size of the transmitted string.
I've tried writing without ^R%
I am writing in a simple global. The same result. Part of the code is written. Can't figure out where I am doing wrong ...
RtnSaveAS(head)I'm not familiar with FCGI, but it appears it was written for GT.M (and by extension YottaDB). What operating system are you running Cache 5 on? Does FCGI use a web server, or is it direct? I make extensive use of REST API's to both YottaDB and Cache,
s $ztrap="error"
k ^gonUTILITY
s rtname=$p(head,"{~}",1),nms=$p(head,"{~}",2),code=$p(head,"{~}",3)
zn nms
f j=1:1 s routine=$p(code,$c(10),j) Q:routine="" d
. s ^gonUTILITY(j)=routine
q
;;
In YottaDB and GT.M everything works fine. It turns out that Ajax has nothing to do with it.
I use Cache 5.0 in linux CentOS 7. FCGI a use a Nginx - web server. I can't use newer versions of Cache now, but I'll try to see how it behaves on newer versions. I tried it on Cache 2015 and it all works fine. I can assume that this is due to Csche 5.0 but what exactly I can not say
On Thursday, March 11, 2021 at 3:01:05 PM UTC-5, gont...@gmail.com wrote:502 Bad Gateway).
четверг, 11 марта 2021 г. в 20:39:56 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:12:17 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 19:22:29 UTC+2, OldMster:
On Thursday, March 11, 2021 at 12:09:46 PM UTC-5, gont...@gmail.com wrote:
четверг, 11 марта 2021 г. в 17:14:54 UTC+2, OldMster:
On Thursday, March 11, 2021 at 1:56:36 AM UTC-5, gont...@gmail.com wrote:
Hello everyone !
I am trying to use the Cache ver. 5.0 routine ^%R https://www.yumpu.com/en/document/view/36857498/using-the-cache-r-routine-intersystems-documentation
Can you tell me how to increase the buffer of the saved program?
The impression is that it is less than 32 kb.
Code:
rtnSAVE(head,code)
s rtname=$p(head,"~",1),namespace=$p(head,"~",2)
Znspace namespace
s code(0)=0
f j=1:1 s string=$p(code,$c(10),j) q:string="" d
. s code(j)=string
s code(0)=j-1
s name=rtname
s ext="INT"
s routine=name_"."_ext
s options="CS" ; Compile and Save
s errors="" ; empty list
s return = $$ROUTINE^%R(routine,.code,.errors,options)
s errcode=$$FMTERR^%R(.errors, .code)
i errcode'="" d
. s %fcgi("o","stdout",i)=errcode_$c(13,10)
e s %fcgi("o","stdout",i)="Compilation result: "_return_$c(13,10)
s %fcgi("o","header","Content-Type")="text/plain"
q
;;
In Cache itself, (studio) saves without problems
Doesn't want to use the code above. gives the impression
that by default is somewhere 8-16 kb ...
I transfer the text of the routine to the Cache server (ver 5.0) using AJAX.thank.Might be helpful if you posted the error you are getting.
//**** Save and Compile Routine
function f_compile() {
var str = routine_name.value;
var strc = str.substring(0, 1); // "^" extract simbol
if (~strc.indexOf("^")) { document.getElementById("myTextarea").value = ""; alert("Attention, does not apply to Global !!!");
return;
}
if (zd.value == '') {
alert('The $ZDirectory must not be empty !!! This should be the path to the database folder. Click and select the area in the left menu !!!');
return;
}
var mumps_string = 'CO ' + routine_name.value + "{~}" + zd.value + "{~}" + editorUI.mirror.getValue();
var ret = AJAX("PUT", "/cache/do/" , mumps_string, null).responseText;
document.getElementById("myTextarea").value = ret;
}
If it's smaller (I'm guessing in the 8kb limit) it gets written and compiled successfully and I get a message in the browser about it. (Compilation result: 1 ^, SAVED, COMPILED,) When the text is larger, I get not an error, but this message (
Cache, and the web server configuration is usually where my problem is.I'm trying FCGI for now. https://github.com/informatik-aalen/FastCGI-for-GT.MIn Cache's native studio, this size of routine is recorded and compiled - everything works fine.Your problem isn't in %R, but in the AJAX mechanism you are using to transfer the routine. Are you using Weblink, CSP, or something else?
I got the impression that there is a limit on the size of the transmitted string.
I've tried writing without ^R%
I am writing in a simple global. The same result. Part of the code is written. Can't figure out where I am doing wrong ...
RtnSaveAS(head)I'm not familiar with FCGI, but it appears it was written for GT.M (and by extension YottaDB). What operating system are you running Cache 5 on? Does FCGI use a web server, or is it direct? I make extensive use of REST API's to both YottaDB and
s $ztrap="error"
k ^gonUTILITY
s rtname=$p(head,"{~}",1),nms=$p(head,"{~}",2),code=$p(head,"{~}",3) zn nms
f j=1:1 s routine=$p(code,$c(10),j) Q:routine="" d
. s ^gonUTILITY(j)=routine
q
;;
In YottaDB and GT.M everything works fine. It turns out that Ajax has nothing to do with it.
5.0 but what exactly I can not sayI use Cache 5.0 in linux CentOS 7. FCGI a use a Nginx - web server. I can't use newer versions of Cache now, but I'll try to see how it behaves on newer versions. I tried it on Cache 2015 and it all works fine. I can assume that this is due to Csche
In the configuration manager, the 'Advanced' tab, in the 'Process' section, check the $ZF String size - FCGI may use $ZF to move the data back and forth. Mine is set to 32767, but maybe yours is set smaller.
Mark
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 407 |
Nodes: | 16 (2 / 14) |
Uptime: | 15:29:10 |
Calls: | 8,555 |
Calls today: | 7 |
Files: | 13,219 |
Messages: | 5,925,665 |