Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to Sub routine

SUB inc(a,b)

a=a+1

exit SUB when a>10

b=b+1

End SUB

Call inc(1,0)

How to verify that the Subroutine gets invoke and way to print the values of a and  b. 

1 Reply
gussfish
Contributor II

Re: How to Sub routine

Use the TRACE statement - this will write a message to the log. In its

simplest form, you can put this on the line after the SUB inc(a,b)

statement:

TRACE Entered the subroutine;

To show the value of a variable, use something like this:

TRACE a=$(a);