What will happen if we move SPACES to numeric field and
ZEROES to alphabetic field?
Answers were Sorted based on User's Feedback
Answer / varun v
1) Move Spaces to Numeric field:
Here program would give compilation error saying Spaces
to Numeric integer did not follow the "MOVE" statement
compatibility rules.
2) Move Zeroes to Alphabetic field:
Would work fine with Movement of Zeroes to the
Alphabetic field.
Is This Answer Correct ? | 20 Yes | 4 No |
Answer / ram.g
ans to last ans
anything you can move to alpha...provided ..ur input is w/n
quotes...
ans to ur qn...
its quite possible by using redefine command...
the field will be sharing same memorylocation..
eg: 05 ws-num pic 99
10 ws-char redefines ws-num pic x(2)
move 12 to ws-num
move 'ab' to ws-char
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ram.g
sorry for post 3 2nd ans
it supposed for the qn ...x(7) to 9(9) nd vice versa..
plz refer the qn...
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sivakumar sekharannair
compile error will occure if zeroes moved to alphabetic
field or spaces moved to numeric field.
Is This Answer Correct ? | 5 Yes | 4 No |
spaces to umeric field will give data exp error soc7
bocz we cant move the spaces to numeric field
Zeroes to alphabetic we cant bcoz zeroes is numeric we cant
move into the alphabetic if we move it will give soc7
But using redefines we can moves num-alpa, alpa -num
these kind we use for copybook where in if you have one
field need to change for num/alpa.instead going for new
copybook .
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / thavasi
all above answers are incorrect.
Move SPACES to numeric field:
=============================
Moving spaces/non-numeric to numeric won't give any
compilation error or S0C7.
S0C will occur only when u do computation with non-numeric data.
ZERO to alphabetic field:
========================
MOVing ZEROS to alphabetic - will result in compilation error.
Is This Answer Correct ? | 5 Yes | 7 No |
Should I use STOP RUN in the sub program??why?
Can 88 level variable be declared in FD section..?
What are different data types in cobol?
If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it
In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
how can i see junk values in dclgen or in hostvariable of comp ?
How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)
What compiler option would you use for dynamic linking?
suppose there is one PF having two members PF1 PF2.PF has one unique key Emp ID.could you tell me uniqueness in PF will be effective across members as well ? assume emp iD 3333 is in member PF1 would same Emp id be exist also in member PF2 ?
What is the difference between comp and comp-3 usage? Explain other COBOL usage?s.
what is call by value and call by reference ?
3 Answers Infosys, ITC Indian Tobacco Company,