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 if any ,is the syntex error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.
where will u code file status ?
i need a small 3d program using inline and outline.
What is sqlca and why is it needed in any cobol-db2 program?
Can we move X(9) to 9(9). If yes what are the ways for doing this?
What is 77 level used for ?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
Where the Plan is located in CICS-DB2
how will u pass dadta to cobol+db2 program...?
can we print comp 3 stmts how ?
why we are using set in searchall?
Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?