Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I want to get familiar with subroutines and am therefore playing around with.
I therefore just wrapped a simple inline load statement in a sub and placed in the tab "subroutines"
SUB load()
LOAD * INLINE [
TEST1
1
2
3
];
END SUB
No I try to call this subroutine in my main tab using the following code
CALL load()
But this gives me an error. Any thoughts on what Im doing wrong?
order of your Tabs is wrong
Sub must be defined before it is called
Change order of your first and second tab
Hi Mar,
get rid of "()"
SUB load
Regards,
JP
Hi Jonathan,
I tried you're suggestion (see below) but this still doesn't work... Am I overlooking a typo?
#First tab
CALL load()
#Second tab
SUB load
LOAD * INLINE [
Employee_ID, Customer_id, Order_id, Order_total
1, 11, 6, 12
2, 12, 7, 14
3, 13, 8, 176
4, 14, 9, 12
5, 15, 10, 8
];
END SUB
order of your Tabs is wrong
Sub must be defined before it is called
Change order of your first and second tab
Hi Marc,
Try like below,
#Firsttab
SUB load
LOAD * INLINE [
Employee_ID, Customer_id, Order_id, Order_total
1, 11, 6, 12
2, 12, 7, 14
3, 13, 8, 176
4, 14, 9, 12
5, 15, 10, 8
];
END SUB
#Secondtab
CALL load;
It is important that the call command should comes after the sub routines.