77 a pic x(4) value '1234' -----> instead of this 'abcd'
77 b pic 9(4) value zeros.
move a to b
what is the answers for both cases?
IS it possible? Give me elementary move rules briefly......
Answer Posted / satish kumar
hello all, yes it is possible to move alphanumeric to
numeric but not numeric to alphanumeric.if we are moving
alphanumeric character "abcd" to numeric. The compiler
accepts the first three characters as same and the remaining
last character it takes ascii value/code of last character 'd'.
pgm1: 77 a pic x(4) value "abcd".
77 b pic 9(4) value zeros.
move a to b.
o/p: abc4
pgm2: 77 a pic 9(4) value 1234.
77 b pic x(4).
move a to b.
o/p: 1234
in this case the compiler can move the numeric values to
alphanumeric directly.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
What is amode(31)
How do you get the data to code the BMS macro?
explain sorting techniques in cobol program?
how to access the file from prodution from changeman tool and to submit a file to production
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What is the utilization of copybook in cobol?
Write the code to count the sum of n natural numbers.
How to remove 2 duplicate records and copy only one using job control language?
Write the code implementing the perform … varying.
how do you reference the printer file formats from cobol programs
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Have you used comp and comp-3 in your project? And how?
How do you reference the following file formats from cobol programs?
how to convert the recors form vsam file to db2 table tru file aid