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 remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What is the LINKAGE SECTION used in COBOL?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
i want a program using by if, evaluate , string, unstring, perform, occurs?
Explain how to differentiate call by context by comparing it to other calls?
Difference between cobol and cobol-ii?
Write a program to enter and display the names of students in a class using the occurs clause.
What is the difference between external and global variables in COBOL?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
what is s000 u4087 error? please give the all error codes in cobol,jcl.
how do you reference the variable block file formats from cobol programs
How do you reference the fixed block file formats from cobol programs