what is the difference between Normal vaiable and comp
variable.
Answers were Sorted based on User's Feedback
Answer / suman agrawal
Using comp, the value will be stored in binary format.
The allocation in number of bytes is based on the number of
digit the variable use:
No. of digits Bytes
1-4 2 bytes
5-9 4 bytes
10-18 8 bytes
| Is This Answer Correct ? | 18 Yes | 2 No |
Answer / guest1
When you use COMNP Items, the internal storage stuctur of
the value is different. And also the storage occupied by a
COMP variable is less than the zoned variable [9(9)}.
| Is This Answer Correct ? | 1 Yes | 0 No |
I am not sure about previous explanation, however before that all explanations are valid.
One thing should be clear in our mind that COMP usage is good but it can not be displayed simply, it will store in binary format, so we need to convert it in to ZD, if displaying in SYSOUT or writing to a file.
Please let me know if I am wrong.
Thanks
Garry
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / prathif
numeric data refered by pure binory storage format. it will
take half word and full word.
each character recognized by one character. total number of
chracter equal to size of word is called normal variable
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / naveen kumar.s
The value assigned to comp variable is stored in binary
format.The memeory allocation is also different.
For example,
77 A pic 9(8).
77 B Pic 9(8) comp.
Here,'A' occupies 8 bytes.whereas,'B' occupies 4 bytes only.
No.of Digits Bytes occupied
1-5 2
5-11 4
12-18 8
| Is This Answer Correct ? | 9 Yes | 17 No |
How to know whether the module is dynamical or statistical?
What are the differences bitween cobol and cobol-2?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
i want to use only first 100 records from a file.plz tell me how to write JCL for this(for read,copy,write operations).plz give me details of all posible JCL utilities?
What are the divisions in a cobol program? Which one is the mandatory division among them?
How many sections are there in data division?.
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid
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
Can you please let me know the centre name of INS certification in Kolkata.
What are 77 levels used for?