how to display comp3 variables reply soon ?
Answers were Sorted based on User's Feedback
Answer / fjord
01 ws-a pic s9(5) comp-3 value 12345.
01 ws-b pic s9(5).
Procedure division.
move ws-a to ws-b
display ws-b upon terminal.
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / chandra
SELECT ACCT-FILE ASSIGN TO UT01.
01 A pic s9(5)comp-3 value 12345.
01 ACC-REC.
02 B pic s9(5)comp-3.
02 FILLER X(77).
PD.
OPEN ACCT-FILE.
MOVE A TO B.
WRITE ACC-REC.
BROWSE THE FILE AND WRITE HEX ON IN THE COMMAND PROMPT THEN
PRESS ENTER....IT WILL SHOW U THE COMP-3 VALUE.....
| Is This Answer Correct ? | 7 Yes | 4 No |
Answer / lovely.surendra
just use a another ws-variable and then move the value of
COMP variable into it,
now u can do any activitity with this ws-variable.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sachin
you can also do this using the jcl sort
inrec = (1,4,pd,m4)
| Is This Answer Correct ? | 0 Yes | 1 No |
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
What are the two search techniques ?
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
should I use Go back in the main program ? Yes we can use Go back in main program as well.
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
given the following piece of code: CALL SUB-PGM USING A, B, C. CALL SUB-PGM USING A, C, C. (a) Both CALL statements will always produce same result. (d) Both CALL statements may produce different result. (c) Compile-time error because SUB-PGM is a dataname. (d) Compile-time error because A, B, C are used twice.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is the difference between Perform para and perform asaection in cobol?
what is the purpose of linkage section?
What is rmode(24)
write a program to eliminate duplicate records in a input file and send them to output file.
We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)