Posts

Showing posts from March, 2015

IBI WebFOCUS - Useful tips and tricks

Many times while working on the projects, we face some small issues which takes a long time to fix it or achieve the requirement even if it looks very small. For example concatenation of 2 columns seperated by a '-' and it should contain 1 space between '-' and second column. It looks very small but when I tried to do that, it took me a long time to find out a very simple solution. There are many example like that. I want to share such things with you which I faced in my day to day coding. Concatenation with space:   You can either do it in define or compute as given below: COUNTRY_CAR/A50=CAR||(' - ' |COUNTRY); User defined function in WebFOCUS:  If we need to perform repeative set of statements again and again, user defined funtion is a very good approach. Below is a simple example of function ADDNO to add 2 numbers and return the output: DEFINE FUNCTION ADDNO(NO1/D20.2, NO2/D20.2) ADDNO/D20.2 = NO1+NO2; END -RUN TABLE FILE CAR PRINT COUNTRY