Solenoid overheating power supply

We have used a power supply consisting of a lm338 to power our solenoids but it keeps overheating. We measured the current and it is using 700mA. We cant figure out the problem. We are using a two cylinder configuration.