Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Creator II
Creator II

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);