When a floor or table lamp starts to flicker or fails to light when its switch is turned on, the first thing to do is check the bulb. Unscrew the bulb and try it in a lamp or wall fixture you know is working.

If the bulb lights, replace it in the original lamp and check the source of power - make sure the fuse has not blown, and if the outlet is controlled by a wall switch, make sure the switch is on. If these check out all right, unplug the lamp and plug in another portable light or appliance you have seen working in a different outlet to see if it works in this outlet. If it does, you know the outlet is working and the trouble is in some part of the lamp's wiring.

Plug the lamp back, in turn the switch on, then wiggle the plug around in the outlet to see if this causes the light to flicker on. If it does, the plug is making poor contact in the wall receptacle. In most cases this can be cured by bending the prongs apart slightly, but on plugs that have prongs made of a doubled-over strip of metal, the best method is to insert a knife blade and spread the two leaves of metal apart slightly, as illustrated. This will insure a tighter grip in the wall outlet.

If wiggling the plug around in the outlet brings no response, try wiggling the electric cord around while pushing it in and out slightly (next to the plug) to see if this causes the light to flicker or blink. It it does either the cord or the plug, or both, need replacing. If either the cord or the plug are cracked or frayed, there is a good chance both should be replaced.

Replacing a lamp cord involves taking the lamp socket apart, because the cord usually runs in one continuous length from plug to socket. On most lamps the switch is incorporated in the socket, but on some there may be a separate switch at the base of the lamp through which one of the wires goes first. It is also necessary to take the socket aprt for removal if the trouble is in the socket itself, so the procedure to be followed will be the same.

First, remove the plug from the wall so there is no danger of getting a shock. Next, unscrew the bulb, remove the lamp shade, then remove the harp that supports the shade if ther is one. Most harps are removable by squeezing the two legs together so they can be lifted off, but some have small nuts near the bottom that must be unscrewed first.

To take a typical lamp socket apart, first press with your thumb next to the switch where the word "press" should be embossed in the brass outer shell (the upper half of the socket). Press while the fingers are wrapped around the entire socket, then wiggle the upper half back and forth until the top snaps out of the cap, which will remain secured to the lamp.

Now slide the upper half off over the top and put it aside. Nnot that there is a cardboard lining (which serves as insulation) inside the brass shell. This may have come off with the upper half and still be inside, but if it isn't, slide it off also. This will expose the terminal screws on the socket base, to which the electrical wires are attached.

The socket base can be lifted up slightly so the terminal screws can be loosened easily and the wires disconnected. The cap or bottom part of the socket is normally threaded onto the upper end of a small-diameter pipe which projects up through the center of the lamp (the wires run up through this pipe or tube), and the cap can normally be left in place - unless you are planning to change the entire socket.

After the wire ends are loosened from the terminal screws you can pull the wire through the bottom of the base to remove it. But before doing this, tie a strong length of string to the end of the wire so the string will be pulled through with it. This string can then be tied to the end of the new wire and used to pull it back up through the lamp.

After the new wire has been pulled up through the lamp's base and up through the cap, the two ends should be bared (insulation stripped off) for a distance of about one-half inch, using a sharp knife or electrician's stripping tool, and the wire strands twisted together tightly. Wrap each wire clockwise around one of the terminal screws where the original wires were removed and then tighten each screw securely.

Now you can reassemble the socket by reversing the procedure followed when disassembling it. Push the socket base down into the cap, then slide the cardboard liner in place over it. Finish by pressing the brass upper half of the socket down over the liner until it snaps into position in the cap.

If the socket itself has to be changed - because the switch is defective, or the socket is broken or corroded - follow the steps outlined above for taking the socket apart and disconnecting the wires. However, after this the cap for the old socket must be removed as well.

These caps are normally screwed onto the top of the pipe that projects from the lamp's base, so to remove the cap, unscrew it by turning counterclockwise. First check to see if there is a little set screw that locks it in place on one side near the bottom. If there is, this must be loosened first. Also, to unscrew the cap you may have to hold the pipe to which it is attached to keep it from turning - and this may make it necessary to cut or remove the felt at the bottom so you can get a grip and the pipe near the base.

After the old cap is off, take the new lamp socket apart and screw the new cap on in place of the old one. Then connect the wires to the terminals on the new base, and reassemble the socket as previously described.