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 |
using redefine can you redefine lower variable size to higher variable size?
What is the difference between NEXT SENTENCE and CONTINUE?
) What is the use of IGNORE?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
i friends greetings to the day...!!! I face a quation like"while runnig the programe every day i have to access the previous day updates only...!! Ex:- Let last day 100 customers took bank account i have to select those customers only.."
how can we fetch 3 records in cobol pgm any coding pls ?
How many bytes do a s9 (7) comp-3 field occupy?
Can we move X(7) to S9(7) COMP?
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
What are the different rules of SORT operation?
period is missing in the cobol program which error we getting
What is the file organization clause ?