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
Write the code implementing the perform … varying.
What are the cobol coding sheets?
Can we change the password using ALTER? anyone tried and changed?
What is an in line perform? When would you use it? Anything else you wish to say about it.
Write a cobol program making use of the redefine clause.
What is the difference between PIC 9.99 and 9v99 in COBOL?
How to remove 2 duplicate records and copy only one using job control language?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Can we redefine the field of x(200) to less than 200?
Which Search verb is equivalent to PERFORM…VARYING?
How do we get current date from system with century in COBOL?
What are the different open modes available in cobol?
How do you get the data to code the BMS macro?
In COBOL, what is the different between index and subscript?