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..

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..

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..

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..

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..

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..

I accept that u can enter the value of numeric as well as
alpha numeric. but we can not give the numeric values in

 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..

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..

cobol

 Is This Answer Correct ? 0 Yes 4 No

More COBOL Interview Questions

can we use go to statement inline-perform?

there is a file whose ORGANISATION is INDEXED.you want to read the records from the file in RANDOM fashion as well as sequentially.then which of the access mode would you specify? a.SEQUENTIAL b.RANDOM c.DYNAMIC D.ACCESS MODE has nothing to do with it

01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345.99 to var2. display var1. display var2. what is the output?

can we read in input the file with a variable length ? please , how ..could you help me ?

How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

What is SET TO TRUE all about, anyway?

What is the output generated by the following code? 01 GRP-I. 05 SUBFLD1 PIC XX VALUE "AB". 05 FILTER PIC X(6) VALUE SPACES. 01 GRP-2 REDEFINED GRP-1. 05 SUB-FLD2 PIC XX. 05 SUB-FLD3 PIC XX. 05 FILTER PIC X(4). IF SUB-FLD1 NOT = SPACES DISPLAY "SUBFLD1" MOVE "ABBCCD" TO GRP-1 IF SUB-FLD3 = SPACES DISPLAY "SPACES" ELSE DISPLAY "SUBFLD3" DISPLAY "END" ELSE DISPLAY "SPACES" DISPLAY "END". (a) SUBFLD1 SUBFLD3 END (b) SPACES END (c) SUBFLD1 END (d) SUBFLD1 SPACES

What are subroutines ? and how do we pass data to the sub routines?

In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.

In EBCDIC, how would the number 1234 be stored?

Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.

Categories