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 / 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 |
What are all the divisions of a COBOL program?
How to increase the logical record length of existing PS file?
how would find total records in files using seqientional
If my program receives input feed from program in other system.. if the receiving field size is less than the sending field.. what abend will be happening.
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
how to know that the file has 300 records how to acess it?
A table has two indexes defined. Which one will be used by the SEARCH?
If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.
what are the error codes in cobol, db2, cics, vsam , and jcl
What do you feel makes a good program?
how do you reference the fixed unblock file formats from cobol programs
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?