Hi All,
Can anyone tell me how we can MOVE value of a X(19)
variable to a S9(17) COMP-3 variable?
Answer with an Example will be of great help.

Answer Posted / vamsi

First of all s9(17) comp-3 will occupy 9 bytes and X(19) has
19 bytes of memory.

When we move the text value to an comp-3 field, we will get
Soc7 error. We cannot move alpha values to numeric fields.
If the X(17) contain numeric values then we can move this
field to s(17) comp-3 field and we can move only 9 bytes
other data will be trucated.

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rmode(24)

686


Whats the difference between search & search ALL?

5289


What is amode(24)?

686


What are the access modes of START statement?

728


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

717






What type of SDLC u followed? Why?

1533


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

651


Can a Search can be done on a table with or without Index?

816


Which mode is used to operate the sequential file?

681


What are literals?

636


What is Pic 9v99 Indicates in COBOL?

735


What is report-item in COBOL?

717


what is the use of outrecord?

1776


How do define dynamic array in cobol.

679


what is amode(24), amode(31), rmode(24) and rmode(any)?

707