if a pic 9(3) value 354,b pic x(2) value '46' then
a)a>b
2)a<b
3)error
Answers were Sorted based on User's Feedback
Answer / piyush mani
i think it will create an error bcoz we can't compare numeric variable to non-numeric variable.
| Is This Answer Correct ? | 8 Yes | 4 No |
Answer / billyboyo
IBM Cobol will do an alphanumeric comparison because one of
the fields is PICTURE X. "354" will be compared to "45" and
be found to be lower. Answer b) is correct.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / seema dawlekar
As picture clause for variable b is x(2), which means that
it can accept both numeric and characters of length 2, but
the care we should take here is that we should enclose them
in the single quotes, therefore to my expectation option b
is write.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / raguveer sunendhu thollitu
I dont know..
Depends on the collating sequence.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / saidinesh
I accept that u can enter the value of numeric as well as
alpha numeric. but we can not give the numeric values in
cot's. please check it once...
| Is This Answer Correct ? | 0 Yes | 1 No |
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.
IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.
What is the difference between CONTINUE & NEXT SENTENCE ?
What is COMP-1? COMP-2?
how do you reference the esds vsam file formats from cobol programs
How are the next sentence and continue different from each other?
Give some advantages of REDEFINES clause?
what is ASRA, AEY9?
i want to learn mainframes. i completed MCA ,whats the future of mainframes
What is normalisation?
How to Pass table from a cobol program to another cobol program and how to use that table in called program
Why we are using comp and comp-3 in real time projects?