Page 1 of 1

Skipping entire Block

Posted: November 23rd, 2017, 3:08 am
by Socio
Dear all,
Hope everyone is doing good. I would like to know how to skip a complete BLOCK.

In roster given below
if Q4 (1) = 1 : I need to ask only BLOCK 2 (Q5 - Q10)
Likewise
If Q4 (2) = 1 : I need to skip and ask only BLOCK 3 (Q11 - Q15)
If Q4 (3) = 1 : I need to skip and ask only BLOCK 4 (Q16 - Q20)

Thank you.

Roster
Q1 Q2 Q3 Q4
1
2
3

BLOCK 2
Q5 to Q10

BLOCK 3
Q11 to Q15

BLOCK 4
Q16 to Q20

Re: Skipping entire Block

Posted: November 23rd, 2017, 7:01 am
by khurshid.arshad
Dear;
What I have understood from your question, please see the example.

Code: Select all


Proc Q10

	if Q4(1)=1 then
		skip to next;
	else
	endif;


Proc Q4

	if Q4(2)=1 then
		skip to Q11;
	elseif Q4(3)=1 then
		skip to Q16;
	endif;


Proc Q15

	if Q4(2)=1 then
		skip to next;
	else
	endif;

Best.
a.

Re: Skipping entire Block

Posted: November 24th, 2017, 2:22 am
by Socio
Dear Arshad,
Thanks for your help but need few clarifications
Proc Q4

if Q4(2)=1 then
skip to Q11;
elseif Q4(3)=1 then
skip to Q16;
endif;


If we use above command I think we can't ask remaining rows. Suppose if Q4(2)=1 then it will skip to Q11 which makes Q4(3) to skip without asking.
I need to ask all the rows of the roster. Also it is possible that all Q4 (1) = 1, Q4 (2) = 1 and Q4 (3) = 1. In this case, I have to ask all the Blocks.

Thank you.