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
What are the various section in data division and briefly explain them.
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Explain how you can characterize tables in cobol?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
Why would you use find and get rather than to obtain?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Why did you choose to work with ibm mainframe cobol programming?
Write down the divisions of cobol program?
When is inspect verb is used in cobol?
what is the use of outrecord?
What kind of error is trapped by on size error option?
For rewrite, why is it mandatory that file needs to be opened?
What are declaratives and what are their uses in cobol?
What is difference between static and dynamic call in cobol?
What is length is cobol?