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 guidelines should be followed to write a structured cobol prgm?
What the difference is between continue and next sentence?
What is the difference between goback, stop run and exit program in cobol?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
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?
What is rmode(any) ?
What is link edit in cobol?
What are various search techniques in cobol? Explain.
what is amode(24), amode(31), rmode(24) and rmode(any)?
What is the difference between structured cobol programming and object alternativelyiented cobol?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Which is not true about evaluate statement
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Explain how you can characterize tables in cobol?