Comp 2 occupies how many bytes




















Now in COMP-3 where it is signed or unsigned the sign is stored in the last 4 bits. Thank you. COMP will store the values in binary format and from 9 1 -9 4 it will occupy 2 bytes from 9 5 -9 8 it will occupy 4 bytes from 9 9 -9 18 it will occupy 8 bytes.

Please Turn OFF your ad blocker. Learn More. How many bytes occupied following comp example? PIC X 3 occupy the 3 bytes V is specified for decimal point.

Is that correct? But interviewer looked at me differently when I said this answer? If you are more confident, please reply this First Prev Next Last. Showing Answers 1 - 23 of 23 Answers. Mona Nov 2nd, Rahul Jun 11th, Riddhi Aug 12th, Hi , I have written a rexx routines named copyflds to compute the lenght and offset of each feild in a cobol copy member. I think you don't need to change it much but you can customize it upon your name conventions.

One of The systax of calling it is: TSO COPYFLDS dataset-name copy-member-name which copy-member-name is the name of the cobol copy member name and dataset-name is the name of the dataset which the copy members is reside in. Posted: Sat Apr 29, am. This should help!!! Pranjal, the official wisdom from IBM publibz. View previous topic :: :: View next topic. Similar Topics. REXX - Adding variables. Numeric check on packed signed and un How to add 2 digits to COMP-3 file?

Search our Forums:. Data name length Length in COBOL 9 01 to 9 04 2 bytes 9 05 to 9 09 4 bytes S9 10 to S9 18 8 bytes COMPIn this case the data item will be represented in one word in the floating point form the number is actually represented in hexadecimal format and is suitable for arithmetic operations. COMP-1 takes 4 bytes of storage. The advantage is that this increases the precision of the data, which means that more significant digits are available.

COMP-1 takes 8 bytes of storage.



0コメント

  • 1000 / 1000