Written by

Lead Developer at TO THE NEW
Question Dheeraj Gupta · Oct 5, 2023

Using datatype as "application/json" getting error for MAX String.

For Compiling 

XData VariableName [ MimeType = application/json ]

Error :

ERROR #5002: ObjectScript error: <MAXSTRING>CompileRtns+282^%occRoutine

ERROR #5002: ObjectScript error: <FUNCTION>DescribePhase2+57^%occSysDe

Product version: IRIS 2023.2

Comments

Gautam Rishi · Oct 5, 2023

@Dheeraj Gupta As of now JSON is converting to string while compilation and crosses the max length of string. So, that is why this error is occurring.

0
Luis Angel Pérez Ramos  Oct 5, 2023 to Dheeraj Gupta

Have you tried to split your variable in various variables to avoid the string length limitation?

XData VariableName1 [ MimeType = application/json ] {}

XData VariableName2 [ MimeType = application/json ] {}

...

XData VariableNameN [ MimeType = application/json ] {}
 

0
Padmaja Konduru · Oct 5, 2023

You can declare the Property to %Stream.GlobalCharacter and you can use code function and Write the content in the variable example are the below commands. It works for me. 

Example:

Property Content As %Stream.GlobalCharacter;

Transformation in DTL :
Do target.Content.Write( source.ClinicalReport.content)

0
Ashok Kumar T · Oct 5, 2023

xData block data's are basically stored the as a stream object in the class definition. If this is a property oriented then create a stream property %Stream.GlobalCharacter and store the values.

0