26 January 2012

SQL Loader Utility handling Multi Byte chars



Situation
We had erroneous data after loading with SQL Loader.
Settings
Database created with
CHARACTER SET "UTF8"
NATIONAL CHARACTER SET "WE8ISO8859P1"
NLS_LANGUAGE = AMERICAN
NLS_TERRITORY = AMERICA
Example
Create a test table with
CONNECT scott/tiger;
DROP TABLE LOADER_TEST;
CREATE TABLE LOADER_TEST (
   USR_ID          NUMBER NOT NULL ,
   USR_NAME        VARCHAR2(50) ,
   USR_LNK_NAME    VARCHAR2(50) ,
   USR_LNK_ORDER   NUMBER
);

·         Case 1
Client (Win 2000)
NLS_LANG=AMERICAN_AMERICA.UTF8
Controlfile (ctrl.txt)
LOAD DATA
CHARACTERSET UTF8
INFILE *
REPLACE INTO TABLE LOADER_TEST
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS (
   USR_ID         INTEGER EXTERNAL,
   USR_NAME       CHAR(50),
   USR_LNK_NAME   CHAR(50),
   USR_LNK_ORDER  INTEGER EXTERNAL
)
BEGINDATA
1;Santé bien;http://www.vaud-sante.ch;3
2;Santé;http://www.vaud-sante.ch;4
3;Alle à gessa;http://www.gessa.com/now;2
4;Alle à;http://www.gessa.com/now;1
5;Gägs;http://www.gaegs.ch;5
6;Gägs ä;http://www.gaegs.ch;6
Invoke sqlldr
sqlldr userid=scott/tiger control=ctrl.txt
Result
column usr_id format 99 heading "Id"
column USR_NAME format a32 heading "Name"
column USR_LNK_NAME format a26 heading "Link"
column USR_LNK_ORDER format 99 heading "Ord"
select * from loader_test;
Id Name                             Link                      Ord
-- -------------------------------- ------------------------- ---
 1 Santé bien                       http://www.vaud-sante.ch    3
 2 Santé;http://www.vaud-sante.ch/   4
 3 Alle à gessa                     http://www.gessa.com/now    2
 4 Alle à;http://www.gessa.com/now  1
 5 Gägs                             http://www.gaegs.ch         5
 6 Gägs ä;http://www.gaegs.ch/        6
For the records 2,4,6 where a special character is prior to the delimiter, the SQL Loader does not see the delimiter.

·         Case 2
Change the control file (ctrl.txt) to
CHARACTERSET WE8ISO8859P1
Reload the data and select the LOADER_TEST table again
Id Name                             Link                      Ord
-- -------------------------------- ------------------------- ---
 1 Santé bien                      http://www.vaud-sante.ch    3
 2 Santé                            http://www.vaud-sante.ch    4
 3 Alle à gessa                    http://www.gessa.com/now    2
 4 Alle à                          http://www.gessa.com/now    1
 5 Gägs                             http://www.gaegs.ch         5
 6 Gägs ä                         http://www.gaegs.ch         6
Now, SQL Loader recognises all delimiters, but data seems to be corrupted.

·         Case 3
Change the client environment to
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
Reselect data - now the result is now correct !
 Id Name                           Link                       Ord
--- ------------------------------ -------------------------- ---
  1 Santé bien                     http://www.vaud-sante.ch     3
  2 Santé                          http://www.vaud-sante.ch     4
  3 Alle à gessa                   http://www.gessa.com/now     2
  4 Alle à                         http://www.gessa.com/now     1
  5 Gägs                           http://www.gaegs.ch          5
  6 Gägs ä                         http://www.gaegs.ch          6
Conclusion
Running client tools (e.g. SQL Loader, SQL Plus) against a database with UTF8 character set, you must assign WE8ISO8859P1 to NLS_LANG for the client tools due to prober data representation. That means a correct characterset conversion will take place within SQL Net and Net8 respectively.

21 January 2012

Who is most likely to develop a boil?


Anyone can develop a boil. However, people with certain illnesses or medications that impair the body's immune system (the natural defense system against foreign materials or microbes) are more likely to develop boils. Among the illnesses that can be associated with impaired immune systems are diabetes and kidney failure. Diseases, where there is inadequate antibody production (such as hypogammaglobulinemia), that are associated with deficiencies in the normal immune system can increase the tendency to develop boils.

Many medications can suppress the normal immune system and increase the risk of developing boils. These medications include cortisone medications (prednisone [Deltasone, Liquid Pred] and prednisolone [Pediapred Oral Liquid, Medrol]) and medications used for cancer chemotherapy.


What is the treatment for a boil?

Home treatment is an option for most simple boils. Ideally, treatment should begin as soon as a boil is noticed since early treatment may prevent later complications.

The primary home remedy for most boils is heat application, usually with hot soaks or hot packs. Heat application increases the circulation to the area and allows the body to better fight off the infection by bringing antibodies and white blood cells to the site of infection.

As long as the boil is small and firm, opening the area and draining the boil is not helpful, even if the area is painful. However, once the boil becomes soft or "forms a head" (that is, a small pustule is noted in the boil), it can be ready to drain. Once drained, pain relief can be dramatic. Most small boils, such as those that form around hairs, drain on their own with hot soaks. On occasion, and especially with larger boils, medical treatment is required. In this situation, the boil will need to be drained or "lanced" by a health-care practitioner. Frequently, these larger boils contain several pockets of pus that must be opened and drained.

Antibiotics are often used to eliminate any accompanying bacterial infection, especially if there is an infection of the surrounding skin. However, antibiotics are not needed in every situation. In fact, antibiotics have difficulty penetrating the outer wall of an abscess well and often will not cure an abscess without additional surgical drainage.

When should I seek medical attention?

While boils typically resolve on their own and therefore have an excellent prognosis, there are special cases in which medical care should be sought when boils develop. Rarely, boils may spread or persist, leading to more widespread infections.

Any boil or abscess in a patient with diabetes or a patient with an underlying illness that can be associated with a weakened immune system (such as cancer, rheumatoid arthritis, etc.) should be evaluated by a health-care practitioner. Additionally, many medicines, especially prednisone, that suppress the immune system (the natural infection-fighting system of the body) can complicate what would be an otherwise simple boil. Those who are taking such medications should consult their health-care practitioner if they develop boils. (If you are not sure about your medications' effects on the immune system, your pharmacist may be able to explain to you which medicines to be concerned about.)

Any boil that is associated with a fever should receive medical attention. Increasing reddening of the nearby skin and/or formation of red streaks on the skin, the failure of a boil to "form a head," and the development of multiple boils are other symptoms that warrant a visit to a health-care practitioner.

A "pilonidal cyst," a boil that occurs between the buttocks, is a special case. These almost always require medical treatment, including drainage and packing (putting gauze in the opened abscess to assure it continues to drain). Finally, any painful boil that is not rapidly improving should be seen by a health-care practitioner.


What can be done to prevent boils (abscesses)?

There are some measures that you can take to prevent boils from forming. Good hygiene and the regular use of antibacterial soaps can help to prevent bacteria from building up on the skin. This can reduce the chance for the hair follicles to become infected and prevent the formation of boils. In some situations, your health-care practitioner may recommend special cleansers such as pHisoderm to even further reduce the bacteria on the skin. When the hair follicles on the back of the arms or around the thighs are continually inflamed, regular use of an abrasive brush (loofah brush) in the shower can be used to help break up oil plugs and buildup around hair follicles.

Pilonidal cysts can be prevented by avoiding continuous direct pressure or irritation of the buttock area when a local hair follicle becomes inflamed. At that point, regular soap and hot water cleaning and drying can be helpful.

For acne and hidradenitis suppurativa (see above), topical or oral antibiotics may be required on a long-term basis to prevent recurrent abscess formation. As mentioned above, surgical resection of sweat glands in the involved skin may be necessary. Other medications, such as isotretinoin (Accutane), can be used for cystic acne and have been helpful in some patients with hidradenitis suppurativa. Recurrences are common in patients with hidradenitis suppurativa.

Finally, surgery may occasionally be needed, especially for pilonidal cysts that recur but also for hidradenitis suppurativa. For pilonidal cysts, surgically removing the outer shell of the cyst is important to clear the boil. The procedure is typically performed in the operating room. For hidradenitis suppurativa, extensive involvement can require surgical repair by a plastic surgeon.

Boils At A Glance

A boil, or skin abscess, is a collection of pus that forms in the skin.
Antibiotics alone can be inadequate in treating abscesses.
The primary treatments for boils include hot packs and draining ("lancing") the abscess but only when it is soft and ready to drain.
If you have a fever or long-term illness, such as cancer or diabetes, or are taking medications that suppress the immune system, you should contact your health-care practitioner if you develop a boil (abscess).
There are a number of methods that can be used to reduce the likelihood of developing some forms of boils, but boils are not completely preventable.

Is any kind of alcohol does good for diabetes ?


During one of our friends arguments, one says Brandy good for Diabetic compare other drinks others says no. Here are my findings,


Should people with diabetes drink alcohol? That is a question ask by many diabetics. The answer is you are able to dink alcohol but in moderation. The American Diabetes Association recommends that maximum of 2 drinks a day for man and 1 drink a day for woman. In reality it is going to be better for you to avoid drinking alcohol so that you are not going to have to worry about any complications that may come about. Also, it is really not a good idea mixing alcohol with any kind of medication. People with diabetes should consult their doctor about the use of alcohol with the medications that they are taking.

How Alcohol Affect Diabetes?

Alcohol can make blood glucose too high or too low. Moderate amount of alcohol can cause blood sugar to rise but excess alcohol can actually decrease our blood sugar level even to an unsafe level. When we drink, the alcohol goes from our stomach straight into our blood. Within 30 to 90 minutes after drinking, the alcohol in our bloodstream hit its highest point. It takes our liver about 2 hours to break down one drink. When there is no alcohol in our blood, our liver keeps blood sugar level from going too low by changing stored carbohydrate into glucose, the glucose is then release into our blood. If we drink alcohol faster than our liver can breaks it down, the liver will be busy breaking down alcohol and therefore will not be able to release glucose into our blood. This cause our blood glucose continue to drop and we may end up with very low blood sugar.

Alcohol Consumption Guidelines For Diabetes :

  • Alcohol should only be used if your diabetes is under good control and with your doctor's prescription.
  • Avoid mixing alcohol with any kind of medication - alcohol can interfere the effects of oral diabetes medicines or insulin.
  • Drink not more than 2 drinks per day.
  • Do not drink when your stomach is empty in order to prevent very low blood sugar level.
  • Drink slowly to make sure that you liver have enough time to break down the alcohol.
  • Choose your drinks, select drinks that are lower in alcohol and sugar - dry wine, light beer, or unsweetened liquor (whiskey, brandy, rum, vodka or gin) mixed with plenty of low calorie mixer, club soda or water are better than other alcoholics drinks.
  • Stick with sugar-free mixers such as diet soda, diet tonic, club soda or seltzer for mixed drinks.
  • Always check your blood glucose after you drink to see how alcohol affects you
  • Include alcohol's calories into your daily calorie count.

Drinking Alcohol Effect Diabetes and Raising Blood Sugars?

Small amounts of alcohol will not hinder your control over diabetes but there are some precautions that diabetics should take to make sure that alcohol can be safely enjoyed. If you are diabetic and are currently treated with either tablets or insulin the main risk that you face with consuming alcohol is that alcohol could make you more prone to hypoglycemia. Despite how I feel this morning after getting wasted last night.

Hypoglycemia, which most diabetics already know, is when your blood sugar level drops down to an unsafe level.

The problem is, how is someone going to tell if you are experiencing hypoglycemia or if you are just drunk? Many of the early warning signs of hypoglycemia are mimicked by alcohol. Your friends may not seek help for you until you lose consciousness and maybe not even at that point. Come on, you’ve never seen anybody pass out drunk? Sometimes beer and diabetes don’t mix.

Another problem with a Diabetic consuming alcohol is that if done on a regular basis it can cause you to gain weight. Gaining weight while battling diabetes is pretty much the opposite of what you need to be doing. Weight gain is going to cause a diabetic to lose control over their disease.

Let’s not forget that when you are drunk your judgment could become impaired. This impaired judgment could lead to you eating a whole bunch of things you shouldn’t be eating. Oh, I don’t know, say you’re out on the town and before you know it…last call. Next thing you know you are stumbling into a sub shop that’s open late and stuffing your face with a foot long sub. Not good.

Moderation, awareness and good judgment are key when a diabetic is consuming alcohol. It’s good to remember that just because you may be out having a grand old time doesn’t mean that you are taking a vacation from your diabetes.

You still need to be checking your blood sugar levels and being very aware of any early signs that something is not right.

As for the moderation piece, experts consider a sensible drinking limit to be about 3 alcoholic drinks per day. So 21 per week. Here’s my question: Can you save up all of your daily drinks for consumption on Saturday night?

Drinking Brandy Is Good For Health

Consuming 30 milliliters of brandy per day reportedly has a similar antioxidant potential which a regular dose of vitamin C has, according to researchers belonging to the Monash University. This does not mean that consuming Vitamin C should be given up, but it can continue along with drinking brandy.


Red wine is known to be another source of antioxidant. The arteries are de-sludged by its consumption in addition to it contributing towards preventing strokes and certain types of dementia. The copper from brandy’s distilling process results in the antioxidants being produced, with a better health effect from superior quality brandy. Recent research has revealed that the same health benefits can be derived from whisky also. 

The study was conducted by Dr Steve Langford, a chemist, and Dr Gordon Troup, a physicist. Brandy-infused fruitcake which is consumed during Christmas also has the same effect. As many as seven types of the liquor were tested with an electron spin resonance spectroscopy for imaging antioxidant chemicals and free radicals, and six of them were found to contain antioxidants. The Alcohol in Moderation Digest has published the results of the research. 

Note: I have collected all this information from net, so please be care full before taking any decision based on this article. This is for information purpose.



11 January 2012

Software Development Methodologies(Waterfall, Agile,Iterative,Spiral & Scrum)


Software development methodology is a framework that is used to structure, plan, and control the process of developing an information system - this includes the pre-definition of specific deliverables and artifacts that are created and completed by a project team to develop or maintain an application.



A wide variety of such frameworks have evolved over the years, each with its own recognized strengths and weaknesses. One software development methodology framework is not necessarily suitable for use by all projects. Each of the available methodology frameworks are best suited to specific kinds of projects, based on various technical, organizational, project and team considerations



Every software development methodology framework acts as a basis for applying specific approaches to develop and maintain software. Several software development approaches have been used since the origin of information technology.

Waterfall development

The Waterfall model is a sequential development approach, in which development is seen as flowing steadily downwards (like a waterfall) through the phases of requirements analysis, design, implementation, testing (validation), integration, and maintenance. The first formal description of the method is often cited as an article published by Winston W. Royce in 1970

• Project is divided into sequential phases, with some overlap and splashback acceptable between phases.

• Emphasis is on planning, time schedules, target dates, budgets and implementation of an entire system at one time.

• Tight control is maintained over the life of the project via extensive written documentation, formal reviews, and approval/signoff by the user and information technology management occurring at the end of most phases before beginning the next phase.



Pitfalls of Waterfall model:

This model does not suitable for non-trivial project to finish a phase of a software product's lifecycle perfectly before moving to the next phases and learning from them.

Designers may not be aware of future implementation difficulties when writing a design for an unimplemented software product which result

Agile Development

Agile software development is a group of software development methodologies based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. It promotes adaptive planning, evolutionary development and delivery, a time-boxed iterative approach, and encourages rapid and flexible response to change. It is a conceptual framework that promotes foreseen interactions throughout the development cycle.


Agile methods break tasks into small increments with minimal planning and do not directly involve long-term planning. Iterations are short time frames (timeboxes) that typically last from one to four weeks. Each iteration involves a team working through a full software development cycle, including planning, requirements analysis, design, coding, unit testing, and acceptance testing when a working product is demonstrated to stakeholders. This minimizes overall risk and allows the project to adapt to changes quickly. Stakeholders produce documentation as required. Iteration might not add enough functionality to warrant a market release, but the goal is to have an available release (with minimal bugs) at the end of each iteration. Multiple iterations might be required to release a product or new features.

Team composition in an agile project is usually cross-functional and self-organizing, without consideration for any existing corporate hierarchy or the corporate roles of team members. Team members normally take responsibility for tasks that deliver the functionality iteration requires. They decide individually how to meet iteration’s requirements.

Agile methods emphasize face-to-face communication over written documents when the team is all in the same location. Most agile teams work in a single open office (called a bullpen), which facilitates such communication. Team size is typically small (5-9 people) to simplify team communication and team collaboration. Larger development efforts can be delivered by multiple teams working toward a common goal or on different parts of an effort. This might require a coordination of priorities across teams. When a team works in different locations, they maintain daily contact through videoconferencing, voice, e-mail, etc.





Pitfalls of Agile Model:

An agile software development method is that it is developer-centric rather than user-centric. Agile software development focuses on processes for getting requirements and developing code and does not focus on product design.

Iterative and incremental development

Iterative and Incremental development is at the heart of a cyclic software development process developed in response to the weaknesses of the waterfall model. It starts with an initial planning and ends with deployment with the cyclic interactions in between.

Incremental development slices the system functionality into increments (portions). In each increment, a slice of functionality is delivered through cross-discipline work, from the requirements to the deployment. The unified process groups increments/iterations into phases: inception, elaboration, construction, and transition.



• Inception identifies project scope, risks, and requirements (functional and non-functional) at a high level but in enough detail that work can be estimated.

• Elaboration delivers a working architecture that mitigates the top risks and fulfills the non-functional requirements.

• Construction incrementally fills-in the architecture with production-ready code produced from analysis, design, implementation, and testing of the functional requirements.

• Transition delivers the system into the production operating environment.



Each of the phases may be divided into 1 or more iterations, which are usually time-boxed rather than feature-boxed. Architects and analysts work one iteration ahead of developers and testers to keep their work-product backlog full.

How Agile methodology differ from Iterative

Most agile methods share iterative development's emphasis on building releasable software in short time periods. Agile methods differ from iterative methods in that their time period is measured in weeks rather than months. Most agile methods also differ by treating their time period as a strict timebox.

Spiral development

The spiral model is a software development process combining elements of both design and prototyping-in-stages, in an effort to combine advantages of top-down and bottom-up concepts. It is a meta-model, a model that can be used by other models.



The basic principles are:

• Focus is on risk assessment and on minimizing project risk by breaking a project into smaller segments and providing more ease-of-change during the development process, as well as providing the opportunity to evaluate risks and weigh consideration of project continuation throughout the life cycle.

• "Each cycle involves a progression through the same sequence of steps, for each part of the product and for each of its levels of elaboration, from an overall concept-of-operation document down to the coding of each individual program."

• Each trip around the spiral traverses four basic quadrants: determine objectives, alternatives, and constraints of the iteration; evaluate alternatives; Identify and resolve risks; develop and verify deliverables from the iteration; and plan the next iteration.

• Begin each cycle with an identification of stakeholders and their win conditions, and end each cycle with review and commitment.

Scrum Methodology

Scrum is an iterative, incremental framework for project management often seen in agile software development, a type of software engineering.

Sprint

A sprint is the basic unit of development in Scrum. Sprints tend to last between one week and one month, and are a "timeboxed" (i.e. restricted to a specific duration) effort of a constant length. Each sprint is preceded by a planning meeting, where the tasks for the sprint are identified and an estimated commitment for the sprint goal is made, and followed by a review or retrospective meeting, where the progress is reviewed and lessons for the next sprint are identified. During each sprint, the team creates a potentially deliverable product increment.

Scrum enables the creation of self-organizing teams by encouraging co-location of all team members, and verbal communication between all team members and disciplines in the project.



Scrum teams consist of three core roles and a range of ancillary roles

Core roles

The core roles in Scrum teams are those committed to the project in the Scrum process—they are the ones producing the product (objective of the project).

Product Owner

The Product Owner represents the voice of the customer and is accountable for ensuring that the Team delivers value to the business. The Product Owner writes customer-centric items (typically user stories), prioritizes them, and adds them to the product backlog. Scrum teams should have one Product Owner, and while they may also be a member of the Development Team, it is recommended that this role not be combined with that of ScrumMaster.

Team

The Team is responsible for delivering the product. A Team is typically made up of 5–9 people with cross-functional skills who do the actual work (analyse, design, develop, test, technical communication, document, etc.). It is recommended that the Team be self-organizing and self-led, but often work with some form of project or team management.

ScrumMaster

Scrum is facilitated by a ScrumMaster, also written as Scrum Master, who is accountable for removing impediments to the ability of the team to deliver the sprint goal/deliverables. The ScrumMaster is not the team leader but acts as a buffer between the team and any distracting influences. The ScrumMaster ensures that the Scrum process is used as intended. The ScrumMaster is the enforcer of rules. A key part of the ScrumMaster’s role is to protect the team and keep them focused on the tasks at hand. The role has also been referred to as a servant-leader to reinforce these dual perspectives.

Ancillary roles

The ancillary roles in Scrum teams are those with no formal role and infrequent involvement in the Scrum process—but nonetheless, must be taken into account.

Stakeholders (customers, vendors)

These are the people who enable the project and for whom the project will produce the agreed-upon benefit[s], which justify its production. They are only directly involved in the process during the sprint reviews.

Managers (including Project Managers)

People who will set up the environment for product development.

03 January 2012

How to set the completion Status of Concurrent Program in Oracle Apps (Unix)

Many times users wants to control the status of concurrent program, specially in unix it is difficult to complete the program in warning status. Following code snippet will be useful programmers who wants to set the concurrent program status.

In generally,
For PL/SQL program status is controlled by retcode, if retcode is 0 for sucessful completion, 2 for error and 1 for warning.

Same in Unix, exit 1 indicates error and exit 0 indicates successful completion but for warning you don't have direct way. In those cases we need to use following function.


################################################################################

This function sets the completion status

################################################################################
set_completion_status(){count_status=`sqlplus -s << EOSQL
$APPSLOGIN
WHENEVER SQLERROR EXIT SQL.SQLCODE
SET HEADING OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET LINESI 100
SET PAGESI 0
SELECT COUNT(1)
FROM ikncu.RAC_FUTURE_ACK_TEMP
WHERE process_flag IN ('ERROR')
AND po_request_id = $FCP_REQID;
EXIT EOSQL`

sqlplus -s << EOSQL
$APPSLOGIN WHENEVER SQLERROR EXIT SQL.SQLCODE
SET FEEDBACK OFF DECLARE l_stat BOOLEAN;
l_session_id NUMBER;
BEGIN
fnd_global.initialize(session_id => l_session_id
, user_id => fnd_global.user_id
, resp_id => fnd_global.resp_id
, resp_appl_id => fnd_global.resp_appl_id
, security_group_id => null
, site_id => null
, login_id => null
, conc_login_id => null
, prog_appl_id => null
, conc_program_id => null
, conc_request_id => $FCP_REQID
, conc_priority_request => null);
IF($count_status = 0)THEN
ci_utility_pkg.spool('inside if block');
l_stat :=
fnd_concurrent.set_completion_status('NORMAL','Normal Completion. Review log for details.');
ci_utility_pkg.spool($count_status);
ELSE
l_stat := fnd_concurrent.set_completion_status('WARNING','Completed in Warning. Review log for details.');
ci_utility_pkg.spool($count_status);
END IF;
COMMIT;
END;
/
EXIT;
EOSQL
}

30 December 2011

Che Guevara ...Leader of Mass and Poor in Cuba.

Oflate many people might have come across this person picture in many tollywood films. His face, hair style and Cap is quite unique and easily takes your attentions. In fact i was also one person among them.




First and for most thing i have asked myself, who is this person. By looks he seems to be revolution leader but unfortunately I never come across his picture in any indian history books. Intresting many films where they have used his picture never bothered to tell audiance about him. One move they have used his picture as background for some college day song, in another movie hero is wearing a t-shirt which has his pic, one movie hero himself dressed up like him. Then i decided lets find out who is this. Here are my findings, in short he is great revolution leader of Cuba.



Biography of Che Guevara.


More details you can find at : http://en.wikipedia.org/wiki/Che_Guevara


Ernesto (Che) Guevara was born in Rosario in Argentine in 1928. After studying medicine at the University of Buenos Aires he worked as a doctor. While in Guatemala in 1954 he witnessed the socialist government of President Jacobo Arbenz overthrown by an American backed military coup. Disgusted by what he saw, Guevara decided to join the Cuban revolutionary, Fidel Castro, in Mexico.

In 1956 Guevara, Castro and eighty other men and women arrived in Cuba in an attempt to overthrow the government of General Fulgencio Batista. This group became known as the July 26 Movement. The plan was to set up their base in the Sierra Maestra mountains. On the way to the mountains they were attacked by government troops. By the time they reached the Sierra Maestra there were only sixteen men left with twelve weapons between them. For the next few months Castro's guerrilla army raided isolated army garrisons and were gradually able to build-up their stock of weapons.

When the guerrillas took control of territory they redistributed the land amongst the peasants. In return, the peasants helped the guerrillas against Batista's soldiers. In some cases the peasants also joined Castro's army, as did students from the cities and occasionally Catholic priests.

In an effort to find out information about the rebels people were pulled in for questioning. Many innocent people were tortured. Suspects, including children, were publicly executed and then left hanging in the streets for several days as a warning to others who were considering joining the revolutionaries. The behaviour of Batista's forces increased support for the guerrillas. In 1958 forty-five organizations signed an open letter supporting the July 26 Movement. National bodies representing lawyers, architects, dentists, accountants and social workers were amongst those who signed. Castro, who had originally relied on the support of the poor, was now gaining the backing of the influential middle classes.





General Fulgencio Batista responded to this by sending more troops to the Sierra Maestra. He now had 10,000 men hunting for Castro and his 300-strong army. Although outnumbered, Castro's guerrillas were able to inflict defeat after defeat on the government's troops. In the summer of 1958 over a thousand of Batista's soldiers were killed or wounded and many more were captured. Unlike Batista's soldiers, Castro's troops had developed a reputation for behaving well towards prisoners. This encouraged Batista's troops to surrender to Castro when things went badly in battle. Complete military units began to join the guerrillas.

The United States supplied Batista with planes, ships and tanks, but the advantage of using the latest technology such as napalm failed to win them victory against the guerrillas. In March 1958, President Dwight Eisenhower, disillusioned with Batista's performance, suggested he held elections. This he did, but the people showed their dissatisfaction with his government by refusing to vote. Over 75 per cent of the voters in the capital Havana boycotted the polls. In some areas, such as Santiago, it was as high as 98 per cent.

Fidel Castro was now confident he could beat Batista in a head-on battle. Leaving the Sierra Maestra mountains, Castro's troops began to march on the main towns. After consultations with the United States government, Batista decided to flee the country. Senior Generals left behind attempted to set up another military government. Castro's reaction was to call for a general strike. The workers came out on strike and the military were forced to accept the people's desire for change. Castro marched into Havana on January 9,1959, and became Cuba's new leader.

In its first hundred days in office Castro's government passed several new laws. Rents were cut by up to 50 per cent for low wage earners; property owned by Fulgencio Batista and his ministers was confiscated; the telephone company was nationalized and the rates were reduced by 50 per cent; land was redistributed amongst the peasants (including the land owned by the Castro family); separate facilities for blacks and whites (swimming pools, beaches, hotels, cemeteries etc.) were abolished.

In 1960 Guevara visited China and the Soviet Union. On his return he wrote two books Guerrilla Warfare and Reminiscences of the Cuban Revolutionary War. In these books he argued that it was possible to export Cuba's revolution to other South American countries. Guevara served as Minister for Industries (1961-65) but in April 1965 he resigned and become a guerrilla leader in Bolivia.

In 1967 David Morales recruited Félix Rodríguez to train and head a team that would attempt to catch Che Guevara. Guevara was attempting to persuade the tin-miners living in poverty to join his revolutionary army. When Guevara was captured, it was Rodriguez who interrogated him before he ordered his execution in October, 1967. Rodriguez still possesses Guevara’s Rolex watch that he took as a trophy.

22 December 2011

Short Introduction on Trading (Specific to Indian Stock Market)

To learn more about how you can earn on the stock market, one has to understand how it works. A person desirous of buying/selling shares in the market has to first place his order with a broker. When the buy order of the shares is communicated to the broker he routes the order through his system to the exchange. The order stays in the queue exchange's systems and gets executed when the order logs on to the system within buy limit that has been specified. The shares purchased will be sent to the purchaser by the broker either in physical or demat format


Indian Stock Market Overview.

The Bombay Stock Exchange (BSE) and the National Stock Exchange of India Ltd (NSE) are the two primary exchanges in India. In addition, there are 22 Regional Stock Exchanges. However, the BSE and NSE have established themselves as the two leading exchanges and account for about 80 per cent of the equity volume traded in India. The NSE and BSE are equal in size in terms of daily traded volume. The average daily turnover at the exchanges has increased from Rs 851 crore in 1997-98 to Rs 1,284 crore in 1998-99 and further to Rs 2,273 crore in 1999-2000 (April - August 1999). NSE has around 1500 shares listed with a total market capitalization of around Rs 9,21,500 crore (Rs 9215-bln). The BSE has over 6000 stocks listed and has a market capitalization of around Rs 9,68,000 crore (Rs 9680-bln). Most key stocks are traded on both the exchanges and hence the investor could buy them on either exchange. Both exchanges have a different settlement cycle, which allows investors to shift their positions on the bourses. The primary index of BSE is BSE Sensex comprising 30 stocks. NSE has the S&P NSE 50 Index (Nifty) which consists of fifty stocks. The BSE Sensex is the older and more widely followed index. Both these indices are calculated on the basis of market capitalization and contain the heavily traded shares from key sectors. The markets are closed on Saturdays and Sundays. Both the exchanges have switched over from the open outcry trading system to a fully automated computerized mode of trading known as BOLT (BSE On Line Trading) and NEAT (National Exchange Automated Trading) System. It facilitates more efficient processing, automatic order matching, faster execution of trades and transparency. The scrips traded on the BSE have been classified into 'A', 'B1', 'B2', 'C', 'F' and 'Z' groups. The 'A' group shares represent those, which are in the carry forward system (Badla). The 'F' group represents the debt market (fixed income securities) segment. The 'Z' group scrips are the blacklisted companies. The 'C' group covers the odd lot securities in 'A', 'B1' & 'B2' groups and Rights renunciations. The key regulator governing Stock Exchanges, Brokers, Depositories, Depository participants, Mutual Funds, FIIs and other participants in Indian secondary and primary market is the Securities and Exchange Board of India (SEBI) Ltd.


Rolling Settlement Cycle :

In a rolling settlement, each trading day is considered as a trading period and trades executed during the day are settled based on the net obligations for the day. At NSE and BSE, trades in rolling settlement are settled on a T+2 basis i.e. on the 2nd working day. For arriving at the settlement day all intervening holidays, which include bank holidays, NSE/BSE holidays, Saturdays and Sundays are excluded. Typically trades taking place on Monday are settled on Wednesday, Tuesday's trades settled on Thursday and so on.


Concept Of Buying Limit

Suppose you have sold some shares on NSE and are trying to figure out that if you can use the money to buy shares on NSE in a different settlement cycle or say on BSE. To simplify things for ICICI Direct customers, we have introduced the concept of Buying Limit (BL). Buying Limit simply tells the customer what is his limit for a given settlement for the desired exchange. Assume that you have enrolled for a ICICI Direct account, which requires 100% of the money required to fund the purchase, be available. Suppose you have Rs 1,00,000 in your Bank A/C and you set aside Rs 50,000 for which you would like to make some purchase. Your Buying Limit is Rs 50,000. Assume that you sell shares worth Rs 1,00,000 on the NSE on Monday. The BL therefore for the NSE at that point of time goes upto Rs 1,50,000. This means you can buy shares upto Rs 1,50,000 on NSE or BSE. If you buy shares worth Rs 75,000 on Tuesday on NSE your BL will naturally reduce to Rs 75,000. Hence your BL is simply the amount set aside by you from your bank account and the amount realized from the sale of any shares you have made less any purchases you have made.


Your BL of Rs 50,000, which is the amount set aside by you from your Bank account for purchase is available for BSE and NSE. As you have made the sale of shares on NSE for Rs.100000, the BL for NSE & BSE rises to 1,50,000. The amount from sale of shares in NSE will also be available for purchase on BSE. ICICI Direct makes it very easy for its customers to know their BL on the click of a mouse. You just have to specify the Exchange and settlement cycle and on a click of your mouse, the BL will be known to you.


What Is Dematerialization?

Dematerialization in short called as 'demat is the process by which an investor can get physical certificates converted into electronic form maintained in an account with the Depository Participant. The investors can dematerialize only those share certificates that are already registered in their name and belong to the list of securities admitted for dematerialization at the depositories.
Depository : The organization responsible to maintain investor's securities in the electronic form is called the depository. In other words, a depository can therefore be conceived of as a "Bank" for securities. In India there are two such organizations viz. NSDL and CDSL. The depository concept is similar to the Banking system with the exception that banks handle funds whereas a depository handles securities of the investors. An investor wishing to utilize the services offered by a depository has to open an account with the depository through a Depository Participant.
Depository Participant : The market intermediary through whom the depository services can be availed by the investors is called a Depository Participant (DP). As per SEBI regulations, DP could be organizations involved in the business of providing financial services like banks, brokers, custodians and financial institutions. This system of using the existing distribution channel (mainly constituting DPs) helps the depository to reach a wide cross section of investors spread across a large geographical area at a minimum cost. The admission of the DPs involve a detailed evaluation by the depository of their capability to meet with the strict service standards and a further evaluation and approval from SEBI. Realizing the potential, all the custodians in India and a number of banks, financial institutions and major brokers have already joined as DPs to provide services in a number of cities.

Advantages of a depository services :
Trading in demat segment completely eliminates the risk of bad deliveries. In case of transfer of electronic shares, you save 0.5% in stamp duty. Avoids the cost of courier/ notarization/ the need for further follow-up with your broker for shares returned for company objection No loss of certificates in transit and saves substantial expenses involved in obtaining duplicate certificates, when the original share certificates become mutilated or misplaced. Increasing liquidity of securities due to immediate transfer & registration Reduction in brokerage for trading in dematerialized shares Receive bonuses and rights into the depository account as a direct credit, thus eliminating risk of loss in transit. Lower interest charge for loans taken against demat shares as compared to the interest for loan against physical shares. RBI has increased the limit of loans availed against dematerialized securities as collateral to Rs 20 lakh per borrower as against Rs 10 lakh per borrower in case of loans against physical securities. RBI has also reduced the minimum margin to 25% for loans against dematerialized securities, as against 50% for loans against physical securities. Fill up the account opening form, which is available with the DP. Sign the DP-client agreement, which defines the rights and duties of the DP and the person wishing to open the account. Receive your client account number (client ID). This client id along with your DP id gives you a unique identification in the depository system. Fill up a dematerialization request form, which is available with your DP. Submit your share certificates along with the form; (write "surrendered for demat" on the face of the certificate before submitting it for demat) Receive credit for the dematerialized shares into your account within 15 days.

Procedure of opening a demat account:
Opening a depository account is as simple as opening a bank account. You can open a depository account with any DP convenient to you by following these steps:
Fill up the account opening form, which is available with the DP. Sign the DP-client agreement, which defines the rights and duties of the DP and the person wishing to open the account. Receive your client account number (client ID). This client id along with your DP id gives you a unique identification in the depository system.
There is no restriction on the number of depository accounts you can open. However, if your existing physical shares are in joint names, be sure to open the account in the same order of names before you submit your share certificates for demat

Procedure to dematerialize your share certificates:
Fill up a dematerialization request form, which is available with your DP. Submit your share certificates along with the form; (write "surrendered for demat" on the face of the certificate before submitting it for demat) Receive credit for the dematerialized shares into your account within 15 days.
In case of directly purchasing dematerialized shares from the broker, instruct your broker to purchase the dematerialized shares from the stock exchanges linked to the depositories. Once the order is executed, you have to instruct your DP to receive securities from your broker's clearing account. You have to ensure that your broker also gives a matching instruction to his DP to transfer the shares purchased on your behalf into your depository account. You should also ensure that your broker transfers the shares purchased from his clearing account to your depository account, before the book closure/record date to avail the benefits of corporate action.

Stocks traded under demat:
Securities and Exchange Board of India (SEBI) has already specified for settlement only in the dematerialized form in for 761 particular scripts. Investors interested in these stocks receive shares only in demat form without any instruction to your broker. While SEBI has instructed the institutional investors to sell 421 scripts only in the demat form. The shares by non institutional investors can be sold in both physical and demat form. As there is a mix of both form of stocks, it is possible if you have purchased a stock in this category, you may get delivery of both physical and demat shares.


Going Short:

If you do not have shares and you sell them it is known as going short on a stock. Generally a trader will go short if he expects the price to decline. In a rolling settlement cycle you will have to cover by end of the day on which you had gone short.


Concept Of Margin Trading:

Normally to buy and sell shares, you need to have the money to pay for your purchase and shares in your demat account to deliver for your sale. However as you do not have the full amount to make good for your purchases or shares to deliver for your sale you have to cover (square) your purchase/sale transaction by a sale/purchase transaction before the close of the settlement cycle. In case the price during the course of the settlement cycle moves in your favor (risen in case of purchase done earlier and fallen in case of a sale done earlier) you will make a profit and you receive the payment from the exchange. In case the price movement is adverse, you will make a loss and you will have to make the payment to the exchange. Margins are thus collected to safeguard against any adverse price movement. Margins are quoted as a percentage of the value of the transaction.

Important facts for NRI customers:

Buying and selling on margin in India is quite different than what is referred to in US markets. There is no borrowing of money or shares by your broker to make sure that the settlement takes place as per SE schedule. In Indian context, buying/selling on margin refers to building a leveraged position at the beginning of the settlement cycle and squaring off the trade before the settlement comes to end. As the trade is squared off before the settlement cycle is over, there is no need to borrow money or shares.

Buying On Margin : Suppose you have Rs 1,00,000 with you in your Bank account. You can use this amount to buy 10 shares of Infosys Ltd. at Rs 10,000. In the normal course, you will pay for the shares on the settlement day to the exchange and receive 10 shares from the exchange which will get credited to your demat account. Alternatively you could use this money as margin and suppose the applicable margin rate is 25%. You can now buy upto 40 shares of Infosys Ltd. at Rs 10,000 value Rs 4,00,000, the margin for which at 25% i.e. Rs 1,00,000. Now as you do not have the money to take delivery of 40 shares of Infosys Ltd. you have to cover (square) your purchase transaction by placing a sell order by end of the settlement cycle. Now suppose the price of Infosys Ltd rises to Rs. 11000 before end of the settlement cycle. In this case your profit is Rs 40,000 which is much higher than on the 10 shares if you had bought with the intent to take delivery. The risk is that if the price falls during the settlement cycle, you will still be forced to cover (square) the transaction and the loss would be adjusted against your margin amount. Selling On Margin : You do not have shares in your demat account and you want to sell as you expect the prices of share to go down. You can sell the shares and give the margin to your broker at the applicable rate. As you do not have the shares to deliver you will have to cover (square) your sell transaction by placing a buy order before the end of the settlement cycle. Just like buying on margin, in case the price moves in your favor (falls) you will make profit. In case price goes up, you will make loss and it will be adjusted against the margin amount.


Types Of Orders:

There are various types of orders, which can be placed on the exchanges:

Limit Order : The order refers to a buy or sell order with a limit price. Suppose, you check the quote of Reliance Industries Ltd.(RIL) as Rs. 251 (Ask). You place a buy order for RIL with a limit price of Rs 250. This puts a cap on your purchase price. In this case as the current price is greater than your limit price, order will remain pending and will be executed as soon as the price falls to Rs. 250 or below. In case the actual price of RIL on the exchange was Rs 248, your order will be executed at the best price offered on the exchange, say Rs 249. Thus you may get an execution below your limit price but in no case will exceed the limit buy price. Similarly for a limit sell order in no case the execution price will be below the limit sell price. Market Order : Generally a market order is used by investors, who expect the price of share to move sharply and are yet keen on buying and selling the share regardless of price. Suppose, the last quote of RIL is Rs 251 and you place a market buy order. The execution will be at the best offer price on the exchange, which could be above Rs 251 or below Rs 251. The risk is that the execution price could be substantially different from the last quote you saw. Please refer to Important Fact for Online Investors. S Loss Order : A s loss order allows the trading member to place an order which gets activated only when the last traded price (LTP) of the Share is reached or crosses a threshold price called as the trigger price. The trigger price will be as on the price mark that you want it to be. For example, you have a sold position in Reliance Ltd booked at Rs. 345. Later in case the market goes against you i.e. go up, you would not like to buy the scrip for more than Rs.353. Then you would put a SL Buy order with a Limit Price of Rs.353. You may choose to give a trigger price of Rs.351.50 in which case the order will get triggered into the market when the last traded price hits Rs.351.50 or above. The execution will then be immediate and will be at the best price between 351.50 and 353. However stock movements can be so violent at times. The prices can fluctuate from the current level to over and above the SL limit price, you had quoted, at one shot i.e. the LTP can move from 350…351…and directly to 353.50. At this moment your order will immediately be routed to the Exchange because the LTP has crossed the trigger price specified by you. However, the trade will not be executed because of the LTP being over and above the SL limit price that you had specified. In such a case you will not be able to square your position. Again as the market falls, say if the script falls to 353 or below, your order will be booked on the SL limit price that you have specified i.e. Rs. 353. Even if the script falls from 353.50 to 352 your buy order will be booked at Rs. 353 only. Some seller, somewhere will book a profit in this case form your buy order execution. Hence, an investor will have to understand that one of the foremost parameters in specifying on a s loss and a trigger price will have to be its chances of executionability as and when the situation arises. A two rupee band width between the trigger and s loss might be sufficient for execution for say a script like Reliance, however the same band hold near to impossible chances for a script like Infosys or Wipro. This vital parameter of volatility bands of scrips will always have to be kept in mind while using the S loss concept.


Circuit Filters And Trading Bands:

In order to check the volatility of shares, SEBI has come with a set of rules to determine the fixed price bands for different securities within which they can move in a day. As per Sebi directive, all securities traded at or above Rs.10/- and below Rs.20/- have a daily price band of ±25%. All securities traded below Rs. 10/- have a daily price band of ± 50%. Price band for all securities traded at or above Rs. 20/- has a daily price band of ± 8%. However, the now the price bands have been relaxed to ± 8% ± 8% for select 100 scrips after a cooling period of half an hour. The previous day's closing price is taken as the base price for calculating the price. As the closing price on BSE and NSE can be significantly different, this means that the circuit limit for a share on BSE and NSE can be different.


Badla financing

In common parlance the carry-forward system is known as 'Badla', which means something in return. Badla is the charge, which the investor pays for carrying forward his position. It is a hedge tool where an investor can take a position in a scrip without actually taking delivery of the stock. He can carry-forward his position on the payment of small margin. In the case of short-selling the charge is termed as 'undha badla'. The CF system serves three needs of the stock market :

Quasi-hedging: If an investor feels that the price of a particular share is expected to go up/down, without giving/taking delivery of the stock he can participate in the volatility of the share. ? Stock lending: If he wishes to short sell without owning the underlying security, the stock lender steps into the CF system and lends his stock for a charge. ? Financing mechanism: If he wishes to buy the share without paying the full consideration, the financier steps into the CF system and provides the finance to fund the purchase The scheme is known as "Vyaj Badla" or "Badla" financing. For example, X has bought a stock and does not have the funds to take delivery, he can arrange a financier through the stock exchange 'badla' mechanism. The financier would make the payment at the prevailing market rate and would take delivery of the shares on X's behalf. You will only have to pay interest on the funds you have borrowed. Vis-à-vis, if you have a sale position and do not have the shares to deliver you can still arrange through the stock exchange for a lender of securities. An investor can either take the services of a badla financier or can assume the role of a badla financier and lend either his money or securities. On every Saturday a CF system session is held at the BSE. The scrips in which there are outstanding positions are listed along with the quantities outstanding. Depending on the demand and supply of money the CF rates are determined. If the market is over bought, there is more demand for funds and the CF rates tend to be high. However, when the market is oversold the CF rates are low or even reverse i.e. there is a demand for stocks and the person who is ready to lend stocks gets a return for the same. The scrips that have been put in the Carry Forward list are all 'A' group scrips, which have a good dividend paying record, high liquidity, and are actively traded. The scrips are not specified in advance because it is then difficult to get maximum return. All transactions are guaranteed by the Trade Guarantee Fund of BSE, hence, there is virtually no risk to the badla financier except for broker defaults. Even in the worst scenario, where the broker through whom you have invested money in badla financing defaults, the title of the shares would remain with you and the shares would be lying with the "Clearing house". However, the risk of volatility of the scrip will have to be borne by the investor.


Securities lending

Securties lending program is from the NSE. It is similar to the Badla from the BSE, only difference being the carry forward system not being allowed by the NSE. Meaning this is a where in a holder of securities or their agent lends eligible securities to borrowers in return for a fee to cover short positions.


Insider trading:

Insider trading is illegal in India. When information, which is sensitive in the form of influencing the price of a scrip, is procured or/and used from sources other than the normal course of information output for unscrupulous inducement of volatility or personal profits, it is called as Insider trading. Insider trading refers to transactions in securities of some company executed by a company insider. Although an insider might theoretically be anyone who knows material financial information about the company before it becomes public, in practice, the list of company insiders (on whom newspapers print information) is normally restricted to a moderate-sized list of company officers and other senior executives. Most companies warn employees about insider trading. SEBI has strict rules in place that dictates when company insiders may execute transactions in their company's securities. All transactions that do not conform to these rules are, in general, prosecutable offenses under the relevant law.