FNTUDR Functions
The functions described below operate on values in UDRs of type FNTUDR.
 The value in an FNTUDR
 is a delimited string, representing file system paths.
The FNTUDR types are usually used in two different cases:
- Creation of a dynamic path for the output file from a disk oriented forwarding agent. Using the filename template in the forwarding agent theÂ
FNTUDR
 value is, via a MIM resource, used to publish the respective MIM value. For further information about using theÂFNTUDR
in filename templates, see the relevant agent documentation in the Desktop User's Guide. - Grouping of output data using a disk oriented forwarding agent set to expect input ofÂ
MultiForwardingUDR
 type. TheÂMultiForwardingUDR
 has two fields, the first contains the data that will be written in the output file, the second contains filename and path specified by the FNTUDR. Both fields are mandatory unless the Produce Empty Files check box is selected in the agent, in this case the data field is not required.
For further information about using the MultiForwardingUDR
, please refer to respective file based forwarding agents documentation.
Example - How an FNTUDR is constructed
The following APL code shows how a FNTUDR
is constructed with the help of the functions that are described in this section.
import ultra.FNT; consume { FNTUDR fntudr = udrCreate(FNTUDR); fntAddString(fntudr, "ready_folder"); fntAddDirDelimiter(fntudr); date now = dateCreateNow(); fntAddString(fntudr, ""+dateGetYear(now) + "-"); fntAddString(fntudr, ""+dateGetMonth(now), 2, "0", false); fntAddString(fntudr, "-"); fntAddString(fntudr, ""+dateGetDay(now), 2, "0", false); }
The fntudr variable will have a value corresponding to a path like ready_folder/2018-10-31
, where the character '/' represent a directory delimiter that can be any character, depending on the target system.
The following functions for FNTUDR described here are:
fntAddString
The fntAddString
function appends a text string to the specified FNTUDR
.
void fntAddString( FNTUDR fntudr, string str, int size, (optional) string padding, (optional) boolean leftAlignment (optional) )
Parameter | Description |
---|---|
| The |
| The string that will be added. If the string is null a runtime error will occur. The string can be extended or truncated if the size parameter is specified and the string does not match. Note! Do not include directory delimiters, e g "/", in the string. To add delimiters, use the |
| The optional parameter size defines a fixed size for the appended string. A runtime error will occur, if the size isn't greater than zero. |
| The optional parameter padding defines a padding string that will be repeated to fill the string to the size specified in the size parameter. A default padding will be used if the argument isn't specified or if the padding string is null or an empty string. |
| The optional parameter leftAlignment specifies if the padding shall be kept right or left of the string. If the parameters value is true the string will be left aligned and the padding will added to the right. If the parameter isn't specified, the default setting is left aligned. |
Returns | Nothing |
fntAddDirDelimiter
The fntAddDirDelimiter
function adds a directory delimiter to the end of the FNTUDR
.
void fntAddDirDelimiter(FNTUDR fntudr)
Parameter | Description |
---|---|
| The |
Returns | Nothing |