COMP-3 field occupy ?

Answer Posted / sid

Hi Friends;

Here I want to contribute a few lines in this discussion,
those might helpful to understand it very clearly.

BINARY
Specified for binary data items. Such items have a decimal
equivalent
consisting of the decimal digits 0 through 9, plus a sign.
Negative numbers
are represented as the two's complement of the positive
number with the same absolute value. The amount of storage
occupied by a binary item depends on the number of decimal
digits defined in its PICTURE clause:
1 through 4 2 bytes (halfword)
5 through 9 4 bytes (fullword)
10 through 18 8 bytes (doubleword)

The operational sign for ?big-endian? binary data (such as
OS/390 and VM) is contained in the left most bit of the
binary data. The operational sign for ?little-endian? binary
data is contained in the left most bit of the right most
byte of the binary data.

PACKED-DECIMAL
Specified for internal decimal items. Such an item appears
in storage in
packed decimal format. There are 2 digits for each character
position, except for the trailing character position, which
is occupied by the low-order digit and the sign. Such an
item can contain any of the digits 0 through 9, plus a sign,
representing a value not exceeding 18 decimal digits.

The sign representation uses the same bit configuration as
the 4-bit sign
representation in zoned decimal fields.

Following is the range I found in a IBM COBOL Programming manual

Picture Storage representation Numeric values

S9(1) through S9(4) Binary half-word (2 bytes) -32768
through +32767
S9(5) through S9(9) Binary full-word (4 bytes)
-2,147,483,648 through
+2,147,483,647
S9(10) through S9(18) Binary double-word (8bytes)
-9,223,372,036,854,775,808 through +9.223,372,036,854,775,807

9(1) through 9(4) Binary half-word (2 bytes) 0 through 65535
9(5) through 9(9) Binary full-word (4 bytes) 0 through
4,294,967,295
9(10) through 9(18) Binary double-word (8bytes) 0 through
18,446,744,073,709,551,615

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is not true about evaluate statement

1560


) How do u handle errors in BMS macro?

1418


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

2716


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8138






Why would you use find and get rather than to obtain?

673


What is report-item in COBOL?

702


Write down the divisions of cobol program?

662


Which mode is used to operate the sequential file?

654


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

920


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1895


Write a program that uses move corresponding.

664


Which division and paragraphs are mandatory for a COBOL program?

703


What are the cobol coding sheets?

655


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?

1221