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
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 |
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 |
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 |
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
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.
In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?
which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!" What will be the result ? (a) A=88.10, B=32.754 (b) A=87.00 B=32.754 (c) A=87.10 B=32.754 (d) ERROR!!! will be DISPLAYed on the screen.
Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?
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..?
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
what is the use of filler in cobol programing?
What is link edit in cobol?
what is the minimum number of lines a Cobol program should have to successfully compile and run