i want to store 20 digits . h will u do it in cobol ?

Answers were Sorted based on User's Feedback



i want to store 20 digits . h will u do it in cobol ?..

Answer / paray2x

Most of the modern compilers support upto 31 digits. Try
compiling your program and you'll be able to find out.

Else, if your requirement is only to store and not do any
computation, you can have a group variable.

05 My-number.
10 My-number-part1 pic 9(15).
10 My-number-part2 pic 9(5).

Is This Answer Correct ?    13 Yes 3 No

i want to store 20 digits . h will u do it in cobol ?..

Answer / vaneesh

Just write PROCESS ARITH(EXTEND) before identification
division, you can use upto 9(31).

Is This Answer Correct ?    5 Yes 0 No

i want to store 20 digits . h will u do it in cobol ?..

Answer / nitesh sethi

Use ARiTH(EXTEND) as compile option and you can extend
numeric field upto 30 digits

Is This Answer Correct ?    4 Yes 3 No

i want to store 20 digits . h will u do it in cobol ?..

Answer / yogesh

U can use either tables(ARRAYS) or can store those values
as elementary data items

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

why occurs clause not mentioned in 01 level

6 Answers   HCL, NIIT, TCS, Tesco,


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

0 Answers   HCL,


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


Move Zeroes to I move 5 to j perform para1 varying I from 10 by -2 until I = 0 display j. para1. Add 5 to j. What’ll be the value after execution of display stmt. A) 35 B) 40 C) 30 D) 25 please explain how?

5 Answers  


How many sections are there in data division?.

10 Answers   Amdocs, TCS,






9(2).99 how many bytes take? Why . consider as a byte?

2 Answers  


How to solve SOC7. I have the cobol coded as below 01 A PIC 9(4). 01 AIN REDEFINES A. 05 AIN1 PIC S9(4) 01 B PIC 9(4)V99. 01 BIN REDEFINES B. 05 BIN1 PIC S9(4)V99. PROCEDURE DIVISION. START-PARA. INITIALIZE A AIN B BIN. ACCEPT A B. DISPLAY 'VALUE OF A=' A. DISPLAY 'VALUE OF B=' B. DISPLAY 'VALUE OF BIN1=' BIN1. DISPLAY 'VALUE OF AIN1=' AIN1. COMPUTE AIN1 = BIN1 - AIN1. DISPLAY 'VALUE OF AIN1=' AIN1. When i'm executing this code i'm getting SOC7 for A = 12 & B=34. Can someone explain SDSF OUTPUT DISPLAY TCOM058R JOB05458 DSID 102 LINE 0 COLUMNS 02- 81 COMMAND INPUT ===> SCROLL ===> CSR ********************************* TOP OF DATA ********************************** VALUE OF A=12 VALUE OF B=34 VALUE OF BIN1=34 VALUE OF AIN1=12 CEE3207S The system detected a data exception (System Completion Code=0C7). From compile unit PROG1 at entry point PROG1 at statement 29 at compile +000004CE at address 00007ECE. Please address how to solve this issue Thanks in advance.

1 Answers  


how to run sub programs using static and dynamic call ...

3 Answers   TCS,


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

0 Answers  


I have a sequential file. How do I access a record in this sequential file randomly in my program ?

8 Answers   CGI, Xansa,


what is a zoned decimal data type and how it will be stored?

2 Answers   IBM,


where will u code file status ?

2 Answers   TCS,


Categories