01 var1 pic s9(9)v99.
01 var2 pic x(30).
procedure division.
move 12345.99 to var1.
move12345.99 to var2.
display var1.
display var2.
what is the output?
Answers were Sorted based on User's Feedback
Answer / kingshuk
var1:0000123459I
If we move 12345.99 to var2 it will give a compilation error.
It should be move '12345.99' to var2.Then
var2:12345.99
| Is This Answer Correct ? | 16 Yes | 4 No |
Answer / john benito
Will abend.
Pic clause is not allowed in 01 level.
| Is This Answer Correct ? | 3 Yes | 28 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?
Differentiate between structured cobol programming and object-oriented cobol programming.
i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast
)what is retrieve?
What are the different types of condition in cobol and write their forms.
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?
What are the different rules of SORT operation?
How to Pass table from a cobol program to another cobol program and how to use that table in called program
i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ ' 05 WS-B REDEFINES WS-A 10 WS-B1 PIC X(10). 10 WS-B2 PIC 9(10). 10 WS-B3 PIC X(10). If I Display B1, B2 and B3 respectively, what is the value displayed in B2
For rewrite, why is it mandatory that file needs to be opened?
How do we get current date from system with century in COBOL?
which one is the best of com and com-3.using of real time ?