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
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?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
Explain about different table spaces.
Which division and paragraphs are mandatory for a COBOL program?
Explain what you understand by passing by value.
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
i want a program using by if, evaluate , string, unstring, perform, occurs?
What are the various section in data division and briefly explain them.
What is difference between static and dynamic call in cobol?
How do get the result of your program directly on your pc?
Define cobol?
how do you define single dimensional array and multidimensional array in your cobol?
how to access the file from prodution from changeman tool and to submit a file to production
How do you reference the fixed block file formats from cobol programs