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

how you read control card into array?

3 Answers   HCL,


i have two file, each file having : file1 is having 2 fields field1 field2 file2 is having 3 fields field1 field2 field3 my req is to make it one file like: field1 field2 field1 field2 field3 if anyone know please send me syntax, i tried this with DFSORT but could not succeed.

9 Answers   Syntel,


What type of SDLC u followed? Why?

0 Answers   IBM,


consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B select one of the following data divusion entries which gives identical results for both the above IF statements a.01 Z PIC 9 88 X VALUE 1.9 88 Y VALUE 0.2 THRU 8 b.01 Z PIC 9 88 X VALUE 0.2 THRU 8 Y VALUE 1.9 c.01 Z PIC 9 88 X VALUE 1.9 88 NOT-Y VALUE 0.2 THRU 1.9 d.none of yhe above

2 Answers   TCS,


is it possible to rename 01 level?

4 Answers  






I have files that contains both duplicates files(occur more than twice) and non-duplicate files.The file is already sorted by a key.I want to determine those records that are duplicate and will be move to a duplicate file and non- duplicate files to be move to a valid file.thank you.help please

2 Answers  


record length in spool?

1 Answers   Infosys,


how to know that the file has 300 records how to acess it?

0 Answers   TCS, Hewitt,


How to retrive the 9th records out of ten records using the cobol program ?

3 Answers   UST,


Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?

3 Answers   Microsoft,


What will happen if we generate GDG +2 version instead of +1 version?

2 Answers   T systems,


Whats the use of Examine command? can someone help me?

1 Answers   IBM,






Categories