Thanks mister_e & Melanie,

I use SELECT CASE comands and it works much better.
What about my first question?

HSERIN 500,MAIN,[WAIT(A), STR SERDATA\17]
The A is a byte.It is the start byte,an address of the stream that follows.I can change the A(byte) variable dit per bit.
What I want is while I have set the A after I want to read a stream which begins with A.
but this is not working.
HSERIN 500,MAIN,[WAIT(A), STR SERDATA\17]

If I change to WAIT("A") the pic search to read the A ASCII not the A that I have set manual.

Please help me
Thanks
NIKOS
HELLAS