Again thanks for the tips.
Finally I got the expected results, but first I needed to handle a SQLVAR_MAX_ROWS limitation.
See below
Made a new script;
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
:SET &MY_RUN_ID# = &$RUNID#
:SET &MY_RUN_ID# = FORMAT(&MY_RUN_ID#)
:SET &tmpvar# = "999"
:SET &tel# = 0
:PRINT "Original runid : &$RUNID#"
:PRINT " My runid : &MY_RUN_ID#"
!VARA.SQLI_TEST_EV = select * from EV
:SET &HND#=PREP_PROCESS_VAR(VARA.SQLI_TEST_EV)
:PROCESS &HND#
: SET &RUN_ID1# = GET_PROCESS_LINE(&HND#,1)
: SET &tel# = &tel# + 1
: IF &RUN_ID1# <> &tmpvar#
: PRINT "Run1 : &RUN_ID1#"
: SET &tmpvar# = &RUN_ID1#
: ENDIF
: IF &RUN_ID1# = &MY_RUN_ID#
: SET &VAR_NAME# = GET_PROCESS_LINE(&HND#,3)
: SET &VAR_VALUE# = GET_PROCESS_LINE(&HND#,4)
: PRINT "&RUN_ID1# &VAR_NAME# &VAR_VALUE#"
: ENDIF
:ENDPROCESS
:PRINT "Number of records : &tel#"
:CLOSE_PROCESS &HND#
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
The output ....
2017-03-28 09:09:53 - U00020206 Variable '&EXT_VAR1' was stored with value 'One'.
2017-03-28 09:09:53 - U00020206 Variable '&EXT_VAR2' was stored with value 'Two'.
2017-03-28 09:09:53 - U00020408 Original runid : 0001080152
2017-03-28 09:09:53 - U00020408 My runid : 1080152
2017-03-28 09:09:53 - U00020408 Run1 : 1080053
2017-03-28 09:09:53 - U00020408 Run1 : 1080054
2017-03-28 09:09:53 - U00020408 Run1 : 1080055
2017-03-28 09:09:53 - U00020408 Run1 : 1080056
2017-03-28 09:09:53 - U00020408 Run1 : 1080058
2017-03-28 09:09:53 - U00020408 Number of records : 0000000000000200
Looking at the count of records it stops after 200 records. !!
A select count(*) from EV returns over 7000 records.
Once I changed the query in VARA.SQLI_TEST_EV as; select * from EV order by ev_ah_idnr desc
The output is giving me the expected result :)
2017-03-28 09:26:11 - U00020206 Variable '&EXT_VAR1' was stored with value 'One'.
2017-03-28 09:26:11 - U00020206 Variable '&EXT_VAR2' was stored with value 'Two'.
2017-03-28 09:26:11 - U00020408 Original runid : 0001084370
2017-03-28 09:26:11 - U00020408 My runid : 1084370
2017-03-28 09:26:11 - U00020408 Run1 : 1084370
2017-03-28 09:26:11 - U00020408 1084370 &EXT_VAR2 Two
2017-03-28 09:26:11 - U00020408 1084370 &EXT_VAR1 One
2017-03-28 09:26:11 - U00020408 Run1 : 1084259
2017-03-28 09:26:11 - U00020408 Run1 : 1084258
2017-03-28 09:26:11 - U00020408 Run1 : 1084257
2017-03-28 09:26:11 - U00020408 Run1 : 1084256
2017-03-28 09:26:11 - U00020408 Run1 : 1084255
2017-03-28 09:26:11 - U00020408 Run1 : 1084151
2017-03-28 09:26:11 - U00020408 Number of records : 0000000000000200
Found this 'limitation' is set in SQLVAR_MAX_ROWS (default 200)
Thanks all for helping me