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


Please Help Members By Posting Answers For Below Questions

What is length is cobol?

652


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

722


how do you reference the variable unblock file formats from cobol programs

752


What is the difference between next sentence and continue in cobol programing language?

712


What is the usage of comp fields in cobol?

660






here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6840


how to access the file from prodution from changeman tool and to submit a file to production

6688


how do you reference the printer file formats from cobol programs

669


What are literals?

632


how can i see junk values in dclgen or in hostvariable of comp ?

2546


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1657


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

897


how to move the records from file to array table. give with code example

2223


What is rmode(any) ?

686


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2014