I want to declare a field with data type Double in my COBOL
program. how shall i do that ?

Answers were Sorted based on User's Feedback



I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / tarunam

To Declare field with double data type u have to declare it
with comp-2
eg: PIC s9(8) usage is comp-2

Is This Answer Correct ?    8 Yes 0 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / fdsfsdfs

yes it has to be declared COMP 2

Is This Answer Correct ?    5 Yes 0 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / prasad

With the above answer we can achive decimal numeric
declaration but we will not achive double format
declaration.

To Declare double data type in COBOL we have to decalre
field with COMP-3.

Examples:

WS-NUM PIC 9(4) COMP-3. for non decimal numbers
WS-NUM1 PIC 9(4) v 99 COMP-3. For decimal values.

Is This Answer Correct ?    3 Yes 1 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / i go crazy

For COMP-2 we will not give PIC clause. By default it takes 8 bytes.

Is This Answer Correct ?    2 Yes 0 No

I want to declare a field with data type Double in my COBOL program. how shall i do that ?..

Answer / sri

9(X) V99 or 9(X) V(Y)

Where X and Y are integers.

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More COBOL Interview Questions

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


how many bytes does s9(7)COMP-3 field occupies?

6 Answers   ADP,


SIGN TRAILING SEPARATE field occupy ?

3 Answers  


why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.

2 Answers   TCS,


what is difference between the sysabend and userabend?

2 Answers  






What is the difference between next sentence and continue in cobol programing language?

0 Answers  


How to read records from flat file in reverse order through COBOL program?

14 Answers   Accenture, Broadridge, IBM, MAT, Polaris, SPIC, Syntel, TCS, Wipro,


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

0 Answers   HCL,


plz any one tell clearly the justify right clause?

1 Answers  


What is SET TO TRUE all about, anyway?

5 Answers  


here is my compile and link edit steps in a jcl //COMPILE1 JOB (3CUS,S),'CCDM TEST' //STEPNAME EXEC PGM=IGYCRCTL,PARM='DYNAM,RENT,LIB,OBJECT, // OFFSET,APOST,OPTIMIZE',REGION=4096K //STEPLIB DD DSNAME=PM7351.TEST2.COB,DISP=SHR //SYSIN DD DSNAME=PM7351.TEST2.COB(PGM1),DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT2 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT3 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT4 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT5 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT6 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT7 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSPRINT DD SYSOUT=* //SYSLIN DD DSNAME=&&LOAD,DISP=(MOD,PASS),UNIT=SYSDA, // SPACE=(10,(10,10)),DCB=BLKSIZE=400 //LKED EXEC PGM=IEWL,REGION=1024K //SYSPRINT DD SYSOUT=A //SYSLIB DD DSN=PM7351.TEST2.LOADLIB,DISP=SHR // DD DSN=PM7351.TEST2.COB(PGM1),DISP=SHR //SYSLMOD DD DSN=PM7351.TEST2.LOADLIB, // DISP=SHR //SYSUT1 DD UNIT=SYSDA,DCB=BLKSIZE=1024,SPACE=(CYL,(1,1)) //SYSTERM DD SYSOUT=* //SYSLIN DD DSN=&&LOAD,DISP=(OLD,DELETE) //SYSIN DD DUMMY i am getting IEW2013I 0F08 NO MEMBER NAME WAS SPECIFIED. MODULE WAS SAVED USING TEMPNAM1. could any one tell me the resolution for this..?

1 Answers  


How we copy a program from production region to development region.What is the process & syntax ?

3 Answers   CTS,


Categories