Get the element in a set for a given index

Is it possible to get the element of a set for a given index?

I would like to take this minimum: x(k) = min{j: y(j) >= k}

Sets
 k /k1, k2/
 j /j1, j2/;
 
Parameter 
y(j)
aux
x(k);

loop(k,
    aux = smin(j$(y(j) ge ord(k)), y(j));
    x(k)=smin(j$(y(j)=aux), ord(j));
);

But this returns x(k1)=1 and x(k2) = 2, which I suppose are the indices for j1 and j2. Is there any way to get x(k1)=j1 and x(k2) = j2 ???

Thanks

GAMS parameters have numerical values, not indexes. Such constructs are done with multidimensional (dynamic) sets, like this:

Sets
 k /k1, k2/
 j /j1, j2/;
 
Parameter 
y(j) / j1 1, j2 2 /,aux,cont;
set x(k,j);
loop(k,
    aux = smin(j$(y(j) ge ord(k)), y(j));
    cont=1; loop(j$(y(j)=aux), x(k,j) = yes; cont=0);
);
display x;

-Michael

Great, thanks!