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?
Answers were Sorted based on User's Feedback
Answer / anoop
As far as my knowledge if there is a VARCHAR in table then
its host variable should have the length field and data
field. I feel you have to populate bothe the fields in order
to update the VARCHAR field. please get it confirmed also.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
Answer / shree
Use update query in the COBOL program inside the DB2 code
block
EXEC SQL
UPDATE <TABLE NAME> SET <COLUMN NAME> = 'X'
WHERE CLAUSE
END-EXEC
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / ravi
1.Use Update ....
2.Using Cursor ..for update only.
| Is This Answer Correct ? | 0 Yes | 1 No |
why 02 level number can't be use as a separate level number like 01 or 77 ?
What do you understand by passing by reference and passing by content?
Minimum how many Number of Paragraphs are there in ID- Divison?
Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...
What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?
What is the difference between a binary search and a sequential search?
What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad
How many maximum number of procedures can we write in one COBOL program?
There is a production file which has millions of records in it.The program that uses it ends up with an SOC7 abend.It is sure that the abend is due to some invalid data in the file.Is there any way to debugg the SOC7 abend with out giving displays? I need the record which is cause for the abend.
What are the various section in data division and briefly explain them.
wht happens if we dnt give scope terminator ?
HOw can I get the negative sign while deduct high value from low value