I have n input parameters to my procedure & I have to perform some operation on all those variables:

Code :

```
DECLARE
p_Input1 VARCHAR2(10) := 'Nagendra';
p_Input2 VARCHAR2(10) :='';
p_Input3 VARCHAR2(10) :='Nagendra';
p_Input4 VARCHAR2(10) :='';
Temp_Input_Variable VARCHAR2(12);
Temp_Output_Variable VARCHAR2(12);
BEGIN 

For i IN 1..4
Loop
Temp_Input_Variable := 'p_Input'||i;
IF ( Temp_Input_Variable IS NOT NULL ) THEN
DBMS_OUTPUT.PUT_LINE('Variable '||Temp_Input_Variable||' Is Not Null');
ELSE
DBMS_OUTPUT.PUT_LINE('Variable '||Temp_Input_Variable||' Is Null');
END IF;
END LOOP;

END;

```

Output :

```
Variable p_Input1 Is Not Null
Variable p_Input2 Is Not Null
Variable p_Input3 Is Not Null
Variable p_Input4 Is Not Null

```

Expected Output :

```
Variable p_Input1 Is Not Null
Variable p_Input2 Is Null
Variable p_Input3 Is Not Null
Variable p_Input4 Is Null

```

The problem here is , whenever I am checking `Temp_Input_Variable IS NOT NULL` , it simply checks for the value of is variable is not null , which is right.

But instead of this , I want to use value of this variable as New variable and not null should be applied on that.

So `Temp_Input_Variable IS NOT NULL` should be considered as `p_Input1 IS NOT NULL` Not Like `'p_Input1' IS NOT NULL`

All this to perform all this operations in loop & avoid repeat work/code.

Please Suggest.

**Update :**
Thanks for suggestions.

I have around ~30 inputs & may change in future.

So what I am looking for is to call through loop like `Work(P_InputN)` instead of calling `Work(p_Input1)` `Work(P_Input2)` and so on.

Even though working of code will be same , but what I personally think that code with loop is good for look & feel.