which is better comp or comp-3 in terms of memory
utilization?
Answers were Sorted based on User's Feedback
Answer / saravanan s
See Meenakshi,It is depends on the Requirement,
So the Conclusion is
Take a look on the table
COMP COMP-3
(in bytes) (in bytes)
S9(01) 2 1
S9(02) 2 2
S9(03) 2 2
S9(04) 2 3
S9(05) 4 3
S9(06) 4 4
S9(07) 4 4
S9(08) 4 5
S9(09) 4 5
S9(10) 8 6
S9(11) 8 6
S9(12) 8 7
S9(13) 8 7
S9(14) 8 8
like that.........
Cheers,
Saravanan
Is This Answer Correct ? | 16 Yes | 1 No |
Answer / ravi kiran
for lower boundaries comp is better , for higher boundaries
comp-3 is better.
in real time mostly comp3 is used
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / guest1
COMP values are stored as Binary format. So it is good to
use COMP.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / i go crazy
COMP uses less memory compared to COMP-3 at word boundaries.
Ex: s9(04) COMP - 2 bytes.
s9(04) COMP-3 - 3 bytes.
Is This Answer Correct ? | 2 Yes | 1 No |
How many variables can be declared in w-s section.?
how to run sub programs using static and dynamic call ...
in the TIME parameter we r giving hours r minutes
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?
i need a small 3d program using inline and outline.
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
What are 77 levels used for?
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.
There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?