01 a pic x(4) value 'abcd'
01 b pic 9(3)
can we move from a to b.if possible what would be stored in
b.
Answers were Sorted based on User's Feedback
Answer / rajini
We wont get data exception error (SOC7) , the program will
go fine , But the value in b will be junk.
| Is This Answer Correct ? | 20 Yes | 11 No |
Answer / sumanth toom
Ans 2 is correct and to add further to that..when the
program tries to use this variable 'b', then it will give
S0C7
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / vikas p o
First thing, when write this code and compile will it
compile sucessfully. If it compiles sucessfuly then if run
JCL will it give SOC7 or not.
Did test it but got error during compliation something like
"MOVE DID NOT FOLLOW COMPATIBILITY RULES".
Ppl can add to this...
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / amjith pillai
01 a pic x(4) value 'abcd'
01 b pic 9(3)
Yes, you can move. Try just a move and display B. you will
get abc.
But if you go for an operation (add, move to comp variable
etc) then you will hit SOC7
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / mime
No. You would encounter a data error - abend SOC7
| Is This Answer Correct ? | 13 Yes | 12 No |
Answer / mainframe user
why do you want to do this? you know it is not compatible.
there is no point in doing analysis for this stuff.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / satish
Yes We can move that.But I have another question.if we
move 'abcd' to comp variable then how it will get stored??I
know if we move theb it wont abend but dbt know how it will
be stored:-(
| Is This Answer Correct ? | 0 Yes | 0 No |
I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..
what r the types of perform statement
What will happen if we generate GDG (+2) version without generating (+1) version?
what happens if we wont give timestamp in precompilation process ?
Can we move X(9) to 9(9). If yes what are the ways for doing this?
what happens if parmparameter passes zero bytes to the program
Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.
How to Write the RESTART Logic Using COBOL?
4 Answers GalaxE, L&T, Syntel, TCS,
Write a program to concert an Indexed file into Sequential file?
A cobol program to read a file , match it with other if. If match occurs then write it to an output file. If no match then no need to write it.Error log created by program to track any error.
Explain fixed length record in cobol? with suitable example
Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM > 9. ------ PARA-X ADD 1 TO W-NUM How many times PARA-X is executed ?