Show Menu
Cheatography

Datamapper language (Axway) Cheat Sheet by

XIB language (Axway product)

Condition

IF $var1=$var2
{
  # code 1
}
ELSE
{
  # code 2
}
CASE $var1
WHEN "A"
{
 # code for A
}
WHEN "B"
{
 # code for B
}
WHEN OTHERS
{
 # default
}

Loop

FOR $i=1 TO $max
{
  # your code
}

FOR $lv_i = 10 DOWNTO 2 STEP 2
{
 # code
}
WHILE $i < 5
{
 $i = $i + 1 ;
 # your code
}
REPEAT
{
 # your code
 $i = $i + 1 ;
}
WHILE $i < 5
 

Type

STRING
INTEGER
FLOAT
DATE
CHAR
Array: DECLARE $var[][] STRING;

Format

FORMAT­("%.0­8d­", $var);
RIGHT(­$var, 9, "­0");
DMU.LE­FT(­$var, 5);
TRIMLE­FT(­TRI­MRI­GHT­($v­ar));
NDEC(12.3, 2);

Misc

STRLEN­($s­tring)
ARRAYS­IZE­($a­rray)
DMU.MI­D($var, $start, $end);
$value = SL_STR­ING.Re­pla­ce(­$value, "­,", ".");

Time function

DMU.DA­TEN­OW(­"­%Y%­m%d­");
DMU.DA­TEC­ONV­ERT­($v­ar,­"­%m-­%d-­%y", "­%d/­%m/­%Y");
 

Time format

%% The % character.
%a Abbrev­iated weekday name (Sun, Mon, Tue, Wed, Thu, Fri or Sat).
%A Full weekday name (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday).
%B Full month name (January, February, March, April, May, June, July, August, September, October, November or December).
%d Day of month repres­ented as two digits (01 31).
%e Day of month repres­ented as one space and one digit, or, two digits (" 1" "31").
%f Fractions of a second repres­ented as two digits.
%H Hour repres­ented as two digits (00 23).
%I Hour repres­ented as two digits (00 11).
%j Day number of year repres­ented as three digits (001 366).
%m Month number repres­ented as two digits (01 12).
%M Minute repres­ented as two digits (00 59).
%p Ante meridian or post meridian (AM or PM).
%S Seconds repres­ented as two digits (00 59).
%U Week number of the year repres­ented as two digits (01 53). Sunday is the first dayof the week.
%w Weekday number repres­ented as one digit (0 6). Sunday is weekday number 0.
%W Week number of the year repres­ented as two digits (01 53). Monday is the first day of the week.
%y Year within the 20th century repres­ented as two digits (00 99).
%Y Year including century repres­ented as four digits.
           

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.