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 is the default value(s) for an initialize? What keyword will allow for an override of the default?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
For rewrite, why is it mandatory that file needs to be opened?
What is the difference between external and global variables in COBOL?
What are declaratives and what are their uses in cobol?
How do define dynamic array in cobol.
Can a Search can be done on a table with or without Index?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
how do you reference the fixed unblock file formats from cobol programs
How many sections are there in data division in COBOL?
IF I mention stop run in CICS what happens?
Write a program to explain size error.
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
What rules are to be followed while using the corresponding options?