How to return the Enum value

How to return the Enum value i try many its show error plz tell how return by display methos i try to return it directly but not use. [Moved from title by moderator]

display PurchaseBy PurchByShow()
{
PurchLine purchline;
VendPackingSlipJour vendpackingslipjour;
VendPackingSlipTrans vendpackingsliptrans;
str enumval;
//ttsBegin;

select PurchaseBy from purchline
 join vendpackingslipjour
 join vendpackingsliptrans
 where purchline.PurchId == vendpackingslipjour.PurchId
 && vendpackingslipjour.PackingSlipId == vendpackingsliptrans.PackingSlipId;

enumval = enum2Str(PurchaseBy purchline.PurchaseBy);

return enumval;
}

It seems there are compile errors in code.
enumval = enum2Str(PurchaseBy purchline.PurchaseBy);
The select statement is not correct, you have just joined the tables.
What are you really trying to do and where you have created this method?
where do you want to show the outcome of this method?