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
What are the different rules of SORT operation?
What is the difference between next sentence and continue in cobol programing language?
example for sub strings ? and refernce modifications whit output pls
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
How many sections are there in data division in COBOL?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Write the code to count the sum of n natural numbers.
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the difference between binary search and sequential search?
How to remove 2 duplicate records and copy only one using job control language?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Write down the divisions of cobol program?