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 ?
Answers were Sorted based on User's Feedback
Answer / arthi
1.
000123
2.
abc
Ravi, I guess you didnt mean the '-' as a minus sign in front of 000123, and abc. your answer is not clear enough.
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / kiran
Result
000123
abc
no "-" sign will come bcoze we didnt give like this
01 a pic s9(3) value is 123
01 b pic s9(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
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ravi
Answer to first question is -000123
and answer to second question is -abc
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / pradip
1.
000123
2.
abc---
Well arthi, here - stands for blank space, correct me if am
wrong
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / praveen
Arati was correct. if you move x(6) varibale to x(3) there
will not be any blank spaces.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
Answer / chowdary
after executing this program output will be
b value is 000123
and
b value is abc
there is no blanks after abc in b, because we have taken
its length as 3 in pic clause.
Is This Answer Correct ? | 0 Yes | 0 No |
I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different ways to update this column thru COBOL-DB2 program?
how will u find out 3rd week's 2nd day using occurs ?
What is the difference between a binary search and a sequential search?
using redefine can you redefine lower variable size to higher variable size?
When is a scope terminator mandatory?
i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19
Whats the use of Examine command? can someone help me?
what is rediffine clause?in what situation it can use?give me real time example?
How can you display the SPOOL information ?
Which is not true about evaluate statement
Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.
How you can delete a record from a ps file in cobol?