db2 variable decimal(15,2) what is the equalent size of
cobol variable

Answers were Sorted based on User's Feedback



db2 variable decimal(15,2) what is the equalent size of cobol variable..

Answer / quasar chunawala

The correct COBOL Field that can hold the Value of DECIMAL
(15,2) SQL Field should be declared as

05 WS-COBOL-DECIMAL-FIELD PIC S9(13)V9(02) COMP-3.

Is This Answer Correct ?    29 Yes 3 No

db2 variable decimal(15,2) what is the equalent size of cobol variable..

Answer / ch.mohan

9(13)v9(2)

Is This Answer Correct ?    12 Yes 8 No

Post New Answer

More COBOL Interview Questions

consider the following FD FILE-1 01 REC-1 PIC X(80) ...... WORKING-STORAGE SECTION 01 W-REC PIC X(90) ........ PROCEDURE DIVISION FIRST-PARA ....... READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG which of the following is true with respect to the above? a.REC-1 will contain nothing and W-REC will contain the contains of the record read b.REC-1 and W-REC contain the same data c.syntex is invalid and error will occur d.REC-1 and W-REC must be of same size

1 Answers   TCS,


In which area will you utilize 88 level items in cobol?

0 Answers  


which is better either static call or dynamic call? and why?

5 Answers   HCL,


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 is the maximum data length for Numeric DataType ?

3 Answers   Cap Gemini,






how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it

2 Answers  


wht do u mean by (*,intrdr) wht is * used for ?

2 Answers  


how do you reference the fixed unblock file formats from cobol programs

0 Answers  


SUPPOSE I HAVE 60 CHARACTERS STING. IN THAT I WANT FIND OUT HOW MANY TIMES 'A'(ASSUME)WILL REPEATED AND I HAVE TO PASS 'E' IN PLACE OF 'A'ALONG THAT STRING.

2 Answers   Wipro,


What is the usage of comp fields in cobol?

0 Answers  


What is the difference between comp and comp-3?

0 Answers  


What divisions, sections and paragraphs are mandatory for a COBOL program?

8 Answers   Arigo Infotech,


Categories