Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: field level routine in Transformation to achive % baskets

$
0
0

A succinct way of doing it:

 

Data w_temp type i, w_low type i, w_high type i.

 

IF w_disc < 0.

     RESULT = '<0%'.

ELSE.

     w_temp = ceil( w_disc / 5 ).

     w_low = ( w_temp - 1 ) * 5. 

     w_high = w_temp * 5

     CONCATENATE w_low '-' w_high '%' into RESULT.

ENDIF.


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>