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

can we redefine 77 level item is it possible

4 Answers   HCL,


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

0 Answers   HeadStrong,


What is the difference between index and subscript?

5 Answers   Visa,


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

8 Answers   Cap Gemini,


What COBOL construct is the COBOL II EVALUATE meant to replace?

1 Answers  






What is an in-line perform ?

4 Answers   Accenture,


Can JUSTIFIED be used for all the data types?

3 Answers  


Can we move X(7) to S9(7) COMP?

1 Answers  


What is binary search?

3 Answers  


Which Search verb is equivalent to PERFORM…VARYING?

0 Answers  


what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.

3 Answers   HCL, TCS,


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,


Categories