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?
Answer Posted / 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 |
Post New Answer View All Answers
Which is not true about evaluate statement
Difference between cobol and cobol-ii?
How you can read the file from bottom?
Write the code implementing the perform … varying.
What are the different types of condition in cobol and write their forms.
Explain how to differentiate call by context by comparing it to other calls?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What is report-item in COBOL?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is a SSRANGE and NOSSRANGE?
What is the difference between next sentence and continue in cobol programing language?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
How do you differentiate between cobol and cobol-ii?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc