Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

how to change picture class of copy book variable inside program?

2 Answers  

What is the difference between PIC 9.99 and 9v99 in COBOL?

0 Answers   SwanSoft Technologies,

What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,

I have PS flat file with 14 records. I want to read from 4th to 9th record and want to write those 6 records (4th record to 9th record) to another PS file (output file). there is no key defined in the input file. I just want read a certain Consecutive records. can any one please give me the procedure division Coding for this. I have coded the below coding but the READ-PARA is performing only 1 time even though I have 14 records in my input file (i.e FILE-1): PROCEDURE DIVISION. A000-SECTION. MOVE 0 TO I. OPEN INPUT FILE-1. IF CHECK-KEY1 > 0 DISPLAY "OPEN ERROR FOR FILE-1, CODE IS:" CHECK-KEY1 END-IF. OPEN EXTEND NEWFILE-1 IF CHECK-KEY3 > 0 DISPLAY "OPEN ERROR FOR NEWFILE-1 COD IS" CHECK-KEY3 END-IF. PERFORM READ-PARA THRU EXIT-PARA UNTIL EOF-REC = 'YES'. DISPLAY " FINALLY OUT OF LOOP" CLOSE FILE-1 CLOSE NEWFILE-1 STOP RUN. READ-PARA. ADD 1 TO I READ FILE-1 AT END MOVE 'YES' TO EOF-REC IF I > 3 AND < 10 PERFORM WRITE-PARA ELSE DISPLAY "NOT IN RANGE" END-IF. EXIT-PARA. EXIT. WRITE-PARA. WRITE NEW-REC FROM FILE1-REC.

8 Answers   IBM,

What type of SDLC u followed? Why?

0 Answers   IBM,

In a program, variables are used but no DB2 involved in it. Can you call it as host variables??

4 Answers   EDS,

can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  

What is SQL Code -904 and -903 in DB2 And how to handle it?

1 Answers   IBM,

What is SDSF?

13 Answers   IBM,

Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY 'MAIN-PARA' PERFORM SECTION-A. STOP RUN. SECTION-A. PARA-A1. DISPLAY 'SECTION A PARA A1'. PARA-A2. DISPLAY 'SECTION A PARA A2'.

4 Answers  

What is the difference between write & move in COBOL?

3 Answers   CSC, HHB,

Minimum how many Number of Paragraphs are there in ID- Divison?

7 Answers   IBM,