Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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);