How can we find out wether to declare the data items like
Integer, Char,Comp? If comp types how can we decide wether
it is Comp and Comp3.How it is?

Please Explain... Cheers.



How can we find out wether to declare the data items like Integer, Char,Comp? If comp types how ca..

Answer / shinoy sansilavose

if your variable always represents a value which is needed
for some mathematical calculations then you can define that
var as either a numeric one or as an alphanumeric one.

if your variable is specif for any city name or address you
can declare it as alphabetic or alphanumeric(alphanumeric
is suggested since address contain pin codes/door number)

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More COBOL Interview Questions

The below is the declaration for a variable ws 01 ws pic 9(3). if you want to insert space how will you do that. in which level u should do it

3 Answers   ADP,


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


Can anybody give me example of subscript and index

5 Answers  


what is mainframe? what is the mainframe software ? what is use in s/w field?

7 Answers   CSE,


What are differences between Static Call and Dynamic Call?

10 Answers   IBM, KBC, Keane India Ltd, Verizon,






diffrence between z(2) and z9(2)

4 Answers   Cap Gemini,


How many bytes do a s9 (7) comp-3 field occupy?

1 Answers  


In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.

1 Answers   CSC,


If by mistake we MOVE a working storage variable into LINKAGE area. What will happen??

4 Answers   Accenture,


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

7 Answers   TCS,


Explain how you can characterize tables in cobol?

0 Answers  


where did you see the information regarding abend codes in jcl?

1 Answers   Hewitt,


Categories