Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Write the code implementing the perform … varying.

1062


What are the cobol coding sheets?

1265


Can we change the password using ALTER? anyone tried and changed?

2020


What is an in line perform? When would you use it? Anything else you wish to say about it.

1074


Write a cobol program making use of the redefine clause.

1180


What is the difference between PIC 9.99 and 9v99 in COBOL?

1331


How to remove 2 duplicate records and copy only one using job control language?

1218


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?

1650


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2471


Can we redefine the field of x(200) to less than 200?

1370


Which Search verb is equivalent to PERFORM…VARYING?

1041


How do we get current date from system with century in COBOL?

1375


What are the different open modes available in cobol?

1190


How do you get the data to code the BMS macro?

1966


In COBOL, what is the different between index and subscript?

1245