<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Other Procedures :: Aperio Documentation</title><link>/rpg/other/index.html</link><description>Chapter 6.5 Other RPG Procedures This chapter describes other procedures.</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 01 Jan 0001 00:00:00 +0000</lastBuildDate><atom:link href="/rpg/other/index.xml" rel="self" type="application/rss+xml"/><item><title>arrayDestroy()</title><link>/rpg/other/arraydestroy/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/arraydestroy/index.html</guid><description>This procedure destroys array in memory.
Parameter Type Description arrayPtr POINTER Mandatory Pointer to array Procedure returns *ON if array was destroyed correctly. It returnf *OFF in case of destroying process failed.
Examples:
xxText = 'Example of text'; xxPtr = stringToArray(%ADDR(xxText): %LEN(%TRIMR(xxText))); //This will create array with following elements: ['Example','of','text'] arrayDestroy(xxPtr);</description></item><item><title>arrayGet()</title><link>/rpg/other/arrayget/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/arrayget/index.html</guid><description>This procedure returns element (character value) for given index.
Parameter Type Description arrayPtr POINTER Mandatory Pointer to array index 9P 0 Mandatory Index of element This procedure returns element (character value) for given index.
Examples:
xxText = 'Example of text'; xxPtr = stringToArray(%ADDR(xxText): %LEN(%TRIMR(xxText))); //This will create array with following elements: ['Example','of','text'] xxNum = arrayGetNumOfElements(xxPtr); //xxNum = 3 xxValue = arrayGet(xxPtr: 2); //xxValue = 'of' arrayDestroy(xxPtr);</description></item><item><title>arrayGetNumOfElements()</title><link>/rpg/other/arraygetnumofelements/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/arraygetnumofelements/index.html</guid><description>This procedure returns number of elements of array.
Parameter Type Description arrayPtr POINTER Mandatory Pointer to array Procedure returns number of array elements (9P 0).
Examples:
xxText = 'Example of text'; xxPtr = stringToArray(%ADDR(xxText): %LEN(%TRIMR(xxText))); //This will create array with following elements: ['Example','of','text'] xxNum = arrayGetNumOfElements(xxPtr); //xxNum = 3 arrayDestroy(xxPtr);</description></item><item><title>generateHashCode()</title><link>/rpg/other/generatehashcode/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/generatehashcode/index.html</guid><description>This procedure generated 32 bytes hash code for any data passed as input.
Parameter Type Description inputDataPtr POINTER Mandatory Pointer to data inputDataLen 10U 0 Mandatory Length of data in bytes The procedure returns 32 characters variable represening unique hash code of given data.
Example:
xxData = 'Any text, for example Hello World!'; xxHash = generateHashCode(%ADDR(xxData): %SIZE(xxData));</description></item><item><title>getConfigLib()</title><link>/rpg/other/getconfiglib/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/getconfiglib/index.html</guid><description>This procedure returns Config library.
The procedure returns library name where config objects are located.
Example:
xxLib = getConfigLib();</description></item><item><title>getControlLib()</title><link>/rpg/other/getcontrollib/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/getcontrollib/index.html</guid><description>This procedure returns Control library.
The procedure returns library name where control objects are located.
Example:
xxLib = getControlLib();</description></item><item><title>getFrameworkLib()</title><link>/rpg/other/getframeworklib/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/getframeworklib/index.html</guid><description>This procedure returns Framework library.
The procedure returns library name where framework objects are located.
Example:
xxLib = getFrameworkLib();</description></item><item><title>getMetadataLib()</title><link>/rpg/other/getmetadatalib/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/getmetadatalib/index.html</guid><description>This procedure returns Metadata library.
The procedure returns library name where metadata objects are located.
Example:
xxLib = getMetadataLib();</description></item><item><title>getNotificationsLib()</title><link>/rpg/other/getnotificationslib/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/getnotificationslib/index.html</guid><description>This procedure returns Notifications library.
The procedure returns library name where notification objects are located.
Example:
xxLib = getNotificationsLib();</description></item><item><title>getObjectLibrary()</title><link>/rpg/other/getobjectlibrary/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/getobjectlibrary/index.html</guid><description>This procedure returns object library.
Parameter Type Description object 10A Mandatory Name of object objectType 10A Mandatory Object type The procedure returns library name where given object exists.
Example:
xxLib = getObjectLibrary('ABC': '*FILE');</description></item><item><title>jsonValue2ucs()</title><link>/rpg/other/jsonvalue2ucs/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/jsonvalue2ucs/index.html</guid><description>This procedure converts JSON value to string. All escaped charactes are changed to binary representation in UCS format. Following conversion is applied:
Conversion
/ –&gt; / \\ –&gt; \ " –&gt; " \t –&gt; 0x0009 \f –&gt; 0x000B \r –&gt; 0x000C \n –&gt; 0x000D \b –&gt; 0x0008 \r\n –&gt; 0x000A \uXXXX –&gt; 0xXXXX where XXXX is hex number NOTE:Enough output memory must be allocated by caller.
Parameter Type Description inText_ptr POINTER Mandatory Pointer to variable which contains character value in JSON coding (text which needs to be converted) inText_size 10U 0 Mandatory Length of text in bytes outText_ptr POINTER Mandatory Pointer to output text produced by procedure outText_size 10U 0 Mandatory Input/output parameter. As an input the maximum size of allocated memory for output must be provided (in bytes). As output, procedure returns curent length of UCS2 text generated by conversion (In bytes). NOTE: Procedure operates on UCS2 input and output strings!</description></item><item><title>stringToArray()</title><link>/rpg/other/stringtoarray/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/stringtoarray/index.html</guid><description>This procedure converts string value (character field) to array of words.
To avoid memory leak remember to destroy array after ussage! See arrayDestroy procedure() `
Parameter Type Description stringPtr POINTER Mandatory Pointer to variable which contains character value (sentence) stringLen 9P 0 Mandatory Length of text in bytes delimiter 30A Optional list of characters which should be used as delimiter to divide sentence into words. Note: The SPACE is always used Procedure returns pointer to array where separated words are stored.</description></item><item><title>ucs2JsonValue()</title><link>/rpg/other/ucs2jsonvalue/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/rpg/other/ucs2jsonvalue/index.html</guid><description>This procedure converts string to JSON value. All the forbiden charactes are changed either by adding escape character or by changing them to string alloved by JSON:
Conversion
/ –&gt; / \ –&gt; \\ " –&gt; " 0x09 –&gt; \t 0x0B –&gt; \f 0x0C –&gt; \r 0x0D –&gt; \n 0x08 –&gt; \b 0x0A –&gt; \r\n spec char bellow 0x1F–&gt; \uXXXX where XXXX is hex number NOTE:Enough output memory must be allocated by caller.</description></item></channel></rss>