RE: cutting 4-40 thread
I've cut threads in 2-56 and 4-40 rod, using the appropriate die. The threads aren't quite as deep as the rolled threads, but hold just fine. Just clamp the rod in a vise or hold it with vise-grips, and take your time, The rod will try to twist as the die turns, just advance a short way, then back up, advance some more, repeat until you have the length of threads you want.