I am updating the PV1 segment with values from the database but when I get two values back I dont know how to separate them with a tilde and insert. Any advice for me on that?
so if I get two values returned
my PV1.7 segment should be :
My current code is as below: It works fine for one value, but when there are more than 2 values returned I need to find a way to include it
Set res=##class(%ResultSet).%New("%DynamicQueryGW:SQLGW")
Set sc=res.Prepare(sqlstring,,conn)
Set sc=res.Execute()
while res.Next()
{
s RET = res.GetData(2)
}
s sc=res.Close()
Set sc=conn.Disconnect()
/

.png)
339


