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...

Sending data is aplhabetic size 7 (value 3000), I wantated
this value to be stored in database, which is defined as
s9(7)v9(2)comp-3.

Answer Posted / mvramesh

01 ws-in-data Pic X(7)
05 ws-numeric Pic x (4) value '3000'
05 ws-filler Pic x (1) value '.'
05 ws-decimial pic x (2) value '00'

01 WS-Temp-CHAR PIC X(6)
05 ws-num Pic x (4)
05 ws-dec Pic x (2)

01 WS-TEMP-NUM redefines WS-Temp-char pic 9(4)V9(2)

01 WS-OUT-Data PIC S9(7)V9(2) comp-3

move ws-numeric to ws-num
move ws-decimal to ws-dec

move ws-temp-num to WS-OUT-data

here is the logic, there may be syntax errors. need to modify based on the format of input data.

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the rrds file formats from cobol programs

1587


What is inspect in cobol ?

1309


How many sections are there in data division in COBOL?

1143


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1365


What are the different rules to perform a Search?

1100


How you can read the file from bottom?

1160


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2227


How many bytes S(8) comp field occupy and its maximum value?

2146


What is the difference between goback, stop run and exit program in cobol?

1595


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

1337


what are decleratives in cobol?

2266


What is a SSRANGE and NOSSRANGE?

1476


What are the different rules for performing sort operation?

1230


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2402


What are the pertinent COBOL commands?

3181