how many bytes does s9(7)COMP-3 field occupies?

Answer Posted / vijayamala

s9(7)comp3

n=7 , (n+1)/2 = (7+1)/2 = 4.

4 bytes will be allocated for this numeric data item.

since comp3 is a packed decimal representation, each byte
can hold 2 data items. which means it 4 bytes can occupy 8
items. In which last item is left for sign digit. So
s9(4)comp3 will have 4bytes allocated & can hold 7 data
item and 1 sign digit in it.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2060


how do you reference the fixed unblock file formats from cobol programs

712


What is the difference between Global and External Variables?

666


What is the default value(s) for an initialize and what keyword allows for an override of the default?

697


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1703






Mention the guidelines to write a structured cobol program?

620


What is the local-storage section?

683


How to remove 2 duplicate records and copy only one using job control language?

755


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1590


What is the difference between PIC 9.99 and 9v99 in COBOL?

737


What is the LINKAGE SECTION used in COBOL?

894


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

691


Differentiate between structured cobol programming and object-oriented cobol programming.

669


Why occurs cannot be used in 01 level in COBOL?

719


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?

1808