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 the problem of ordered sequential files access?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the Purpose of Pointer in the string?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
How you can read the file from bottom?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
When is inspect verb is used in cobol?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What is the difference between PIC 9.99 and PIC9v99?
What is the difference between goback, stop run and exit program in cobol?
What is cobol?
Write some characteristics of cobol as means of business language.
Are you comfortable in cobol or jcl?