01 a pic 9(3) value is 123
01 b pic 9(6)
move a to b
wht will be the value ? and
01 a pic x(6) value is abc
01 b pic x(3)
move a to b
wht will be the value ?
Answer Posted / cj
Numeric items are moved right to left (before the decimal
point) and left to right (after the decimal point) from
source item to the destination item.
So the answer for the first move=> Variable b will have
value 000123 in it. (In the question value 123 should be
within quotes)
Alphanumeric (as well as alphabetic) items are moved left to
right from source item to destination item.
So the answer for the second move=> Variable b will have abc
stored in it. (In the question value abc should be within
quotes)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is amode(31)
What is a SSRANGE and NOSSRANGE?
What rules are followed by the search verb.
How can you get the ksds file records into your cobol program?
Write a program to explain size error.
What is the difference between next sentence and continue in cobol programing language?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
how to refer the data field?
how do you reference the esds vsam file formats from cobol programs
What is redefines clause in COBOL?
how do you define single dimensional array and multidimensional array in your cobol?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
how do you reference the fixed unblock file formats from cobol programs
What is link edit in cobol?