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 are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?

2 Answers   Satyam,


consider the following PROCEDURE DIVISION entry OPEN EXTEND IN-FILE identify the correct statement a.organization of IN-FILE is sequential and records can be added in the beginning b.organization of IN-FILE is sequential and records can be added in the end c.organization of IN-FILE is indexed and records can be added in the beginning d.organization of IN-FILE is indexed and records can be added in the end

3 Answers   TCS,


WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?

3 Answers   TCS,


what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?

4 Answers   IBM,


why do u need inspect verb?

3 Answers   Patni,






what is record label is empty or standard in file description of data division?

2 Answers   HCL,


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  


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.

4 Answers   Atos Origin,


What is normalisation?

2 Answers   IBM,


where do we use dyanamic call ? and where do we use static call pls give any example pls ?

3 Answers   Patni,


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


maximum of how many screens we can open in emulator

2 Answers  






Categories