Most airline websites will allow you to choose the class per segment. United makes this very simple. Just perform a standard economy fare search and they will automatically include PE and J into the search results as options. You can mix and match as you see fit. Also note that there may be a significant fare depending on which segment is in J and Y for the same dates/flights (J on east flight and Y on west flight may be cheaper than Y on east flight and J on west flight). Kayak also allows you to select the class for each segment.