Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


77 a pic x(4) value '1234' -----> instead of this 'abcd'
77 b pic 9(4) value zeros.
move a to b
what is the answers for both cases?
IS it possible? Give me elementary move rules briefly......

Answers were Sorted based on User's Feedback



77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / amarnath reddy

Hi,

That is wrong answer. we can get that result when we MOVE A
TO B. result is 1234.
because A is declared as alphanumeric and B is declared as
numeric but here A is intialized all numeric values(1234)
only and move to the B is also numeric So not possible to
get any abend.

Is This Answer Correct ?    5 Yes 0 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / mithlesh

It is not possible to move alphanumaric to numaric data type
it will throw soc7 error at runtime.

Sco7 is the abend . which come when mismatch problem
occured.

Is This Answer Correct ?    4 Yes 1 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / subra kondaveeti

Hello All, Move a alpha numeric field to Numeric fields doesn't necessarily gives a soc7 because it depends upon the what the alpha-numeric field contains.
for example value of 'ABCD' in teh alpha-numeric field ALSO MOVES 1234 to numeric field. if you look at the assembly instruction produced for the move statement is

moven which means ignore the zone portion of each byte and move the numeric value of the byte. but it can give soc7 if you move '----' to numeric field because it tries to move x'CACACACA' to numeric field. if you look at the numeric portion of every byte is 'A' and hence can't be moved

Is This Answer Correct ?    3 Yes 0 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / satish kumar

hello all, yes it is possible to move alphanumeric to
numeric but not numeric to alphanumeric.if we are moving
alphanumeric character "abcd" to numeric. The compiler
accepts the first three characters as same and the remaining
last character it takes ascii value/code of last character 'd'.

pgm1: 77 a pic x(4) value "abcd".
77 b pic 9(4) value zeros.
move a to b.
o/p: abc4

pgm2: 77 a pic 9(4) value 1234.

77 b pic x(4).
move a to b.
o/p: 1234

in this case the compiler can move the numeric values to
alphanumeric directly.

Is This Answer Correct ?    3 Yes 0 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / amarnath reddy

Hi Vinod,

If we move to only numeric values but alphanumeric data
item into numeric data item, We not possible to get any
abend. If we move to alphabetic values (abcd) to numeric
data item we can get the abend soc7.

Is This Answer Correct ?    1 Yes 0 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / vinodquestion

Hi Mr. Amar. Thank you for your answer. Then wat about 'abcd'..

Is This Answer Correct ?    0 Yes 0 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / himanshu

Mr Amarnath,i would advise you to read and understand
question properly.And please dont mark ur answer correct
yourself.its irritating.

Is This Answer Correct ?    0 Yes 0 No

77 a pic x(4) value '1234' -----> instead of this 'abcd' 77 b pic 9(4) value..

Answer / amarnath reddy

Hi Himanshu,

you read and try to understand my answer. I posted my answer
is Those cases not possible only when we move 1234 to b data
item that is accepted otherwise move abcd to b data item
possible to get the abend soc7.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

what will be the output when a)pic 9(6)value 000178 is moved to pic ***,***. b)pic 9(5) value 57397 is moved to pic $$,$$9.

5 Answers  


What is the difference between a subscript and an index in a table definition?

3 Answers   TCS,


How many sections are there in data division?.

10 Answers   Amdocs, TCS,


How to remove 2 duplicate records and copy only one using job control language?

0 Answers  


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

0 Answers  


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


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)

3 Answers   IBM,


Why we need to use redefine clause when we can define the variable seperately... what is actual need....

5 Answers   Accenture,


How To move a value to an array using move verb?

3 Answers   IBM,


What are the different rules of SORT operation?

0 Answers  


record length in spool?

2 Answers   Infosys,


Categories