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
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Define static linking and dynamic linking.
In COBOL, what is the different between index and subscript?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
how to refer the data field?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
how to access the file from prodution from changeman tool and to submit a file to production
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
Can we redefine the field of x(200) to less than 200?
What is rmode(24)
What are the different open modes available in cobol?
What is static and dynamic call in cobol?
What is length is cobol?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic