Micro Focus Expert
Micro Focus Expert

(SM) Support Tip: Printing records in XML format in RAD debugger

When using RAD debugger, you can print records – but always have to count the position and look up in dbdict for the field name, if you do not just decide to just guess.

Alternatively, you can create a little ScriptLibrary record with a function to return the parameter as XML string and then call this function from RAD debugger.


This is how to do it:


  1. Create a ScriptLibrary called “RADDebug” (choose any package for that like "BaseUtilities")
  2. With script:

    function getXML(record)


       return record.getXML().toXMLString();


  3. Test in RAD debugger:
  4. d jscall("RADDebug.getXML", $L.filed)




    >d jscall("RADDebug.getXML", $L.filed)

    <model name="ScriptLibrary" query="name=&quot;RADDebug&quot;"><keys><name sctype="string">RADDebug</name></keys><instance recordid="RADDebug" uniquequery="name=&quot;RADDebug&quot;"><name type="string">RADDebug</name><script type="string">function getXML(record)


       return record.getXML().toXMLString();

    }</script><package type="string">Base Utilities</package><sysmodtime type="dateTime">06/28/16 06:27:11</sysmodtime><sysmoduser type="string">failsafe</sysmoduser><sysmodcount type="decimal">2</sysmodcount></instance></model>


Labels (1)
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.