I have a PS file and I would like to manually insert the
binary values (like a COMP format) into the file. How can i
do that? the way do in COMP-3 format.. suppose i want to
insert -12345 in to file in comp-3 format. simply we can
open a file in edit mode and do HEX-ON and insert the
value .
SEE BELOW--
135
24D

in 3 bytes - this will be COMP-3 presenatation of -12345.

Answer Posted / harsha

Create a layout(copybook) of your PS file. This layout
will have fields defined in COMP-3/COMP format etc...

Open the file in EDIT mode in File Manager/File Aid and
start inserting records.
Suppose first field on your PS file is defined as S9(5)COMP-
3. Now open the file in File Manager/File Aid, and insert
appropriate value. e.g. -12345. Save and close file.
Now open the file again in CHAR MOD(i.e. simply browse the
file) and put HEX ON, you will see the value below.
135
24D
It will occupy only three byte.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to refer the data field?

1793


how to access the file from prodution from changeman tool and to submit a file to production

6663


Which division and paragraphs are mandatory for a COBOL program?

703


What is a SSRANGE and NOSSRANGE?

807


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

2716






How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3706


What are the different rules to perform a Search?

610


How many bytes S(8) comp field occupy and its maximum value?

1620


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.

1691


What is rmode(any) ?

676


How to print 10 to 1 if the input have only 10 digit number?

802


Name the sections present in data division.

691


What do you understand by psb and acb?

659


Whats the difference between search & search ALL?

5235


explain sorting techniques in cobol program?

680