Pam, a shift cable (sometimes called "Morse" cable after one company that makes them) is really just a heavier version of a bicycle brake cable. There's a proper name for these but I have no memory of it.
If the inner cable failed...in theory yes it can be replaced or spliced or just moved down if there's enough slack to pull down from the other end. In practice, if it is old enough to fail it is quicker and simpler to replace the whole thing, and if you have a throttle cable of the same vintage, replace them both while you are there.
If the cable is intact but the outer jacket sheared, that can literally be epoxied back in place, the outer jacket just serves as a guide to constrain the inner cable. But again, I'd say time to replace it, not mess around.
Common sense and simple hand tools are all you need. The length does not have to be exactly the same, just close enough so you don't have extra cable slopping all over. The hard part of usually finding cables with the exact same end fittings, if you can take digital pictures and measure to compare them and make sure they are right. Or, close enough to work.