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



if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

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

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

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

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

Answer / piyush mani

yeap b is correct

Is This Answer Correct ?    3 Yes 0 No

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

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

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

Answer / raguveer sunendhu thollitu

I dont know..

Depends on the collating sequence.

Is This Answer Correct ?    0 Yes 0 No

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

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

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

Answer / chandu

it is an error

Is This Answer Correct ?    1 Yes 3 No

if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error..

Answer / guest



cobol

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More COBOL Interview Questions

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.

5 Answers   TCS,


can i use multiple when statements in search & search all ? justify ur answer?

2 Answers  


How can we know that cobol program is using report file or simple file....?

4 Answers  


What is static and dynamic call in cobol?

0 Answers  


what is jcl approach for programming?

4 Answers   IBM,






for an INITIALIZE and what keyword allows for an override of the default.

2 Answers  


What is cobol?

0 Answers  


can we use COPY statement in w-s section? how?

3 Answers  


What is the difference between next sentence and continue in cobol programing language?

0 Answers  


88 class is used for

5 Answers   CTS, EDS,


In an EVALUTE statement is the order of the WHEN clauses significant?

4 Answers  


What is the size of s9(19)comp3? explain

8 Answers  


Categories