Action Block Description: Convert Num to Text and retain decimal point. +- CAB_TEXTNUM_WITH_DECIMAL_POINT | IMPORTS: ... | EXPORTS: ... | LOCALS: ... | ENTITY ACTIONS: | 3 | +- IF import cmips_work int_num IS EQUAL TO 0 4 | | 5 | | SET export cmips_work text_30 TO "0" 6 | | 7 | | +- IF import cmips_work number_2 IS GREATER THAN 0 8 | | | 9 | | | SET export cmips_work text_30 TO concat(trim(export cmips_work text_30), ".") 10 | | | 11 | | | += FOR local cmips_work number_2 FROM 1 TO import cmips_work number_2 BY 1 12 | | | | SET export cmips_work text_30 TO concat(trim(export cmips_work text_30), "0") 11 | | | +-- 7 | | +-- 13 | | 3 | +- ELSE 14 | | 15 | | +- IF length(local cmips_work text_30) - import cmips_work number_2 IS GREATER THAN 0 16 | | | 17 | | | SET local cmips_work text_30 TO textnum(import cmips_work int_num) 18 | | | SET trim_leading_zeroes cmips_work number_1 TO 1 19 | | | 20 | | | += FOR local cmips_work number_2 FROM 1 TO length(local cmips_work text_30) BY 1 21 | | | | 22 | | | | SET local cmips_work text_1 TO substr(local cmips_work text_30, local cmips_work number_2, 1) 23 | | | | 24 | | | | +- IF local cmips_work text_1 IS EQUAL TO "0" 24 | | | | | OR local cmips_work text_1 IS EQUAL TO SPACES 25 | | | | | 26 | | | | | +- IF trim_leading_zeroes cmips_work number_1 IS EQUAL TO 1 27 | | | |<-------NEXT 26 | | | | | +-- 28 | | | | | 24 | | | | +- ELSE IF trim_leading_zeroes cmips_work number_1 IS EQUAL TO 1 29 | | | | | 30 | | | | | SET trim_leading_zeroes cmips_work number_1 TO 0 31 | | | | | 32 | | | | | SET actual_precision cmips_work number_2 TO length(local cmips_work text_30) - local cmips_work 32 | | | | | number_2 - import cmips_work number_2 + 1 33 | | | | | 34 | | | | | +- IF actual_precision cmips_work number_2 IS LESS OR EQUAL TO 0 35 | | | | | | 36 | | | | | | SET export cmips_work text_30 TO "0" 37 | | | | | | 38 | | | | | | +- IF import cmips_work number_2 IS GREATER THAN 0 39 | | | | | | | SET export cmips_work text_30 TO concat(trim(export cmips_work text_30), ".") 38 | | | | | | +-- 40 | | | | | | 41 | | | | | | += FOR local_counter cmips_work number_2 FROM 1 TO actual_precision cmips_work number_2 * -1 41 | | | | | | | BY 1 42 | | | | | | | SET export cmips_work text_30 TO concat(trim(export cmips_work text_30), "0") 41 | | | | | | +-- 34 | | | | | +-- 24 | | | | +-- 43 | | | | 44 | | | | SET export cmips_work text_30 TO concat(trim(export cmips_work text_30), local cmips_work text_1) 45 | | | | 46 | | | | +- IF local cmips_work number_2 IS EQUAL TO length(local cmips_work text_30) - import cmips_work 46 | | | | | number_2 46 | | | | | AND import cmips_work number_2 IS GREATER THAN 0 47 | | | | | 48 | | | | | SET export cmips_work text_30 TO concat(trim(export cmips_work text_30), ".") 49 | | | | | 46 | | | | +-- 20 | | | +-- 15 | | +-- 3 | +-- +--