Hi Bisnonni...
Is the pipe accessible from the basement?? If so, just need to turn off the gas supply, cut the pipe in basement and remove the pipe back to the nearest elbow.
Then you will drill a 1" hole in the floor in an area that will accept the new pipe/shutoff and a flexible gas connector.
Home depot, lowes or menards all sell precut/prethreaded
pipe nipples, the fittings, the shutoff, the flexible connector and the
pipe sealant (non-teflon based) that you will need.
To
test your gas piping you can shut off the shutoff to the stove and then pump air (10-15 P.S.I.) into the pipes leading to the stove to be sure no leaks...be sure the flexible connector is disconnected and capped for the test!
If you only install a couple joints and are sure they tighten up well, no need to test!
Don't forget to install the
anti-tip device! Finally, you could also open up the wall at the nipple upstairs and turn it down, attach a coupling and run a pipe down to where it can stub out of the wall and be connected to a flexible connector....
Let me know if you have other questions.