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
how to refer the data field?
how to access the file from prodution from changeman tool and to submit a file to production
Which division and paragraphs are mandatory for a COBOL program?
What is a SSRANGE and NOSSRANGE?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
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.
What are the different rules to perform a Search?
How many bytes S(8) comp field occupy and its maximum value?
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.
What is rmode(any) ?
How to print 10 to 1 if the input have only 10 digit number?
Name the sections present in data division.
What do you understand by psb and acb?
Whats the difference between search & search ALL?
explain sorting techniques in cobol program?