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 |
Hi Guys, I have faced one interview question if I have requirement to add 5 new columns to existing table what are prerequisite do i need to take.
What is the difference between performing a SECTION and a PARAGRAPH?
how to display the dataset information?
How to read records which is in sequential file in reverse order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my doubt any one
how to create temporary data set in jcl? what is the use?
3 Answers Cap Gemini, Temenos,
Write a cobol program making use of the redefine clause.
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
input:- 12233344445555566666... output:- 1=1,2=4,3=9... Here firstno i.e 1 should be displayed and after that the alikeno.s should be added n displayed.i.e 2+2=4 like tat it goeson.
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?
WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.
Explain how you can characterize tables in cobol?
Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?