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 do u write test cases?

1633


How do you reference the fixed block file formats from cobol programs

699


explain sorting techniques in cobol program?

686


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1951


Can we change the password using ALTER? anyone tried and changed?

1542






i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2101


what happens if parmparameter passes zero bytes to the program

1659


What is a SSRANGE and NOSSRANGE?

818


What the difference is between continue and next sentence?

651


State the various causes of s0c1, s0c5 and s0c7.

657


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

769


What is the difference between binary search and sequential search?

638


What is link edit in cobol?

748


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1111


i need a small 3d program using inline and outline.

1629