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 |
what if any ,is the syntex error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.
can i use multiple when statements in search & search all ? justify ur answer?
How can we know that cobol program is using report file or simple file....?
What is static and dynamic call in cobol?
what is jcl approach for programming?
for an INITIALIZE and what keyword allows for an override of the default.
What is cobol?
can we use COPY statement in w-s section? how?
What is the difference between next sentence and continue in cobol programing language?
88 class is used for
In an EVALUTE statement is the order of the WHEN clauses significant?
What is the size of s9(19)comp3? explain