Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


I have one column say 'X' defined as VARCHAR
Can anyone tell me What are the different ways to update
this column thru COBOL-DB2 program?

Answers were Sorted based on User's Feedback



I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different wa..

Answer / anoop

As far as my knowledge if there is a VARCHAR in table then
its host variable should have the length field and data
field. I feel you have to populate bothe the fields in order
to update the VARCHAR field. please get it confirmed also.

Is This Answer Correct ?    4 Yes 0 No

I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different wa..

Answer / priyanka

If a variable is defined as varchar, the filed will have a
length variable also. Before updating the value 'X', you
need to move the length of the new value to length filed
of 'X'.
Eg: If you want to update 'TEST' in 'X'.

MOVE LENGTH OF 'TEST' TO X-LENGTH
exec sql
UPDATE table
SET X = 'TEST'
Where clause
end-exec

Is This Answer Correct ?    3 Yes 0 No

I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different wa..

Answer / shree

Use update query in the COBOL program inside the DB2 code
block
EXEC SQL
UPDATE <TABLE NAME> SET <COLUMN NAME> = 'X'
WHERE CLAUSE
END-EXEC

Is This Answer Correct ?    3 Yes 2 No

I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different wa..

Answer / kk

hi,
if declare varchar format must declare length and text in
level no 49.

Is This Answer Correct ?    1 Yes 0 No

I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different wa..

Answer / ravi

1.Use Update ....
2.Using Cursor ..for update only.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer



More COBOL Interview Questions

What do you understand by psb and acb?

0 Answers  


01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name

5 Answers   TCS,


How arrays can be defined in COBOL?

0 Answers  


What rules are followed by the search verb.

0 Answers  


What is normalisation?

2 Answers   IBM,






How many maximum number of procedures can we write in one COBOL program?

6 Answers  


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

0 Answers  


What is file status 92?

3 Answers  


how to crack cts interview apps? NOVEMBER 21 2010

2 Answers   CTS,


What is the default value(s) for an initialize and what keyword allows for an override of the default?

0 Answers  


I want ALL jcl ERROR cods

1 Answers  


can anyone explain me the concept of COMP-4 PLEASE??

2 Answers  






Categories