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

Difference between array and sub-script ?

1167


example for sub strings ? and refernce modifications whit output pls

1846


A table has two indexes defined. Which one will be used by the SEARCH?

759


What are the different rules for performing sort operation?

763


What is the Purpose of POINTER Phrase in STRING command in COBOL?

721






What are the different types of condition in cobol and write their forms.

658


Difference between cobol and cobol-ii?

707


Why occurs cannot be used in 01 level in COBOL?

719


What is the problem of ordered sequential files access?

702


How can you get the ksds file records into your cobol program?

644


HOw can I get the negative sign while deduct high value from low value

1790


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3720


how do you reference the rrds file formats from cobol programs

800


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

685


what is the difference between COBOL2 AND COBOL390?

2453