Looks like a secondary drain line. Check your main drain line to see if it's clogged.
The unit is built in the attic on the second floor.The main drain line might run down a side wall and terminate just above the ground or it could be directed into a rain gutter on the house which you might not be able to easily see from the ground. The secondary drain line which is what is probably in the picture is the emergency overflow and will have water coming from it if there is a problem with the system or the main drain line is clogged. The emergency drain line is generally placed like yours over a window where it will be easily seen. Sometimes (lousy installation) the emergency drain line will be tied into the main drain line. Find the main drain line and check for blockages. The system may possibly have a problem which has caused the emergency overflow.
Could the clog be cleared from the drain line shown in photo? Assuming that is the secondary/emergency drain line.
The unit is built in the attic on the second floor.
No, you have to clean each line separately. You generally go from the inside coil and run some bleach, and/or blow with air. I suppose you could also ream them out with a flexible wire if you had to. Sometimes the installer will leave you a tee and a removeable cap to get access. Sometimes not and the line has to be disconnected. If you haven't even looked up there to see what you have by now it is probably best to do as noted above and get a pro in. This isn't rocket science but the access and working conditions in an attic can be difficult.
Yes it was, you just didn't notice.It did not drip when cold ac was ON before.
What clog?Could the clog be cleared from the drain line shown in photo?
Yes it was, you just didn't notice.
If the cold is working, it will produce condensation.
What clog?
You wrote that water was coming out of the pipe --- that's what its supposed to do.
It would be a problem if water was NOT coming out of the condensate drain.
Shopvac at the far end of the primary drain. If you can't find it, use a pressurized air cleaning can at the cleanout next to the air handler. (the type you can buy at electronic stores.) Use a rag to seal around the nozzle and pipe. A Shopvac there helps but isn't nearly as effective.what are exact names of tools that I can use to clean from the attic? How do I blow air?
and I have to clean the secondary line too?