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 |
How you can delete a record from a ps file in cobol?
If we use GO BACK instead of STOP RUN in cobol?
What is Alternate Index ? How is it different from regular index ?
If you were passing a table via linkage, which is preferable - a subscript or an index?
Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.
What are differences between Static Call and Dynamic Call?
10 Answers IBM, KBC, Keane India Ltd, Verizon,
if a=b how the flow will complete??? perform test through test-exit. perform activa through activa-exit. test. if a=b then next sentence else move a to c. test-exit. exit. activa. -- -- activa-exit. exit.
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
What is the use of EVALUATE statement?
SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WILL REPEATED AND I HAVE TO PASS 'E' IN PLACE OF 'A'ALONG THAT STRING.